Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp552015lqi; Thu, 7 Mar 2024 05:23:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWRE4Ov+fcEvmd5PaUsqbRiG8a803xPPDiaAjFFd8VkymEaY1aV92Hxmg48Eefz2MqfhLjG9m1iV8k+WUhRj1JVQ2aWh8dnhEvVb6BeCQ== X-Google-Smtp-Source: AGHT+IG7VSPbMsSVPrsbIJXPBgSPaDxjvRl05VHoJ1n344MQg+eYbDpXd5MzjD43BurmXcckYrde X-Received: by 2002:a2e:8186:0:b0:2d3:ecf7:dbd with SMTP id e6-20020a2e8186000000b002d3ecf70dbdmr1439750ljg.0.1709817827341; Thu, 07 Mar 2024 05:23:47 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g40-20020a056402322800b0056817bc90fbsi591703eda.187.2024.03.07.05.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 05:23:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-95590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D3E591F21356 for ; Thu, 7 Mar 2024 13:23:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 357CA12C7ED; Thu, 7 Mar 2024 13:23:38 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 229713EA8A; Thu, 7 Mar 2024 13:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709817817; cv=none; b=X64wtfHaIqrI9Gh+VgQNKsrruMp+GT+7KoasPoTEhSb5P+xuYLoBc37cCZvi0QLEELT8Ph4/jKdOCBnbDrNUuaae4SnwfgV4YSd6XGjMwbzMelbRTP6fh9TkNX0KNLfEi5qNITb51T0/ievlRlowyWxxJ4CQJt4i6uBnLlssE5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709817817; c=relaxed/simple; bh=QDSw/onQwWE3aXFRC4Eip93K8ZRBf8/+gHveqY3AYt0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XxXz4TTpUoA23IUS0mW1XDSrITp0pU7wbpAcrIzKGSF4xctQ1QiJW3lZ6fkjqgzHV+2IDquEdcTlYDq6WUgKXb6sZdM87NhrdKVz5WWy37rPE9UoIdJtv3x7z64nHqkomd/BhSFy/mf6aP6odQltzlVUU9endjzZbhJsTM92VS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="8242519" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="8242519" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 05:23:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="914214115" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="914214115" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 05:23:32 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1riDib-0000000AZWB-1oTI; Thu, 07 Mar 2024 15:23:29 +0200 Date: Thu, 7 Mar 2024 15:23:29 +0200 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Chris Packham , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, lee@kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 1/3] auxdisplay: Add 7-segment LED display driver Message-ID: References: <20240306235021.976083-1-chris.packham@alliedtelesis.co.nz> <20240306235021.976083-2-chris.packham@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Mar 07, 2024 at 02:13:23PM +0100, Geert Uytterhoeven wrote: > On Thu, Mar 7, 2024 at 12:50 AM Chris Packham > wrote: .. > > + DECLARE_BITMAP(values, 8) = { 0 }; While doing next version, drop this '0', as we have in another terminator the same approach (i.o.w. for the sake of consistency). .. > > + gpiod_set_array_value_cansleep(priv->segment_gpios->ndescs, priv->segment_gpios->desc, > > + priv->segment_gpios->info, values); > > This may still cause an out-of-bounds access of values if ndescs > 8. Not really. It will be only for ndescs >= 32 (on 32-bit) or 64 (on 64-bit accordingly). But good catch, we better to narrow the range down. -- With Best Regards, Andy Shevchenko