Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1272249rwl; Thu, 10 Aug 2023 08:48:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGN1qHxKmas9l1eGhRpRKxSdV6S/l/P20Nw5bf8/BGAYEX9hW/TkKwtKpzi8M6iEjPlXLkt X-Received: by 2002:a05:6402:1a43:b0:523:b1b0:f69f with SMTP id bf3-20020a0564021a4300b00523b1b0f69fmr1253570edb.32.1691682485146; Thu, 10 Aug 2023 08:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691682485; cv=none; d=google.com; s=arc-20160816; b=TOvicejkMGrac3TnAxbp/1wZwgitM+d2UHYZCycLlRmQbrGO+dixAZ0PQtPP9yWoTr VBmQjIr+X53cPL/apVQgP7eOhRbjf59qBVmz72gpNqJScci3yj7DqAzKMVWRiOSHoqOc jlC7+rwVoNUBJBnS5U1/sN4Xc2IQMwzr5j1/93S0QGRwFyBlvG6vHTVn1wXGt+3jQ4Qd StSpw8qKvfSt82St4KbLVQ7ErYrwFDP0p+Ff/bVLV5WAI8SKASxK5C26Y50by8Y9Xvz/ f2Qd0C4CgHDMM1vQyKx5UeID3lJaqpoeel9MOX0w6mbX4iH8j+vBAlfgSvZvutfYTclF GWew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=B2gV1030sZCbxiS6NMaJx8ViLVSVMgkSZNa15D6K3vI=; fh=nCGcgiVIx5ymNCRXryiWS0yd4AnK48PR3co9BG1Ngb8=; b=hq7uF2kYYWNudvqDRENffR2pf7ilhUTtXOw5i5e8dbI9MiKrCpcB5ocPynAGiJAXxi q5E5KGzo6/VDR4Z2nDmP7emkFlAYhrqHbONSzz1mSJrXrSC9u71+Q5f6kZAQaN1CzXn5 onDcwDaYS7vurq0UtHWHmrHL4Lnc2GsDtE8wYu6+N7SitCh952eZXCYoJfM2kZQBNHVG LdqVc5+U8MIlg2uWaGFx1F28kqTjT99AOjm7dC+2PLV3lfY3IZVD5CVbGJxR1agTam3O tALAgtwbj+wEvTt08H0EcfAlW+DV+jwGLBsgWX5DIvfY9LEKtJwF6nOEk8vsS2AgQfBO yFNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=WvKmnKdT; 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 c6-20020aa7c746000000b005237a872472si1743543eds.37.2023.08.10.08.47.39; Thu, 10 Aug 2023 08:48:05 -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=20221208 header.b=WvKmnKdT; 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 S235802AbjHJOfK (ORCPT + 99 others); Thu, 10 Aug 2023 10:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235637AbjHJOfJ (ORCPT ); Thu, 10 Aug 2023 10:35:09 -0400 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46F826A2; Thu, 10 Aug 2023 07:35:06 -0700 (PDT) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1ba5cda3530so848241fac.3; Thu, 10 Aug 2023 07:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691678106; x=1692282906; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B2gV1030sZCbxiS6NMaJx8ViLVSVMgkSZNa15D6K3vI=; b=WvKmnKdTk7/vcpPkkquQKRnsM2nH+X7LcfB5W5JUec4VmYYP/79R/TlGfNw9UDw8iv g8gWOr48Fpd95EJOkiyJZWMnl2lAJH6lXxeYXpE5PAiJTaAdNDfJ1EKJP2xXYsAPPlWa zcJIpjJmJjZICDXmQH3twd5/kUR+UWW5PsbHTN9WkbjKjB3y0xNIAuYvGSatJtFf1/wz XKloZWdRDnM+CplcTo0EW5JyP/vQlcYL0Vd4hX/tuyTnCmHROO2YEH5WnULbwn5JnblI LX/xm57Tgu+A94keG6VVPxvUCWyLtQKAVLbBb8oVKwajV7dhgYhhVktmpBchiH9gcGxx mf3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691678106; x=1692282906; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B2gV1030sZCbxiS6NMaJx8ViLVSVMgkSZNa15D6K3vI=; b=N9o3lCTQ+YB5+yisUI8qawa/JnVcoi4r4qBgrg8+caBeyFyR1d/wwVE109/ToRZrlI GSRk/fcUt3Up2u05++o1CnVWJ/rAdmqW/va8aRXkHBC+nAqDPdrShH5YeEbH0ZMO5wd9 zCvwZWKHuRXekb1Zg/YmbRcYC85ZefL440XSqs8cnFFmYnjwl6EaUlwDoBGkE5g+wnn4 gdcK+WjpWJxfuYYl4VE9ZxegDrWa2A0NHh5FqBmsjqAlrlxhxrWp/5blX6rJuda4haCn vKD+dsyaQNM6hJ1DuPiup19ckr51Xlp+Ff+pAHabn5zed2tAriL/8trsGG2ib2KorPN/ tJPg== X-Gm-Message-State: AOJu0YxmTHmH93r1quZWTIzAiofa0QvabaAOImJ/h6tSY9XNJIEr+PgZ Ez3fPT7rIuZOYQW8dW97vZvWgDcq46BxkCdLu1Q= X-Received: by 2002:a05:6870:364e:b0:1c0:b4ec:c0fa with SMTP id v14-20020a056870364e00b001c0b4ecc0famr2865098oak.41.1691678106019; Thu, 10 Aug 2023 07:35:06 -0700 (PDT) MIME-Version: 1.0 References: <20230810130600.25616-1-coolrrsh@gmail.com> In-Reply-To: <20230810130600.25616-1-coolrrsh@gmail.com> From: Andy Shevchenko Date: Thu, 10 Aug 2023 17:34:30 +0300 Message-ID: Subject: Re: [PATCH v3] gpio: gpio-imx-scu: Use ARRAY_SIZE for array length To: coolrrsh@gmail.com Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Thu, Aug 10, 2023 at 4:06=E2=80=AFPM wrote: > > From: Rajeshwar R Shinde > > Use of macro ARRAY_SIZE to calculate array size minimizes > the redundant code and improves code reusability. > This fixes warnings reported by Coccinelle: > drivers/gpio/gpio-imx-scu.c:106:32-33: WARNING: Use ARRAY_SIZE Yes and this makes code more robust against type changes. Reviewed-by: Andy Shevchenko --=20 With Best Regards, Andy Shevchenko