Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3607873rwb; Mon, 5 Sep 2022 15:11:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QjEYGtF/8RKEyzPJHQGwndzWyBvbmuQ7MNDm0YxZ0KjscgM+uM9kG69fvWrTSg+PrPrs+ X-Received: by 2002:a05:6a00:140d:b0:52a:d561:d991 with SMTP id l13-20020a056a00140d00b0052ad561d991mr52067924pfu.46.1662415912783; Mon, 05 Sep 2022 15:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662415912; cv=none; d=google.com; s=arc-20160816; b=RV8RGbIobEB1QiqHnYSxKbY3xYMNOwr3V0u+xA7zX1+kGLOd5YnX50WnAuJNZJXOFB gDkX30p3YDkRr5PKePlr2wX0NJUhBpGDtQ6l+E7weLzuVUwCMIha0paQKSX+4sDQLzpy vWPGin24OasoPuPoatp656mQ5YrxRfXKcq/YTVIXdR7JXQLmw5PcNw1MiGlUiADZAHhj +i6cVjzZTw4jTTGzdunSJmCpa+WPm4RiLvh18piPc5JgThT8Lc+z2kJ3IBst+ndzzFtG AE4Bj11eulrVE6CkzbZyvOUvPigHnNlEIJrJfGqMpxNgLyX2/cVYlBjKg64H4cfZHba7 lkRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=7X66Mhu89Nd1JC1tC2C3GiFsxMesGQdlZVFrlo9aYm8=; b=G7ohPDH5DG1UKApcEloekd5fhXJgAGG88scV+lK6nYxgG1b5FEOUk2ZW7ikCad9U/V YCXgdLB2mzfBvGjr508cc7BvtAfN6cDrvGhxr7f5lQhPxJNDHGolliVfxkWipEacz5cz 1TgfknT86ZDeyTa2k/LJhtblinlKFmUaJeNgSlh9eCaIMnzGqTUNkBRRxDklS3BlDAZQ 8sjwMnR/gcVGfBDhyEtehph86C3aIReu5lh5tG7kut8gbCwvz2P1g7DPakakQoaY6iSU 0EbHIvpUhE7EM7xkyS87ELXGRL8zSfhZ8Dr3W5H6VEMUjnGqQYjCdrkfXt8rlZMUHaMv lFuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b7jRxWPy; 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 t4-20020a17090aba8400b0020038eb8b5asi6497780pjr.21.2022.09.05.15.11.40; Mon, 05 Sep 2022 15:11:52 -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=b7jRxWPy; 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 S229546AbiIEWJg (ORCPT + 99 others); Mon, 5 Sep 2022 18:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbiIEWJK (ORCPT ); Mon, 5 Sep 2022 18:09:10 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E24E351A0D; Mon, 5 Sep 2022 15:09:09 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id r69so9003507pgr.2; Mon, 05 Sep 2022 15:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date; bh=7X66Mhu89Nd1JC1tC2C3GiFsxMesGQdlZVFrlo9aYm8=; b=b7jRxWPyK0Rq4w8FR9ZFdzOAagpu8Ly97+vIsJC3Zr3BYQL9lMVB+ShDYBZ2D8gDRn iG42XCqTvMR/etwnUxtVq4dc6kjBUmYkBG8G+Uq0g4SiQD+aD7FdS44c68HxkrxInjmX rQwIEiXivv7vBIj5Sf8Y65QbFkdKpO+b+xgFODtb9auHWLSyyRIc9buVgrGAtV6dAmSk vw5WAxq8xcLg9s7lPX4OmewpOzfHhIQkLGIRLhUtapokGcK0j0Egcpyqr1AShiOI+SGy eWqxW4Icxyq7dn3JsNejnG/2tlPR6tqehYrDr8AxyduISs7Ol7B5gyVkSMCzO9kplR/h RRBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date; bh=7X66Mhu89Nd1JC1tC2C3GiFsxMesGQdlZVFrlo9aYm8=; b=DeBANqo0eak8ewOZv7MDuBTc5gX4zDq2EnL/NztyRFAjwJ3C7CXRTxOzYwsrZ3itWe UIVJ5H5IwJjIEhmMrBA6EYLJw2lpMPhtGCbFtl0E8+3COg/UorqmvSZml9Yu9XmJLRpp 5HeQRAnr4pazqoXtbLxGkOen1HpNBWWo58a47uaH0hbU4fsFWTS+R2BON8ba0rtKQ/1q T0K1rtLDeXPAVFNwxtwYNp//GkLEq2/YoBkg7V+OszkI0xSiKKUosbYV374jnv2qwOzY EQ7h5qmA6eudedi6F837KsCRjKRJ/69/6H43gYpqMoI+mH68dLtdncnQzsPM3dXyUVEf X0Ow== X-Gm-Message-State: ACgBeo1WkHUh2xgsy86TkHTRqR+PGvaCgrYJAaDDC5YOU3SilSVk+iR0 ht94UXORt7mwoRkaUifYegI= X-Received: by 2002:a63:6e09:0:b0:430:663:7757 with SMTP id j9-20020a636e09000000b0043006637757mr24953820pgc.340.1662415749460; Mon, 05 Sep 2022 15:09:09 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id f9-20020a170902ce8900b00176b8f587efsm2127192plg.148.2022.09.05.15.09.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Sep 2022 15:09:08 -0700 (PDT) Sender: Guenter Roeck Message-ID: <73749107-35aa-0720-1a30-02a90c0540fa@roeck-us.net> Date: Mon, 5 Sep 2022 15:09:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 10/11] watchdog: bd9576_wdt: switch to using devm_fwnode_gpiod_get() Content-Language: en-US To: Dmitry Torokhov Cc: Andy Shevchenko , Thierry Reding , Mark Brown , Matti Vaittinen , Lorenzo Pieralisi , Claudiu Beznea , Liam Girdwood , Wim Van Sebroeck , Greg Kroah-Hartman , Miquel Raynal , Linus Walleij , Felipe Balbi , Alexandre Belloni , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Vignesh Raghavendra , Daniel Vetter , Thomas Petazzoni , Alexandre Torgue , Marc Zyngier , Richard Weinberger , David Airlie , Nicolas Ferre , Alyssa Rosenzweig , Bartosz Golaszewski , Jonathan Hunter , Rob Herring , Maxime Coquelin , Bjorn Helgaas , =?UTF-8?Q?Pali_Roh=c3=a1r?= , LINUXWATCHDOG , USB , "open list:GPIO SUBSYSTEM" , linux-pci , linux-tegra , "open list:MEMORY TECHNOLOGY..." , Linux Kernel Mailing List , dri-devel , linux-stm32@st-md-mailman.stormreply.com, linux-arm Mailing List References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> <20220903-gpiod_get_from_of_node-remove-v1-10-b29adfb27a6c@gmail.com> <75e60144-9fa2-d6ba-bc92-edd23f7e7189@roeck-us.net> From: Guenter Roeck In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,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 9/5/22 12:47, Dmitry Torokhov wrote: [ ... ] >> We know that count is either 1 or 2 here, so strictly speaking >> if (count == 1) { >> } else { >> } >> would be sufficient. On the other side, that depends on ARRAY_SIZE() being >> exactly 2, so >> if (count == 1) { >> } else if (count == 2) { >> } >> would also make sense. Either way is fine with me. I'll leave it up >> to Dmitry to decide what he wants to do. > > My goal is to drop usage of devm_gpiod_get_from_of_node(), beyond that I > do not have strong preferences either way really. It is probing code, so > performance is not critical, but I'm obviously satisfied with how the > code looks now, or I would not have sent it. > Good point. Reviewed-by: Guenter Roeck