From mboxrd@z Thu Jan 1 00:00:00 1970 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: devicetree@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