From: Dan Carpenter Date: Thu, 16 May 2013 08:11:08 +0000 (+0300) Subject: pktcdvd: silence static checker warning X-Git-Tag: v3.10-rc6~20^2~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=104529661b645295903c5007ae632d2dd4029254;p=platform%2Fkernel%2Flinux-stable.git pktcdvd: silence static checker warning Static checkers complain about widening the binary "not" operations here because sectors are u64 and "(pd)->settings.size" is unsigned int. It unintentionally clears the high 32 bits of the sector. This means that the driver won't work for devices with over 2TB of space. Since this is a DVD drive, we're unlikely to reach that limit, but we may as well silence the warning. Signed-off-by: Dan Carpenter Signed-off-by: Jiri Kosina --- diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 3c08983..f5d0ea1 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -83,7 +83,8 @@ #define MAX_SPEED 0xffff -#define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1)) +#define ZONE(sector, pd) (((sector) + (pd)->offset) & \ + ~(sector_t)((pd)->settings.size - 1)) static DEFINE_MUTEX(pktcdvd_mutex); static struct pktcdvd_device *pkt_devs[MAX_WRITERS];