diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-05-16 04:11:08 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-05-29 09:36:22 -0400 |
commit | 104529661b645295903c5007ae632d2dd4029254 (patch) | |
tree | ab4242f743136c1545ce1b336311c5c656ce4274 /drivers/block | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) |
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 <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/pktcdvd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 3c08983e600a..f5d0ea11d9fd 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -83,7 +83,8 @@ | |||
83 | 83 | ||
84 | #define MAX_SPEED 0xffff | 84 | #define MAX_SPEED 0xffff |
85 | 85 | ||
86 | #define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1)) | 86 | #define ZONE(sector, pd) (((sector) + (pd)->offset) & \ |
87 | ~(sector_t)((pd)->settings.size - 1)) | ||
87 | 88 | ||
88 | static DEFINE_MUTEX(pktcdvd_mutex); | 89 | static DEFINE_MUTEX(pktcdvd_mutex); |
89 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; | 90 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; |