[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-38-git-send-email-viro@ZenIV.linux.org.uk>
Date: Mon, 21 Dec 2015 23:47:11 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [POC][PATCH 38/83] usb_mon: get rid of pointless casts
From: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
drivers/usb/mon/mon_bin.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index cdc68e5..26d497b 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1305,17 +1305,16 @@ static int mon_bin_wait_event(struct file *file, struct mon_reader_bin *rp)
static int mon_alloc_buff(struct mon_pgmap *map, int npages)
{
int n;
- unsigned long vaddr;
for (n = 0; n < npages; n++) {
- vaddr = (unsigned long)get_zeroed_page(GFP_KERNEL);
- if (vaddr == 0) {
+ void *vaddr = get_zeroed_page(GFP_KERNEL);
+ if (!vaddr) {
while (n-- != 0)
free_page(map[n].ptr);
return -ENOMEM;
}
- map[n].ptr = (unsigned char *) vaddr;
- map[n].pg = virt_to_page((void *) vaddr);
+ map[n].ptr = vaddr;
+ map[n].pg = virt_to_page(vaddr);
}
return 0;
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists