Commit 4d306504 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: bits and pieces

Independent minor bits caught by sparse:

 - paride.h mixing void and int in ? :, used always in a void context
   ide-iops.c return insw() - insw is void()
 - scsi/constants.c uses undefined macros in #if; added #define to 0 in
   case that used to leave it undefined
 - usb/host/hcd.h: fixed-point arithmetics in constant
 - fs/exec.c: missing UL on a large constant
 - fs/locks.c: #if where #ifdef should've been
 - fs.h: missing UL on MAX_LFS_FILESIZE in 64bit case
parent 8d6ded5f
......@@ -99,7 +99,7 @@ extern int pi_schedule_claimed(PIA *pi, void (*cont)(void));
/* macros and functions exported to the protocol modules */
#define delay_p (pi->delay?udelay(pi->delay):0)
#define delay_p (pi->delay?udelay(pi->delay):(void)0)
#define out_p(offs,byte) outb(byte,pi->port+offs); delay_p;
#define in_p(offs) (delay_p,inb(pi->port+offs))
......
......@@ -46,7 +46,7 @@ static u16 ide_inw (unsigned long port)
static void ide_insw (unsigned long port, void *addr, u32 count)
{
return insw(port, addr, count);
insw(port, addr, count);
}
static u32 ide_inl (unsigned long port)
......
......@@ -31,6 +31,8 @@ static const char unknown[] = "UNKNOWN";
#endif
#define CONSTANTS (CONST_COMMAND | CONST_STATUS | CONST_SENSE | CONST_XSENSE \
| CONST_CMND | CONST_MSG | CONST_HOST | CONST_DRIVER)
#else
#define CONSTANTS 0
#endif
#if (CONSTANTS & CONST_COMMAND)
......
......@@ -329,7 +329,7 @@ extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
+ USB2_HOST_DELAY)
#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \
#define HS_USECS_ISO(bytes) NS_TO_US ( ((38 * 8 * 2083)/1000) \
+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
+ USB2_HOST_DELAY)
......
......@@ -994,7 +994,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
return retval;
/* Remember if the application is TASO. */
bprm->sh_bang = eh->ah.entry < 0x100000000;
bprm->sh_bang = eh->ah.entry < 0x100000000UL;
bprm->file = file;
bprm->loader = loader;
......
......@@ -1816,7 +1816,7 @@ static void lock_get_status(char* out, struct file_lock *fl, int id, char *pfx)
: (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");
}
if (inode) {
#if WE_CAN_BREAK_LSLK_NOW
#ifdef WE_CAN_BREAK_LSLK_NOW
out += sprintf(out, "%d %s:%ld ", fl->fl_pid,
inode->i_sb->s_id, inode->i_ino);
#else
......
......@@ -599,7 +599,7 @@ extern void close_private_file(struct file *file);
#if BITS_PER_LONG==32
#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
#elif BITS_PER_LONG==64
#define MAX_LFS_FILESIZE 0x7fffffffffffffff
#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
#endif
#define FL_POSIX 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment