Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1733729 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-09-18 10:20 +0200 |
| Last post | 2017-09-18 11:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH][V2] i2c: i2c-stm32f7: make structure stm32f7_setup static const Colin King <colin.king@canonical.com> - 2017-09-18 10:20 +0200
Re: [PATCH][V2] i2c: i2c-stm32f7: make structure stm32f7_setup static const Pierre Yves MORDRET <pierre-yves.mordret@st.com> - 2017-09-18 11:20 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-09-18 10:20 +0200 |
| Subject | [PATCH][V2] i2c: i2c-stm32f7: make structure stm32f7_setup static const |
| Message-ID | <uqZrA-3BU-3@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
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,
--
2.14.1
[toc] | [next] | [standalone]
| From | Pierre Yves MORDRET <pierre-yves.mordret@st.com> |
|---|---|
| Date | 2017-09-18 11:20 +0200 |
| Subject | Re: [PATCH][V2] i2c: i2c-stm32f7: make structure stm32f7_setup static const |
| Message-ID | <ur0nG-4ck-59@gated-at.bofh.it> |
| In reply to | #1733729 |
On 09/18/2017 10:15 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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 <colin.king@canonical.com>
> ---
> 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 <pierre-yves.mordret@st.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web