Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2417493rwe; Sun, 28 Aug 2022 10:53:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4YzRcMHZfmrG6DRjQFQ/WWRHUcDZANnaxgscaBYkTVC+e5ENzeJR8vcPgv5e3eqSa0PI4+ X-Received: by 2002:a05:6a00:1910:b0:52f:13d7:44c4 with SMTP id y16-20020a056a00191000b0052f13d744c4mr12776182pfi.32.1661709191530; Sun, 28 Aug 2022 10:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661709191; cv=none; d=google.com; s=arc-20160816; b=qNTEXp/6ShNwKpBPFcNzTXQljKiGGtng8xWp9dfVNqyLp0fAi1pA812I8WzAUTsU24 m+7+x9nJKiVRg04Nj0SIS0sJS3viSry184YlDxQ42ay4USmR10s/dvzAdbC3agXx9S25 hHONEqFtYe9iox2NIcUrSaxd2SqKHrgjaGO2KgWME65S2MKu0HUTLPRu86qz7Gk6x6DV F+we++UKYH+sz9YfSm/MV6arKjSlbOof0byY+z9BTCH6dWaDLWb9TPhhiP7EEutK3huP pRT041j9n8VROHsODQdawK5/s5g3c5lmpzKDW21tYdhEBJgTEOcCEF8B73Sk2Ol995xQ uw4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=i1mP7jpO74pdVbtbN8wurpi9V0XxlBqETkezrbartW4=; b=ULL2TeBFzQim45PgAjXP5XDQDrFNiMKyKX0s+gLz996n3Yu7sff77wyfxuNQPwoIvc 7M0I4j9L4ohhvWSuJ8HytDZu+qa/A2cu9CrtBbcdLVAlzKO+HTYP2/6bCgrPHRl+bJdk JEj22h04S0Y81KG92B0BuvFeJnIKAKK24No/XiL7TF6XcJXk8KHaSIbKG5atqHhi/JcS h/1sGxJZdowapSoh2P96HWAE0YKoyE1q6hUt1AF8kpSAiK4d1jhubQTGNozK1qhCiWcF J0oSFrjmi6QvP1/Bijj6MxVheM08q6ycT0536Iyby6zVhAnOYZBIARi1nH7K5xwjE+9E 7NXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C7VYoiTH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a63e015000000b0042b438dea0asi7418903pgh.655.2022.08.28.10.52.59; Sun, 28 Aug 2022 10:53:11 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C7VYoiTH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230225AbiH1Rk4 (ORCPT + 99 others); Sun, 28 Aug 2022 13:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbiH1Rkx (ORCPT ); Sun, 28 Aug 2022 13:40:53 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7667DF5BB; Sun, 28 Aug 2022 10:40:52 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id d1so4859433qvs.0; Sun, 28 Aug 2022 10:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=i1mP7jpO74pdVbtbN8wurpi9V0XxlBqETkezrbartW4=; b=C7VYoiTHyjEKDMKv7Tn1E999lqOQzQ5G3EpP5v7YPSA3+kQiQdK2xMfOh4UQ15mUj1 YGBlk+Y49Cm4y93H3AgOqvpdVQm68g1hA5S0EmCvpcNeUHXZR1i4Xlm84itGMWqaFGGI Yf8dXr1OC1SyY7t+MahbhB5QsSSM1h5/frzzvWJJpjO9XUtaeGFCTxUfyDAFgE2p51he hkLARtPbxPvfjOas2bflSY/59VuOR/683N+klAQ//ymPiubI1Lmi4hGxPF24c41LV9bY 1JRWtO6Vsgq4M/FsUNNJdrZzFp/7PaDDdyqBFYGgaF69eo0FuobdWrQf4C4SSbhkCXRF 6m1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=i1mP7jpO74pdVbtbN8wurpi9V0XxlBqETkezrbartW4=; b=CfO374k7i8iefkqNBsT1w3aF0cLLoTsxwL+eYp/o6lCW+s/SR5W8uXJRU5pBwUoNvN pB+UAr30b71t7j/xDIAv93Kkl1vIbqO6M4zcazVVbjrhDc46DMC1+ZsfvXNdf1oY+jbz GS4gf9Cr7kdlNlzFDX6FrSCi/om4ojZEPhaKQnvg7tDAN/qQH8L3pmfYTDQGpGBQvk5E GT+QkVTNwjQ0ETNNlCS9bryGEJGm7p+MaL3VeESDZottstgoCe4i1MvjMj5ejwv83sIk 7vuL0nGMH7MTU3wlESxKDrc12KbnY/OR8UPyL+UvsgMZro7AQDpS98qxS6XdrsVXRVSf GxzQ== X-Gm-Message-State: ACgBeo29YVhHl4xbeukr35lL0DzuY0XjjPEEbNVMQBxbH9V1lkeRkDO0 66L//3zXen0DcgY5jbOfUliRC2QUma3HBLVFoKk= X-Received: by 2002:a05:6214:2022:b0:497:2c03:61 with SMTP id 2-20020a056214202200b004972c030061mr7749081qvf.11.1661708451573; Sun, 28 Aug 2022 10:40:51 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <2e158f8dc433b6b78d47d209495bed678d92369a.camel@perches.com> From: Andy Shevchenko Date: Sun, 28 Aug 2022 20:40:15 +0300 Message-ID: Subject: Re: [PATCH v2 4/4] pwm: sysfs: Utilize an array for polarity strings To: Joe Perches Cc: Andy Shevchenko , "linux-pwm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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, 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. -- With Best Regards, Andy Shevchenko