Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1113376lqo; Thu, 9 May 2024 05:20:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9EpW1r3+uPzgU2EZ+loWOriNSfAoMRyLMit8QDKyWNbHkrb8Vz2+QIpROb/qaxvQQ/iSlC/ifBQD/1cTFe2A8p+rfHa6BdMEjr1VEUQ== X-Google-Smtp-Source: AGHT+IEedSURDUg3OTMDwgSmAtvf2GXr8vYq4IgZFpWuXvezIkPGVxR88XWWfJw8z+oxXwHMyREv X-Received: by 2002:a05:6214:29ef:b0:6a0:5ad6:54f4 with SMTP id 6a1803df08f44-6a151498589mr54442006d6.33.1715257235110; Thu, 09 May 2024 05:20:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715257235; cv=pass; d=google.com; s=arc-20160816; b=GGHOKfSlLIbEzLxzFmH+wXH3nb2cD2vJM68F9VsK5QaSH+EM+PGgDDphStb25fvuBe GIEigOH+DCTFdQ2XsTUXRP2iUm9ag/ChxxBUbv5iErEk2E9rrEsbsvceTzqzl/Vgj3Y7 duNeK1cKlyFaojrmGLv9iXnc9o2+/qSqLysUWH5NTsa2NzbFNtlVmdSySJUasG+XD6T2 yFOVaQYQTA7Pld1/mkKeK9u/uamr1+nltISRyyaOh1rh5pfOsxtCv67s4BSrLZeejTbk yz6VcJPzVf3raTfI8+YB7z3saj4QwHlyNuu7VU3XmERq4xbp2viobgYa4+BnLs4HeB7Z 49JA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dkisUgfJ/HblULYSjCmN0oQsWAVyLQKoNTIUvig1ibA=; fh=sYbK5hJpvjTSFBgLnjWV9CzpHIgduuTKNUxkdne/KhQ=; b=S4+rRjv1mnlyJkxYhIRYhKpEIGwqKc3sHHs8D0Txhqf5/kmP7Bj0nuZNbziOGSMlnA 64Xb/YfAo09vnGrA9M24AzV1x80gjPpMUl8SssP6PpBMpcKmXNJiiubmNr/95qdJzhrh Cj9Vxv+mS5v4Q3ufKnuwlu9db5KK0XYrqUh+7SsF377U1qKQM6I/EvwIg56cwACSIQxt 4Zga2zUqK15PaeWVZpvxY+IX8fvBhk9SB/exUL9+EE3KlAjUotQzLF6nnexJ/ujfk0RY LJJvkRr8UJPbzo4Hma9AXHhJt5BLo51TzxKU9hJdhSmpTWnspmS6XdG0NxOWbUkmtMAm Vn8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOw4Qrg0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174490-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174490-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2ef76csi13851816d6.450.2024.05.09.05.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174490-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZOw4Qrg0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174490-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174490-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D0B931C22001 for ; Thu, 9 May 2024 12:20:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E08E14BFA2; Thu, 9 May 2024 12:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZOw4Qrg0" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AB42414B091; Thu, 9 May 2024 12:20:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715257226; cv=none; b=YdLJ49ekwLeEPivWDOuwyARZpwm4HTrmPDf/Mbg0Kka2hjpE9gnOYe0IPU4iTT5/CumdrxpgJkR98I30OTA3CJgS0/MI/xxs1ycEp3cOirTcF6GomDC/7Xm8VDe+mX/jxn1DuEpIiqga6Ukwu+/WdT+9+dwarofnH70A30/Znfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715257226; c=relaxed/simple; bh=h3t85u57Kt6KbmQLMuFWHWJfsb393pB2tMS6O7Z9wvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RfMB/nlsnwuvctMrqNgmg/voYbfn4MSiG+86Is8/q3dsJjGERVD8xLGhuI0nMvLEFW4Ad3nm633UI8QelAsdjVZ5AzFcOB6J0qoGEwVPeMPYaGtchcd8iMPQSZwuXWxJSkAXZbtf29iEIqtpbwE5Ux4JWm6o4chIQfUGewCGzzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZOw4Qrg0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B836C116B1; Thu, 9 May 2024 12:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715257226; bh=h3t85u57Kt6KbmQLMuFWHWJfsb393pB2tMS6O7Z9wvM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZOw4Qrg0aNgq0oMW7VJ0fFngyxp1MXdaeU/9D+WUoZIYuKgDpjrRlj65e3/q/Nt4n idN8MagmO1eHsVaVHAoeJsrmW0l8QfJXJJP4c4/n0k76ZBcIyJvi9yn5CFVx/PIN9J 0wQHsrVzXHA14ua9Q28S2yUKNWAfHFOyo0KrklxoURlbVW9IKxHplost4PXb7jzoV0 4xpa0wmyT6ctPpRuZilSZWxxb2TglsDf1M8HgwgQwQNJ54yb5E+080bdpxW58FvcPg bZOYcui7rSUfjaCHKAGPJCBUzLsR6l/BgGxmMndrV8eG+l4kHWmyR1fu5p0S5e03Ub QM7iOudQiY3lA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1s52lC-000000004oO-0DEd; Thu, 09 May 2024 14:20:30 +0200 Date: Thu, 9 May 2024 14:20:30 +0200 From: Johan Hovold To: Andy Shevchenko Cc: Stephen Boyd , Bjorn Andersson , Johan Hovold , Lee Jones , Linus Walleij , Mark Brown , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Das Srinagesh , Satya Priya , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 12/13] regulator: add pm8008 pmic regulator driver Message-ID: References: <20240506150830.23709-1-johan+linaro@kernel.org> <20240506150830.23709-13-johan+linaro@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 09, 2024 at 03:07:02PM +0300, Andy Shevchenko wrote: > Wed, May 08, 2024 at 10:37:50PM +0000, Stephen Boyd kirjoitti: > > Quoting Johan Hovold (2024-05-06 08:08:29) > > ... > > > > + BUILD_BUG_ON((ARRAY_SIZE(pldo_ranges) != 1) || > > > > This should be an && not || right? > > > > + (ARRAY_SIZE(nldo_ranges) != 1)); > > In any case BUILD_BUG_ON() is not encouraged for such cases, it would be much > better to have a static_assert() near to one of those arrays. I think the reason it is placed here is that the above line reads: rdesc->n_linear_ranges = 1; and that would need to change if anyone expands the arrays. Johan