From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B37B3ECAAD2 for ; Sun, 28 Aug 2022 13:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbiH1NqY convert rfc822-to-8bit (ORCPT ); Sun, 28 Aug 2022 09:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbiH1NqW (ORCPT ); Sun, 28 Aug 2022 09:46:22 -0400 Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8572CE12; Sun, 28 Aug 2022 06:46:17 -0700 (PDT) Received: from omf20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C53CAB493; Sun, 28 Aug 2022 13:46:16 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA id 3DEF520025; Sun, 28 Aug 2022 13:46:15 +0000 (UTC) Message-ID: <2e158f8dc433b6b78d47d209495bed678d92369a.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 09:46:14 -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> 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-Rspamd-Queue-Id: 3DEF520025 X-Stat-Signature: 76zegqeqc9tix8aj9gskfzf6b7iatym8 X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX188JZ8rGYJxzNHOxcSKe4yGHz+58IHEFbA= X-HE-Tag: 1661694375-255221 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.