Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2436042rwe; Sun, 28 Aug 2022 11:22:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR4qUR43nEW7XMzOz1ePtjffNIAHPXN17LF3cNQfD9qgkrarZezhqjWpVye2i1on6ObdGmRu X-Received: by 2002:a17:907:3e07:b0:741:7db9:eb74 with SMTP id hp7-20020a1709073e0700b007417db9eb74mr1866935ejc.83.1661710943540; Sun, 28 Aug 2022 11:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661710943; cv=none; d=google.com; s=arc-20160816; b=dcctqRpxm4N2SmHVAGVmlDse9NU2SiO4EhuR8wwqrH9fALXeWcA1lvvxHtudlyzvJy kwaLCGn69796LGLJSkSlepq51C83VtaqfFdqK+iE01wJscDCsbYTM6qPsewSzdiZwQmi yjhXYp4lPWZ045naLHZ6YomhidjxvwLAGFdpTA0DtdHKGDgjyc+kv4cA4NLs4zMeqGp+ GIrGfAEcpd6Rw8kjZpa2odZ+ssAU8x2dwVx2WY6lbYI3oasDVGyum+/H6khY5MuuG5L9 Xkro8jf4cVgA84PHxab4+u3Kbue6gLWNq95zgtoodq5n2meXVb80iY7jwAyMAwQGk9e5 ZAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=vovxsGeMh5Pw1isaZ0o1jt4xq8E0c9BQwpAqSRF/GQs=; b=OgomiKLHz/SnEgkCEfbwgdmjTnDTpSdJNBPjKYmzKZF1a+1g2Ut7grg8L4OL7HGfo6 4SKaombyRoog7lLJ1iZD1qCaU5rAkzQLAeK9i5oa6GBftc9uMzr4+q+debboSTzXIWLf ZYzsjcr/1OjCBWXMDY+judIDNXM6pmOy//A1KIrEPzW0qePPMlxo/LqkQnXTOOJZ8hfs sKs8OEijSH1BjAeLHVOm+aGOW0HhymSuRnaldr0Ql+XV0nZdwGYn+g/vB7x1pMYyDuEL dDsWNuKgjHclic5GI4gvGaWvwSo+434iw/vDRoq3gGJ9qmiM3QhvpMLyrmB6TI3izKh/ /cww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a0564021f0e00b0044849e3fd52si2037453edb.286.2022.08.28.11.21.55; Sun, 28 Aug 2022 11:22:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbiH1STk convert rfc822-to-8bit (ORCPT + 99 others); Sun, 28 Aug 2022 14:19:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiH1ST0 (ORCPT ); Sun, 28 Aug 2022 14:19:26 -0400 Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A160F26AF0; Sun, 28 Aug 2022 11:19:25 -0700 (PDT) Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 85B4BA08C0; Sun, 28 Aug 2022 18:19:24 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA id 427266000A; Sun, 28 Aug 2022 18:19:23 +0000 (UTC) Message-ID: <25705469f329005a4ff699d1f45a12dcb575adc0.camel@perches.com> Subject: Re: [PATCH v2 4/4] pwm: sysfs: Utilize an array for polarity strings From: Joe Perches To: Andy Shevchenko Cc: Andy Shevchenko , "linux-pwm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Thierry Reding , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Date: Sun, 28 Aug 2022 14:19:22 -0400 In-Reply-To: References: <20220826170716.6886-1-andriy.shevchenko@linux.intel.com> <20220826170716.6886-4-andriy.shevchenko@linux.intel.com> <5ba98dbd91dc981ec7384484b2a498805abef6b0.camel@perches.com> <2e158f8dc433b6b78d47d209495bed678d92369a.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Stat-Signature: njsqjytwjmkwzj5sqq7r1n5jckk7dxyr X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 427266000A X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18/vqjLL/pG4e8NYe4xDSDL11Wp8Rlsh0k= X-HE-Tag: 1661710763-657123 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2022-08-28 at 20:40 +0300, Andy Shevchenko wrote: > On Sun, Aug 28, 2022 at 4:46 PM Joe Perches wrote: > > On Sun, 2022-08-28 at 09:40 +0300, Andy Shevchenko wrote: > > > On Sunday, August 28, 2022, Joe Perches 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.