lkml.org 
[lkml]   [2012]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/2] PCI-Express Non-Transparent Bridge Support
On Thu, Nov 15, 2012 at 06:06:21PM -0700, Jon Mason wrote:
> > > +static inline unsigned int ntb_query_max_cbs(struct ntb_device *ndev)
> > > +{
> > > + return ndev->max_cbs;
> > > +}
> >
> > It is shorter, and simpler, to just write the '->variable' version out
> > for this, than to make the function call here. Why are these needed?
> > Especially when I see the driver code not using them. Please remove.
>
> This is used in ntb_transport.c. It is used to show how many
> interrupts, and there-by clients, the transport layer can have. I can
> make it a macro and/or put it in a header file, if that suits you
> better.

No, just reference the field of the structure directly, no need for a
function or a macro.

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-11-16 02:41    [W:0.043 / U:1.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site