lkml.org 
[lkml]   [2013]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bnx2x: fix assignment of signed expression to unsigned variable
On Sat, Mar 23, 2013 at 01:45:11PM -0700, Kumar amit mehta wrote:
> On Sat, Mar 23, 2013 at 10:56:47PM +0300, Dan Carpenter wrote:
> >
> > The fix for this is more involved. The function prototype should
> > be changed to return an int. The caller should be updated to check
> > for errors.
> >
> I wonder, why these callbacks are restricting the lower layers to return
> only unsigned values, However Updating the prototype doesn't seem a good idea as
> then it would require changes in various existing drivers.

Yes. Everything will need to be updated. I've known this code is
buggy for years but I've never tried patching it because I'm very
lazy. :)

But actually it's only three drivers I think: bnx2x, ixgbe, and
mlx4. I suspect that most of the functions always return zero and
won't need to be modified.

regards,
dan carpenter



\
 
 \ /
  Last update: 2013-03-23 22:41    [W:0.030 / U:5.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site