mbox series

[0/2] usb: typec: ucsi: ccg: Adjustments for common code in two functions

Message ID b890361e-e99b-43da-8571-7478b5eab475@web.de (mailing list archive)
Headers show
Series usb: typec: ucsi: ccg: Adjustments for common code in two functions | expand

Message

Markus Elfring Sept. 25, 2024, 5:31 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 25 Sep 2024 19:19:01 +0200

A few update suggestions were taken into account
from static source code analysis.

Markus Elfring (2):
  Use common code in ccg_write()
  Use common code in ccg_read()

 drivers/usb/typec/ucsi/ucsi_ccg.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--
2.46.1

Comments

Dmitry Baryshkov Sept. 25, 2024, 9:26 p.m. UTC | #1
On Wed, Sep 25, 2024 at 07:31:04PM GMT, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 25 Sep 2024 19:19:01 +0200
> 
> A few update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (2):
>   Use common code in ccg_write()
>   Use common code in ccg_read()
> 
>  drivers/usb/typec/ucsi/ucsi_ccg.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)

For the series:

Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Andy Shevchenko Sept. 26, 2024, 12:12 p.m. UTC | #2
On Thu, Sep 26, 2024 at 12:26:24AM +0300, Dmitry Baryshkov wrote:
> On Wed, Sep 25, 2024 at 07:31:04PM GMT, Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Wed, 25 Sep 2024 19:19:01 +0200
> > 
> > A few update suggestions were taken into account
> > from static source code analysis.
> > 
> > Markus Elfring (2):
> >   Use common code in ccg_write()
> >   Use common code in ccg_read()
> > 
> >  drivers/usb/typec/ucsi/ucsi_ccg.c | 15 ++++++++-------
> >  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> For the series:
> 
> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

I believe there is no-one to take it, but in any case the thing is that kfree()
probably can be done using __free(). Then PM runtime handled differently.
Dmitry Baryshkov Sept. 26, 2024, 12:20 p.m. UTC | #3
On Thu, 26 Sept 2024 at 14:12, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Sep 26, 2024 at 12:26:24AM +0300, Dmitry Baryshkov wrote:
> > On Wed, Sep 25, 2024 at 07:31:04PM GMT, Markus Elfring wrote:
> > > From: Markus Elfring <elfring@users.sourceforge.net>
> > > Date: Wed, 25 Sep 2024 19:19:01 +0200
> > >
> > > A few update suggestions were taken into account
> > > from static source code analysis.
> > >
> > > Markus Elfring (2):
> > >   Use common code in ccg_write()
> > >   Use common code in ccg_read()
> > >
> > >  drivers/usb/typec/ucsi/ucsi_ccg.c | 15 ++++++++-------
> > >  1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > For the series:
> >
> > Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> I believe there is no-one to take it,

I guessed so.

> but in any case the thing is that kfree()
> probably can be done using __free(). Then PM runtime handled differently.

That's a separate cleanup in my opinion.
Andy Shevchenko Sept. 26, 2024, 12:27 p.m. UTC | #4
On Thu, Sep 26, 2024 at 02:20:19PM +0200, Dmitry Baryshkov wrote:
> On Thu, 26 Sept 2024 at 14:12, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Thu, Sep 26, 2024 at 12:26:24AM +0300, Dmitry Baryshkov wrote:

...

> > but in any case the thing is that kfree()
> > probably can be done using __free(). Then PM runtime handled differently.
> 
> That's a separate cleanup in my opinion.

Yes and for that we do not need an intermediate change, right?
Dmitry Baryshkov Sept. 26, 2024, 12:31 p.m. UTC | #5
On Thu, 26 Sept 2024 at 14:27, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Sep 26, 2024 at 02:20:19PM +0200, Dmitry Baryshkov wrote:
> > On Thu, 26 Sept 2024 at 14:12, Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Thu, Sep 26, 2024 at 12:26:24AM +0300, Dmitry Baryshkov wrote:
>
> ...
>
> > > but in any case the thing is that kfree()
> > > probably can be done using __free(). Then PM runtime handled differently.
> >
> > That's a separate cleanup in my opinion.
>
> Yes and for that we do not need an intermediate change, right?

I don't have a strong opinion here (and I don't feel a strong need to
move existing code into using cleanup.h just for the sake of it).