Re: [PATCH] USB: do not convert negative transfer_buffer_lengths to positive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 05, 2009 at 11:01:11AM -0500, Alan Stern wrote:
> On Wed, 4 Mar 2009, Greg KH wrote:
> 
> > Oh horrors.
> > 
> > How about we just leave actual_length as int to allow this to work
> > properly?  Putting a negative value in an unsigned variable, while
> > workable, is just a mess.
> > 
> > How about the patch below instead for the whole thing?
> 
> I'm not so sure.  It makes sense for actual_length to be unsigned, so 
> it ought to be changed.
> 
> The code in uhci-q.c doesn't have to use pseudo-negative values.  I did 
> it that way because it was easy and because it would give the expected 
> output during debugging.  But it doesn't have to work that way.  Here's 
> another approach.

That makes sense to me.  I've taken your patch and applied it, and also
added another one for the actual_length change.

I'll repost all 3 patches now.

If you like it, can you give your signed-off-by: to it?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux