Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5104077rwb; Tue, 6 Sep 2022 19:06:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Q/2iYT/AlDVHqj7aDinQd28DDy5ObDu2KOmTscfrFoddF+QDzYabv4gLOIGQJxbwkfnW1 X-Received: by 2002:a17:907:3205:b0:770:8554:c4ee with SMTP id xg5-20020a170907320500b007708554c4eemr19275ejb.39.1662516396412; Tue, 06 Sep 2022 19:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662516396; cv=none; d=google.com; s=arc-20160816; b=I2GDtE/uo0dPP+hrbJxzqt2Jt8FXSLJ8dkrbo5neNpquXC2DUoMl0U+5WjIawba35Z 07ccuHAdKR/75Az0aaVORch9dAIMHkDf0NGZ5yIamrF1veEOxj+4FrE9By/Q0vXTaz2m Udff6QmsxGrEuW//NCKwWgPgRtrj0g9xyTbj2VRXfQY7U7a5rl4f1FmV50DScqS08i5w SYOBSuK3+mmWmajYBj5+7MuEBGMNcqZjkLcUjcwQW5klGllHehSDfXa8v6N1xfMT3EB5 Aj83MXnCPACou0cll2buvEMvRMieHFpPESp9vyUdy40bbocd4k7KTK3vE6bGnQb+0XQE ogTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YaCijregOqOjgcZeIED7JVmldRewR4dEphbJlxDQblY=; b=LAgXZQZ5ZPdGtMpO+iTu7eq1NA5iKJvC2aq/MeZRwKsc8V+5mmHqFacPKH/Fvhz8LD wK41+IhShVsfELxqrQ0nEzP5cJmpHrctZGwpL2w8r4BzxTz+GJiCi/FYD2Xj6S6xng1Z Uw5YCY7ubIeBtuBlxslsfeFYo1Wsh2vwe6clSc3sHyjP/pSy/cWzkxBalgWtL5EbdNbK jCaSJkhYdqRigpXpLZwMnxNiZkr67DnV9JmpI1JrqtLa22aMZ0+VRfem2u8li0OQUXVZ Pgk4rRwkdRXjeDp3BpnbSYKL15x1P1ruTznAEW05tS/qalkxYA7STKHm5rOqXWF50FY7 a2Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S9pRunUx; 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 b6-20020a50ccc6000000b0043cec8a1304si12567054edj.528.2022.09.06.19.06.10; Tue, 06 Sep 2022 19:06:36 -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=S9pRunUx; 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 S229684AbiIGCBH (ORCPT + 99 others); Tue, 6 Sep 2022 22:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiIGCBD (ORCPT ); Tue, 6 Sep 2022 22:01:03 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06641844E8; Tue, 6 Sep 2022 19:01:03 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id o4so13082556pjp.4; Tue, 06 Sep 2022 19:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=YaCijregOqOjgcZeIED7JVmldRewR4dEphbJlxDQblY=; b=S9pRunUxPC7r0e1w9yj0o8783wojVpjNhKP8jsT71wWMuWPsfUFzdJz0TJMPpqTsPB M+Ae8ANyYrV4Sep3x0VbDc+EnMue4OoEN8RpFTpOjPkluJnGT2cqlVh1JYNiO5h/tDGK RGVJLwVuP7GISwNRAdT5OiqdenVIGFNKEJzKBNq2q1BXIKHlp8tWKx0fxbOK8GA6DZwQ TZfa9JbPfMPcxWCYQlbaTpn5opve5VlejEuuBRLWTpxblG8WQDMhb5np+dyWJJ6kAEEW rXWcB3V4lQHvMssIFHI0kdZjP9pomfXdXnH1i/sJC8kJC91PlHbGOcBl6u1/CPq1k3ff 5tAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=YaCijregOqOjgcZeIED7JVmldRewR4dEphbJlxDQblY=; b=WxDUq3Zq8X3Rgc4b4WifMHhrdfV384FmuJ8jN1TY9qpsynBbpON8npbKBu1EmbSBow hRx7vF9EuhuALd3eriMzTB3F9jkXpXKOprButVLbX4LgKneL69guYPbWVGvB/IjE+uBk hVBZPmPKjaJ2DrOgeT7bTzNTyroF0NiKXbiF1hliemI+monJP86TTYjCftE7d1d7FOm+ r+lyCyXZecBvF93+c/rOatz0vVxdWNVLQ1iyOqR1rhG+q5cYLPv1FfwReqxZ+KjIGSqP CYb1w2B5crTaIM2jWuDTlGKR+8/go/hbm3HcuyfOuubDuJp2e0DeyPvuPz02B2rRGaxj k29Q== X-Gm-Message-State: ACgBeo1ymCE4OcJOM8zKViDHs1TKM80vVmLyO4oYaKmb9XkOvarpPem6 C2Vm3DhnjAKpDX+pnlnY0iw= X-Received: by 2002:a17:90b:3ec7:b0:1fa:cdc1:f66 with SMTP id rm7-20020a17090b3ec700b001facdc10f66mr28531683pjb.167.1662516062292; Tue, 06 Sep 2022 19:01:02 -0700 (PDT) Received: from google.com ([2620:15c:202:201:abc4:5d24:5a73:a96b]) by smtp.gmail.com with ESMTPSA id a206-20020a621ad7000000b00537d74f58cbsm2322985pfa.69.2022.09.06.19.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 19:01:01 -0700 (PDT) Date: Tue, 6 Sep 2022 19:00:57 -0700 From: Dmitry Torokhov To: Guenter Roeck 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 , Krzysztof =?utf-8?Q?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 , Pali =?iso-8859-1?Q?Roh=E1r?= , 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 Subject: Re: [PATCH v1 10/11] watchdog: bd9576_wdt: switch to using devm_fwnode_gpiod_get() Message-ID: 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> <73749107-35aa-0720-1a30-02a90c0540fa@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73749107-35aa-0720-1a30-02a90c0540fa@roeck-us.net> 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 Mon, Sep 05, 2022 at 03:09:05PM -0700, Guenter Roeck wrote: > 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 Guenter, individual patches are going through maintainer's trees, will you take this one? Thanks. -- Dmitry