mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
f722406faa
commit
104529661b
1 changed files with 2 additions and 1 deletions
|
@ -83,7 +83,8 @@
|
||||||
|
|
||||||
#define MAX_SPEED 0xffff
|
#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 DEFINE_MUTEX(pktcdvd_mutex);
|
||||||
static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
|
static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
|
||||||
|
|
Loading…
Reference in a new issue