[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=Uv0JZDZ4adVkXN=Wkkv+N2EXnBsREx-bHyeeefYc4s6A@mail.gmail.com>
Date: Wed, 8 Mar 2023 09:35:14 -0800
From: Doug Anderson <dianders@...omium.org>
To: Saravana Kannan <saravanak@...gle.com>
Cc: Jonathan Corbet <corbet@....net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Abel Vesa <abel.vesa@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Matthias Kaehlcke <mka@...omium.org>, kernel-team@...roid.com,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v1 2/2] driver core: Make state_synced device attribute writeable
Hi,
On Fri, Mar 3, 2023 at 4:53 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> > > --- a/drivers/base/base.h
> > > +++ b/drivers/base/base.h
> > > @@ -164,6 +164,14 @@ static inline int driver_match_device(struct device_driver *drv,
> > > return drv->bus->match ? drv->bus->match(dev, drv) : 1;
> > > }
> > >
> > > +static inline void dev_sync_state(struct device *dev)
> >
> > IMO don't force inline. The compiler is probably smarter than you. I
> > could even believe that it might be more optimal for this rarely
> > called function to be _not_ inline if it kept the kernel smaller. I
> > guess that means moving it out of the header...
>
> I'm following the style of every other function in the .h file.
Right, that's why I suggested moving it out of the .h file. I see
plenty of non-inline function definitions in the header file.
-Doug
Powered by blists - more mailing lists