From: Thierry Reding <thierry.reding@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: "Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v2 4/4] pwm: sysfs: Utilize an array for polarity strings
Date: Wed, 28 Sep 2022 14:15:54 +0200 [thread overview]
Message-ID: <YzQ6+mX+75KBW9O7@orome> (raw)
In-Reply-To: <25705469f329005a4ff699d1f45a12dcb575adc0.camel@perches.com>
[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]
On Sun, Aug 28, 2022 at 02:19:22PM -0400, Joe Perches wrote:
> On Sun, 2022-08-28 at 20:40 +0300, Andy Shevchenko wrote:
> > 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.
>
> The enum is not userspace so it's not ABI.
>
> The PWM maintainers are free to do what they want but I
> prefer obviousness over compactness.
I do agree with Joe, I don't see any benefit in this.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-09-28 12:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 17:07 [PATCH v2 1/4] pwm: sysfs: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Andy Shevchenko
2022-08-26 17:07 ` [PATCH v2 2/4] pwm: sysfs: Return directly from the for-loop in PM callbacks Andy Shevchenko
2022-09-28 12:31 ` Thierry Reding
2022-09-28 13:43 ` Andy Shevchenko
2022-08-26 17:07 ` [PATCH v2 3/4] pwm: sysfs: Replace sprintf() with sysfs_emit() Andy Shevchenko
2022-09-28 12:28 ` Thierry Reding
2022-09-28 13:40 ` Andy Shevchenko
2022-09-28 13:58 ` Andy Shevchenko
2022-09-28 15:20 ` Thierry Reding
2022-09-28 15:21 ` Thierry Reding
2022-09-28 15:39 ` Andy Shevchenko
2022-08-26 17:07 ` [PATCH v2 4/4] pwm: sysfs: Utilize an array for polarity strings Andy Shevchenko
2022-08-28 2:07 ` Joe Perches
[not found] ` <CAHp75VfY5RgAju5ASvAp565oF6VmYYiuowNsPTGSm=+1iFJ98A@mail.gmail.com>
2022-08-28 13:46 ` Joe Perches
2022-08-28 17:40 ` Andy Shevchenko
2022-08-28 18:19 ` Joe Perches
2022-08-29 7:59 ` Andy Shevchenko
2022-09-28 12:15 ` Thierry Reding [this message]
2022-09-06 13:57 ` [PATCH v2 1/4] pwm: sysfs: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Andy Shevchenko
2022-09-28 12:31 ` Thierry Reding
2022-09-28 14:01 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YzQ6+mX+75KBW9O7@orome \
--to=thierry.reding@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox