Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp932395rwl; Thu, 10 Aug 2023 04:06:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGant+nUNBrwT2VSARIFps65cvnlUT5zZaBJeozs1VzYqAX8AqGlqwSoLYtVGLPAy41J6jp X-Received: by 2002:a17:902:d4cb:b0:1b9:be2e:2b40 with SMTP id o11-20020a170902d4cb00b001b9be2e2b40mr2651092plg.50.1691665579963; Thu, 10 Aug 2023 04:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691665579; cv=none; d=google.com; s=arc-20160816; b=JIq9/lU6G9kZUNN3vq4ywrldG2v9Qt5lbXXub1jMTIp/z1tAYHwZ0bAT4OAETWNbZS ++/31k3o8Z1uQSrBx/uGaPXFZ+cVQhLNFUkztX40y2MjzOj4QiD2TIjHVQycMe4OkkA6 6LyPk1fjuBdfMjJQhCYViQORy7/6Ngb+GFgBVap7bEPREMTVF2qJa/631XyEzFZvcW7y emuYK/h1eOr74mWRRejjU9zgK4PXZVMKYlc16pjrkt01qK5x8LlgyA8coBPuyobr/das DIOyCJ0Q8FhvhodKubVZdCU6ZyBl9BkR6lLL/MDvzD5y3g0P9S4f8Kr7DsV9YAOIuQay Pk/w== 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=IzGgdaSbIbO5607Bipi/BVOCslTkWPmDB2/kSSg0w98=; fh=nCGcgiVIx5ymNCRXryiWS0yd4AnK48PR3co9BG1Ngb8=; b=z7qKfm90g680oF+qoqL5QmMUZHHlo6X/+VlOAf71Fj+Zxq3XcSx4Da2ISuege6VNIr L5A3NDKPchfoGYLbt4x/3dA9BSBK9p0OdBy2tX3RNJkaZr8Pxh5bRkMCs6gO+FfMs4nX MT0sQpYjtg4qja1CnC2gYn/6yepZufUeiYtwafyzfhjHhMMvTplD/hRB1mbbecTJfwyr VqsAg6+z7VH/q/gaQ65Nd78EFjfywg9oz3lnD3dmXIlhGCqcTRooeasX7+JNSiLEjd+5 fHy6UpN9pZLA4FE+mZAAFETTfkNNrz1XDoU3eCjf1pGzAvrRwCLF1oFzKAZRV6MAqtaU o/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=GPvrgMmq; 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 f3-20020a170902e98300b001b8a8f7af21si1226281plb.557.2023.08.10.04.06.07; Thu, 10 Aug 2023 04:06:19 -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=GPvrgMmq; 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 S233027AbjHJKlR (ORCPT + 99 others); Thu, 10 Aug 2023 06:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234357AbjHJKlB (ORCPT ); Thu, 10 Aug 2023 06:41:01 -0400 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851481702; Thu, 10 Aug 2023 03:41:00 -0700 (PDT) Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-56d263da4f2so631308eaf.0; Thu, 10 Aug 2023 03:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691664060; x=1692268860; 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=IzGgdaSbIbO5607Bipi/BVOCslTkWPmDB2/kSSg0w98=; b=GPvrgMmq+chXVdFnEk9PGz2ydLogpF32PvUNg+4t9DmG3TwOcFvqJWeNdqylVbUIhQ RSOAX76SyLgThVlrNP/+88CJvg3E4dEH7qJ4Vyy8Bt2nZntX3FvEvRtfmLs3/tuk5dzP GUmD/GXjr7uC7TKx0t1UnP1ixWKazUF1DMqsQuMeulNN+XheZgG+AhrV/tJ57oWPrDuU 1SEldI0rfzBWNPOtcoHN324a/dA8j5zuIm7YJcf5gKgJznWRYWkw4dkKdwmsICGMAdFg yj+KFap3WeMmn2rGW8b391L6YE91Ka+XeW9AW6thBHYR8KVqhrvjep8hZHMjbtcElkTu YTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691664060; x=1692268860; 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=IzGgdaSbIbO5607Bipi/BVOCslTkWPmDB2/kSSg0w98=; b=U5o0dOBrAEgWeHU0aAfM/c3eqJ0qSCj9EC+N77gtnb+ZjR6sO+4W87qn5d8Rr2pBCW NKpNHZkM+MufIRNyJCwoyxz9YIRKe47VCqJoCX+hyI01TlVypX3b7SIhp2pcVzeKwepD JxvvEi6MMCE8fqfczwvL27MaEeLmJffH7wiVbBhpSTh28wSkJJsdbsZNSM4ybMHfGcMe 7tOXvNfEhDt6SAb6VMDZ/K9LEIx2ZPa2q4v+j/zcLlO4257JUPG+GGqSrif22AoIWYiS TXY29Ff97W3Gpuqm4OXsONWkvEz6ngWiWLTyiG2fsi6K9g24MUVC8fBj+4xfx0N/J7SM tlug== X-Gm-Message-State: AOJu0Yz2TkA9GVCIiXb2Nn72FGoe8nhBdtfcgOGYETbcViTFRozu0Nyy Ctv0raJu3hIWllL5TFZPCn7yJ5ZObYiVwJPW86EilNrbzrk= X-Received: by 2002:a05:6820:47:b0:56c:cd0c:1d67 with SMTP id v7-20020a056820004700b0056ccd0c1d67mr1616704oob.7.1691664059810; Thu, 10 Aug 2023 03:40:59 -0700 (PDT) MIME-Version: 1.0 References: <20230810074633.13111-1-coolrrsh@gmail.com> In-Reply-To: <20230810074633.13111-1-coolrrsh@gmail.com> From: Andy Shevchenko Date: Thu, 10 Aug 2023 13:40:23 +0300 Message-ID: Subject: Re: [PATCH v2] 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 10:46=E2=80=AFAM 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 ... > - gc->ngpio =3D sizeof(scu_rsrc_arr)/sizeof(unsigned int); > + gc->ngpio =3D ARRAY_SIZE(scu_rsrc_arr); And you need to include kernel.h for this. --=20 With Best Regards, Andy Shevchenko