Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp551356rwd; Sat, 27 May 2023 02:22:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YRnMkgQgtVjLotcAuuwJzPV+MskJScvIezG4NUNt7XtZIK4FkcaQS+g6DvHJUJ0LeEzFm X-Received: by 2002:a17:902:dac2:b0:1af:f8a8:5baf with SMTP id q2-20020a170902dac200b001aff8a85bafmr6121591plx.59.1685179346628; Sat, 27 May 2023 02:22:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685179346; cv=none; d=google.com; s=arc-20160816; b=j/lYKhUR4N4Pr/2B9WBwudpIEj/HiKkbR3TYy57JzKFqRw8gC+mCfI/309SufkMcPl 7TYtVJ6FlitWlRhhxPzp2B9g/XqhvWjbjW2t17rAY1Pv5zwKwnurezUvWXRURvlftR+Z H0mzSVNyh4dBhgcFb+KMPdISj6DyXny125I83wtkm9Dp5wuvKRFf9ux6hyatRAHqFQ5G MnEyxnDIF4Z8Hu60sB/dckD8UXhNRfSzovrBnYzNAKi9UaNZzWijzRB26v3JB51joMxn 3MkHDwAxnJLffaVM3YijcN691q8IQ2kdcRd3X7NczZsUB2NkBpISdFFKOOrGvFuGpSsh 8zYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eSgsXNlZ9MkjqF+lnPvWynRPo18ANLaiLC3RhE8NSRI=; b=A53DuY/2958MV2vQKfubKMBKykMEqOnc/2yviAP8PNNurZ0uffWHmlTo/P2gRnhMyO plUF1MssZaBXLYaLLpIHilojrhHLxjV0KO9Q82RD0z8NXXF7lPJpvBgkARm+F9TUPM14 Ucx1BkmhF4UCNnS/9Qs5E1FzQAfENA1Ph/2bHRXFmxRzP9sqG89vaYulFbNx9hRxAT4q picEr34V56hiZo2Ce14mZtdXBjoZ7EuEIrBNqc/9Rf44N9B5zlWxzLPMQS1Qg6A6hTyA cC1NzSv5MDE0dP/XQePd2N4thZ27U0747bGEWuYhrvWd/OOjmqpJfL5yAsoifD7af7KF /zjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WyidlPJa; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a1709028f8800b001ae45f0c55esi5755629plo.14.2023.05.27.02.22.04; Sat, 27 May 2023 02:22:26 -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=@intel.com header.s=Intel header.b=WyidlPJa; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231806AbjE0IyP (ORCPT + 99 others); Sat, 27 May 2023 04:54:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjE0IyO (ORCPT ); Sat, 27 May 2023 04:54:14 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683A8124; Sat, 27 May 2023 01:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685177653; x=1716713653; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ktI2GnKQXBYUpJgyqu0yKmTKYiR+/wbaze1GTqEtbk8=; b=WyidlPJa1SYObJpyTZY10Q4Pe5gORZdzSiXbJzyEbkgxdPu/xPK6V30V gxh5lklQbkQROrM0V9MCsuF4E9eO+FVqIgib0E5EfdeYEDSl9jFcgdETJ /2mFler00w0FhF7gTQBKt3KwolLP/bxcMcbRrHA8exYGkjZEyQdiBhrKt EKhofFmhXLiJJBbuA7AmP/89yy1wZtkFFY68JyhZlTSz+fM5ogG+0qt1J uykebhtq9NzIX8wqIxxWkWBZsgJinb7OLO3LePYykg4fCN6doXg0/3RVi 74yjxtpIF7wdSwJVbOIjaro5AVA7M37YhCZgtp4+z5+x0sAaMBS0pZiK5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="382629538" X-IronPort-AV: E=Sophos;i="6.00,196,1681196400"; d="scan'208";a="382629538" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2023 01:54:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10722"; a="736262786" X-IronPort-AV: E=Sophos;i="6.00,196,1681196400"; d="scan'208";a="736262786" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 27 May 2023 01:54:10 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1q2pgf-000Irv-0Y; Sat, 27 May 2023 11:54:09 +0300 Date: Sat, 27 May 2023 11:54:08 +0300 From: Andy Shevchenko To: Henning Schild Cc: Pavel Machek , Lee Jones , Hans de Goede , Mark Gross , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v4 1/4] leds: simatic-ipc-leds-gpio: add terminating entries to gpio tables Message-ID: References: <20230524124628.32295-1-henning.schild@siemens.com> <20230524124628.32295-2-henning.schild@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230524124628.32295-2-henning.schild@siemens.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 Wed, May 24, 2023 at 02:46:25PM +0200, Henning Schild wrote: > The entries do not seem to be stricly needed when the number of entries > is given via the number of LEDs. But adding them is a safeguard should > anyone ever iterate over the tables to their end, it also gets us in > line with other drivers that register "leds-gpio" tables. Reported-by? Reviewed-by: Andy Shevchenko > Signed-off-by: Henning Schild > --- > drivers/leds/simple/simatic-ipc-leds-gpio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/leds/simple/simatic-ipc-leds-gpio.c b/drivers/leds/simple/simatic-ipc-leds-gpio.c > index e8d329b5a68c..1a1cfdad6218 100644 > --- a/drivers/leds/simple/simatic-ipc-leds-gpio.c > +++ b/drivers/leds/simple/simatic-ipc-leds-gpio.c > @@ -28,6 +28,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = { > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH), > + {} /* Terminating entry */ > }, > }; > > @@ -42,6 +43,7 @@ static struct gpiod_lookup_table simatic_ipc_led_gpio_table_227g = { > GPIO_LOOKUP_IDX("gpio-f7188x-2", 5, NULL, 5, GPIO_ACTIVE_LOW), > GPIO_LOOKUP_IDX("gpio-f7188x-3", 6, NULL, 6, GPIO_ACTIVE_HIGH), > GPIO_LOOKUP_IDX("gpio-f7188x-3", 7, NULL, 7, GPIO_ACTIVE_HIGH), > + {} /* Terminating entry */ > } > }; > > -- > 2.39.3 > -- With Best Regards, Andy Shevchenko