From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFB44C6FA99 for ; Sun, 12 Mar 2023 17:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H4bd374DZtn901bygGrdsiHxFujjvkaGhAr9xRy5PFg=; b=A3zjLM5x/i0EAv TueTHNH+FDik/eosl+GcIdYsAopSZAmUxmZwNZrpNr0GzxZGqNiaKwMyVfYdp49mYRKikqQvSukZy FpNKWIJAOTkXjdLPRl6qutLDXYUx/nI3VjTzHAwFQBPqWqXw9LjYVjjCCvVMWwnQIXANNtOQci2e7 /ZtoTR2B50wx29FfdeFRp5DeCk9z8Ug3MP3RjR0BlQsxQ6glxbyNhwe2KRpCE+CyyVdb9ytqgaNKI 0sv/qyFpeKRh/ngnFJrg6mtdcTH8IeG4DSqMAM5c9cwk6QQT+dLxjm9jgOPs1zEgTcx6UUHWukOkW uPN+E8aoxxCbw1QJXCuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbPl7-0035zd-Lg; Sun, 12 Mar 2023 17:45:25 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbPl3-0035zB-J8 for linux-arm-kernel@lists.infradead.org; Sun, 12 Mar 2023 17:45:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AE21A60F8A; Sun, 12 Mar 2023 17:45:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF26EC433D2; Sun, 12 Mar 2023 17:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678643120; bh=YEdUsPYrGcfGa+1Q3JmQqtfsYE5Mu9KqGWmOkv1vGKI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Gk98wvfrmLxkM4Ks+krsYRFLGE6WEwv7U2tXorF44jRdMofBAiXmSqqZqI8CTSiN2 OgYYzaj5Cg7CUn+r2S31ClA460gZ4dkvHFwjpfLEIwb/WVf2kAMpUMAWsi+5Tydj4x Nh/TtzDfdK55WHLLxNY+O5tjarroB1CDdJpU1S9WGISW3I9RL333LCPHFgGb29fqHF dbWgYQaZBogboZDqgiH/0x+FSQyLXOBV/AlJL26RUht6XZnCGDQTedFM3+BpUqPXG6 KeYEMLYqX/DYy+62AH9YvN+vLPMlbW3iGngYV2AIXN6lary3MvfQVvBgOvlaVBBLTo k3rVFg2kAIvbw== Date: Sun, 12 Mar 2023 17:45:24 +0000 From: Jonathan Cameron To: Tom Rix Cc: lars@metafoo.de, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, fabrice.gasnier@foss.st.com, olivier.moysan@foss.st.com, andy.shevchenko@gmail.com, yannick.brosseau@gmail.com, nuno.sa@analog.com, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-specifier to static Message-ID: <20230312174524.75e55ce8@jic23-huawei> In-Reply-To: <20230312161733.470617-1-trix@redhat.com> References: <20230312161733.470617-1-trix@redhat.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230312_104521_761097_CB250EED X-CRM114-Status: GOOD ( 18.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 12 Mar 2023 12:17:33 -0400 Tom Rix wrote: > smatch reports several warnings > drivers/iio/adc/stm32-adc.c:2591:20: warning: > symbol 'stm32_adc_min_ts_h7' was not declared. Should it be static? > drivers/iio/adc/stm32-adc.c:2610:20: warning: > symbol 'stm32_adc_min_ts_mp1' was not declared. Should it be static? > drivers/iio/adc/stm32-adc.c:2630:20: warning: > symbol 'stm32_adc_min_ts_mp13' was not declared. Should it be static? > > These variables are only used in stm32-adc.c, so they should be static > > Signed-off-by: Tom Rix Thanks Tom, I wonder why these didn't show up in earlier build reports? Ah well. Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it. Thanks, Jonathan > --- > drivers/iio/adc/stm32-adc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c > index 45d4e79f8e55..1aadb2ad2cab 100644 > --- a/drivers/iio/adc/stm32-adc.c > +++ b/drivers/iio/adc/stm32-adc.c > @@ -2588,7 +2588,7 @@ static const struct stm32_adc_cfg stm32f4_adc_cfg = { > .irq_clear = stm32f4_adc_irq_clear, > }; > > -const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 }; > +static const unsigned int stm32_adc_min_ts_h7[] = { 0, 0, 0, 4300, 9000 }; > static_assert(ARRAY_SIZE(stm32_adc_min_ts_h7) == STM32_ADC_INT_CH_NB); > > static const struct stm32_adc_cfg stm32h7_adc_cfg = { > @@ -2607,7 +2607,7 @@ static const struct stm32_adc_cfg stm32h7_adc_cfg = { > .ts_int_ch = stm32_adc_min_ts_h7, > }; > > -const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 }; > +static const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 }; > static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp1) == STM32_ADC_INT_CH_NB); > > static const struct stm32_adc_cfg stm32mp1_adc_cfg = { > @@ -2627,7 +2627,7 @@ static const struct stm32_adc_cfg stm32mp1_adc_cfg = { > .ts_int_ch = stm32_adc_min_ts_mp1, > }; > > -const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 }; > +static const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 }; > static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp13) == STM32_ADC_INT_CH_NB); > > static const struct stm32_adc_cfg stm32mp13_adc_cfg = { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel