lkml.org 
[lkml]   [2022]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 4/4] pwm: sysfs: Utilize an array for polarity strings
On Sun, Aug 28, 2022 at 4:46 PM Joe Perches <joe@perches.com> wrote:
> On Sun, 2022-08-28 at 09:40 +0300, Andy Shevchenko wrote:
> > On Sunday, August 28, 2022, Joe Perches <joe@perches.com> wrote:
> > > On Fri, 2022-08-26 at 20:07 +0300, Andy Shevchenko wrote:
> > > > Code is smaller and looks nicer if we combine polarity strings
> > > > into an array.

> > First of all, please remove unnecessary context when replying.
>
> I am _very_ aware of context.
> I specifically left the code in.
>
> > > It's less robust though as PWM_POLARITY_NORMAL and _INVERSED
> > > are now required to be 0 and 1. As the only 2 values in
> > > an enum they are, but that's not really guaranteed unless
> > > you read the enum definition.
> >
> > So, what do you suggest here and in many other similar places (yes, ABI
> > implied) in the kernel?
>
> Leaving the code alone.

It's good that PWM maintainers look at this differently.


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-08-28 21:56    [W:0.126 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site