Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754702AbdIRJSk (ORCPT ); Mon, 18 Sep 2017 05:18:40 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:13627 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754669AbdIRJSi (ORCPT ); Mon, 18 Sep 2017 05:18:38 -0400 Subject: Re: [PATCH][V2] i2c: i2c-stm32f7: make structure stm32f7_setup static const To: Colin King , Wolfram Sang , Maxime Coquelin , Alexandre Torgue , , CC: , References: <20170918081539.26512-1-colin.king@canonical.com> From: Pierre Yves MORDRET Message-ID: <3684ee87-f9ca-85e8-302a-7f681c58fdd5@st.com> Date: Mon, 18 Sep 2017 11:18:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170918081539.26512-1-colin.king@canonical.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG5NODE2.st.com (10.75.127.14) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-18_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 30 On 09/18/2017 10:15 AM, Colin King wrote: > From: Colin Ian King > > The structure stm32f7_setup is local to the source and does not need > to be in global scope, make it static const. > > Cleans up sparse warning: > symbol 'stm32f7_setup' was not declared. Should it be static? > > Signed-off-by: Colin Ian King > --- > drivers/i2c/busses/i2c-stm32f7.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c > index 47c67b0ca896..3eae4fc96884 100644 > --- a/drivers/i2c/busses/i2c-stm32f7.c > +++ b/drivers/i2c/busses/i2c-stm32f7.c > @@ -265,7 +265,7 @@ static struct stm32f7_i2c_spec i2c_specs[] = { > }, > }; > > -struct stm32f7_i2c_setup stm32f7_setup = { > +static const struct stm32f7_i2c_setup stm32f7_setup = { > .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT, > .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT, > .dnf = STM32F7_I2C_DNF_DEFAULT, > Acked-by: Pierre-Yves MORDRET