2019-10-04 14:57:03

by Alain Volmat

[permalink] [raw]
Subject: [PATCH] i2c: i2c-stm32f7: remove warning when compiling with W=1

Remove the following warning:

drivers/i2c/busses/i2c-stm32f7.c:315:
warning: cannot understand function prototype:
'struct stm32f7_i2c_spec i2c_specs[] =

Signed-off-by: Alain Volmat <[email protected]>
---
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 d36cf08..7aa4a47 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -305,7 +305,7 @@ struct stm32f7_i2c_dev {
struct regmap *regmap;
};

-/**
+/*
* All these values are coming from I2C Specification, Version 6.0, 4th of
* April 2014.
*
--
2.7.4


2019-10-07 08:00:40

by Pierre-Yves MORDRET

[permalink] [raw]
Subject: Re: [PATCH] i2c: i2c-stm32f7: remove warning when compiling with W=1

Hi Alain

Fixes tag is missing in your patch.
[ i.e ==> Fixes: aeb068c57214 ("i2c: i2c-stm32f7: add driver") ]

Nonetheless patch only consists in removing a comment character ?

Thanks

On 10/4/19 4:55 PM, Alain Volmat wrote:
> Remove the following warning:
>
> drivers/i2c/busses/i2c-stm32f7.c:315:
> warning: cannot understand function prototype:
> 'struct stm32f7_i2c_spec i2c_specs[] =
>
> Signed-off-by: Alain Volmat <[email protected]>
> ---
> 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 d36cf08..7aa4a47 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -305,7 +305,7 @@ struct stm32f7_i2c_dev {
> struct regmap *regmap;
> };
>
> -/**
> +/*
> * All these values are coming from I2C Specification, Version 6.0, 4th of
> * April 2014.
> *
>

2019-10-07 12:02:34

by Alain Volmat

[permalink] [raw]
Subject: Re: [PATCH] i2c: i2c-stm32f7: remove warning when compiling with W=1

Hi Pierre-Yves,

thanks for the comments.

On Mon, Oct 07, 2019 at 09:59:22AM +0200, Pierre Yves MORDRET wrote:
> Hi Alain
>
> Fixes tag is missing in your patch.
> [ i.e ==> Fixes: aeb068c57214 ("i2c: i2c-stm32f7: add driver") ]

Okay, will push a v2 for that.

>
> Nonetheless patch only consists in removing a comment character ?

Yes, the comment currently starts in a way of a kernel-doc description
(https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#function-documentation) leading the compiler to produce the warning since there is no
function prototype after the comment.

Regards,
Alain

>
> Thanks
>
> On 10/4/19 4:55 PM, Alain Volmat wrote:
> > Remove the following warning:
> >
> > drivers/i2c/busses/i2c-stm32f7.c:315:
> > warning: cannot understand function prototype:
> > 'struct stm32f7_i2c_spec i2c_specs[] =
> >
> > Signed-off-by: Alain Volmat <[email protected]>
> > ---
> > 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 d36cf08..7aa4a47 100644
> > --- a/drivers/i2c/busses/i2c-stm32f7.c
> > +++ b/drivers/i2c/busses/i2c-stm32f7.c
> > @@ -305,7 +305,7 @@ struct stm32f7_i2c_dev {
> > struct regmap *regmap;
> > };
> >
> > -/**
> > +/*
> > * All these values are coming from I2C Specification, Version 6.0, 4th of
> > * April 2014.
> > *
> >