2008-10-30 12:10:44

by Ilpo Järvinen

[permalink] [raw]
Subject: [PATCH] usbtmc: Fix type conflict


While making the other change, I noticed this:

CC drivers/usb/class/usbtmc.o
drivers/usb/class/usbtmc.c: In function 'usbtmc_ioctl_abort_bulk_in':
drivers/usb/class/usbtmc.c:164: warning: comparison is always false due to
limited range of data type

Signed-off-by: Ilpo J?rvinen <[email protected]>
---
drivers/usb/class/usbtmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 711a9fa..9f7fefd 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -134,7 +134,7 @@ static int usbtmc_release(struct inode *inode, struct file *file)

static int usbtmc_ioctl_abort_bulk_in(struct usbtmc_device_data *data)
{
- char *buffer;
+ u8 *buffer;
struct device *dev;
int rv;
int n;
--
1.5.2.2


2008-10-30 16:40:51

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] usbtmc: Fix type conflict

On Thu, Oct 30, 2008 at 02:10:33PM +0200, Ilpo J?rvinen wrote:
>
> While making the other change, I noticed this:
>
> CC drivers/usb/class/usbtmc.o
> drivers/usb/class/usbtmc.c: In function 'usbtmc_ioctl_abort_bulk_in':
> drivers/usb/class/usbtmc.c:164: warning: comparison is always false due to
> limited range of data type

I just sent a patch to Linus that did exactly this :)

thanks,

greg k-h