lkml.org 
[lkml]   [2013]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/21] NTB: Fix Sparse Warnings
On Mon, Jan 21, 2013 at 02:13:50PM -0700, Jon Mason wrote:
> On Sun, Jan 20, 2013 at 03:45:34PM -0800, Greg KH wrote:
> > On Sat, Jan 19, 2013 at 02:02:28AM -0700, Jon Mason wrote:
> > > Address the sparse warnings and resulting fallout
> > >
> > > Signed-off-by: Jon Mason <jon.mason@intel.com>
> > > ---
> > > drivers/ntb/ntb_hw.c | 7 ++++---
> > > drivers/ntb/ntb_hw.h | 4 ++--
> > > drivers/ntb/ntb_transport.c | 32 ++++++++++++++++----------------
> > > 3 files changed, 22 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> > > index 18cb5dc..b792ccd 100644
> > > --- a/drivers/ntb/ntb_hw.c
> > > +++ b/drivers/ntb/ntb_hw.c
> > > @@ -104,8 +104,9 @@ MODULE_DEVICE_TABLE(pci, ntb_pci_tbl);
> > > *
> > > * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
> > > */
> > > -int ntb_register_event_callback(struct ntb_device *ndev,
> > > - void (*func)(void *handle, unsigned int event))
> > > +int
> > > +ntb_register_event_callback(struct ntb_device *ndev,
> > > + void (*func)(void *handle, enum ntb_hw_event event))
> >
> > What is sparse complaining about here that moving the function name to
> > the start of the line fixes? That shouldn't be necessary at all. Ah,
> > the enum? If so, why change the first line at all?
>
> All an effort to get it to fit in under 80 chars.

The original lines were less than 80 characters :)

> > > --- a/drivers/ntb/ntb_transport.c
> > > +++ b/drivers/ntb/ntb_transport.c
> > > @@ -58,7 +58,7 @@
> > > #include <linux/ntb.h>
> > > #include "ntb_hw.h"
> > >
> > > -#define NTB_TRANSPORT_VERSION 1
> > > +#define NTB_TRANSPORT_VERSION 2
> >
> > How is this a sparse fix?
>
> I changed the format of the header below.

Ah, ok.

Care to resend this without the first chunk?

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-01-21 23:42    [W:0.065 / U:1.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site