From 57f3224c3f838844cdae5e4a9d63e03152013f9a Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sat, 28 May 2011 10:36:24 -0700 Subject: drbd: Convert vmalloc/memset to vzalloc Signed-off-by: Joe Perches Signed-off-by: Jiri Kosina --- drivers/block/drbd/drbd_bitmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/block') diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 7b976296b564..912f585a760f 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -378,15 +378,14 @@ static struct page **bm_realloc_pages(struct drbd_bitmap *b, unsigned long want) * thread. As we have no disk yet, we are not in the IO path, * not even the IO path of the peer. */ bytes = sizeof(struct page *)*want; - new_pages = kmalloc(bytes, GFP_KERNEL); + new_pages = kzalloc(bytes, GFP_KERNEL); if (!new_pages) { - new_pages = vmalloc(bytes); + new_pages = vzalloc(bytes); if (!new_pages) return NULL; vmalloced = 1; } - memset(new_pages, 0, bytes); if (want >= have) { for (i = 0; i < have; i++) new_pages[i] = old_pages[i]; -- cgit v1.2.1 From 1d273b929cad7b1ee95d5c15ac806b3abc764278 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 3 Jun 2011 02:28:46 -0700 Subject: drbd: Use angle brackets for system includes Use the normal include style. Signed-off-by: Joe Perches Signed-off-by: Jiri Kosina --- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_nl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/block') diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index ef2ceed3be4b..a6ab1b28c61e 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -928,7 +928,7 @@ struct drbd_md { #define NL_INT64(pn,pr,member) __u64 member; #define NL_BIT(pn,pr,member) unsigned member:1; #define NL_STRING(pn,pr,member,len) unsigned char member[len]; int member ## _len; -#include "linux/drbd_nl.h" +#include struct drbd_backing_dev { struct block_device *backing_bdev; diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 515bcd948a43..20de58d6df40 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -94,7 +94,7 @@ static int name ## _from_tags(struct drbd_conf *mdev, \ arg->member ## _len = dlen; \ memcpy(arg->member, tags, min_t(size_t, dlen, len)); \ break; -#include "linux/drbd_nl.h" +#include /* Generate the struct to tag_list functions */ #define NL_PACKET(name, number, fields) \ @@ -129,7 +129,7 @@ name ## _to_tags(struct drbd_conf *mdev, \ put_unaligned(arg->member ## _len, tags++); \ memcpy(tags, arg->member, arg->member ## _len); \ tags = (unsigned short *)((char *)tags + arg->member ## _len); -#include "linux/drbd_nl.h" +#include void drbd_bcast_ev_helper(struct drbd_conf *mdev, char *helper_name); void drbd_nl_send_reply(struct cn_msg *, int); -- cgit v1.2.1 From 699324871fcc3650f2023c5e36cb119a92d7894b Mon Sep 17 00:00:00 2001 From: "Justin P. Mattock" Date: Tue, 26 Jul 2011 23:06:29 -0700 Subject: treewide: remove extra semicolons from various parts of the kernel This is a resend from the original, changing the title from PATCH to RFC(since this is a review for commit, and I should have put that the first go around). and also removing some of the commit's with ia64 and bash since it is significant. let me know if I might have missed anything etc.. Signed-off-by: Justin P. Mattock Signed-off-by: Jiri Kosina --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/block') diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 1278098624e6..2c09102adbaa 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -192,7 +192,7 @@ static ssize_t rbd_snap_add(struct device *dev, const char *buf, size_t count); static void __rbd_remove_snap_dev(struct rbd_device *rbd_dev, - struct rbd_snap *snap);; + struct rbd_snap *snap); static struct rbd_device *dev_to_rbd(struct device *dev) -- cgit v1.2.1 From e5de063016ce838aff08683ce38ac40211c247d9 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 1 Aug 2011 23:16:06 +0200 Subject: Remove unneeded version.h includes from drivers/block/ It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/block/. This patch removes them. Signed-off-by: Jesper Juhl Signed-off-by: Jiri Kosina --- drivers/block/drbd/drbd_int.h | 1 - drivers/block/xen-blkback/common.h | 1 - 2 files changed, 2 deletions(-) (limited to 'drivers/block') diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index a6ab1b28c61e..1706d60b8c99 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index 9e40b283a468..0d04c7fb7cee 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -27,7 +27,6 @@ #ifndef __XEN_BLKIF__BACKEND__COMMON_H__ #define __XEN_BLKIF__BACKEND__COMMON_H__ -#include #include #include #include -- cgit v1.2.1