diff mbox series

[4/8] rtc: ds1685: fix build error with make W=1

Message ID 20191122102212.400158-5-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series rtc: fix W=1 warnings and errors | expand

Commit Message

Alexandre Belloni Nov. 22, 2019, 10:22 a.m. UTC
Fix the following parsing errors when building with W=1:
drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union!
drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = '

Cc: Joshua Kinard <kumba@gentoo.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-ds1685.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Joshua Kinard Nov. 23, 2019, 5:19 a.m. UTC | #1
On 11/22/2019 05:22, Alexandre Belloni wrote:
> Fix the following parsing errors when building with W=1:
> drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union!
> drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union!
> drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = '
> 
> Cc: Joshua Kinard <kumba@gentoo.org>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  drivers/rtc/rtc-ds1685.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
> index 8419595e7da7..56c670af2e50 100644
> --- a/drivers/rtc/rtc-ds1685.c
> +++ b/drivers/rtc/rtc-ds1685.c
> @@ -1039,7 +1039,7 @@ ds1685_rtc_sysfs_serial_show(struct device *dev,
>  }
>  static DEVICE_ATTR(serial, S_IRUGO, ds1685_rtc_sysfs_serial_show, NULL);
>  
> -/**
> +/*
>   * struct ds1685_rtc_sysfs_misc_attrs - list for misc RTC features.
>   */
>  static struct attribute*
> @@ -1050,7 +1050,7 @@ ds1685_rtc_sysfs_misc_attrs[] = {
>  	NULL,
>  };
>  
> -/**
> +/*
>   * struct ds1685_rtc_sysfs_misc_grp - attr group for misc RTC features.
>   */
>  static const struct attribute_group
> @@ -1355,7 +1355,7 @@ ds1685_rtc_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -/**
> +/*
>   * ds1685_rtc_driver - rtc driver properties.
>   */
>  static struct platform_driver ds1685_rtc_driver = {
> 

/** is for kerneldoc comments.  Is this a bug in kbuild's W=1 implementation
of not parsing kerneldoc on a struct correctly?  I'm sure I got that syntax
for structs out of the kerneldoc guide, unless it changed at some point.
Alexandre Belloni Nov. 26, 2019, 9:16 p.m. UTC | #2
On 23/11/2019 00:19:45-0500, Joshua Kinard wrote:
> On 11/22/2019 05:22, Alexandre Belloni wrote:
> > Fix the following parsing errors when building with W=1:
> > drivers/rtc/rtc-ds1685.c:1053: error: Cannot parse struct or union!
> > drivers/rtc/rtc-ds1685.c:1062: error: Cannot parse struct or union!
> > drivers/rtc/rtc-ds1685.c:1363: warning: cannot understand function prototype: 'struct platform_driver ds1685_rtc_driver = '
> > 
> > Cc: Joshua Kinard <kumba@gentoo.org>
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> >  drivers/rtc/rtc-ds1685.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
> > index 8419595e7da7..56c670af2e50 100644
> > --- a/drivers/rtc/rtc-ds1685.c
> > +++ b/drivers/rtc/rtc-ds1685.c
> > @@ -1039,7 +1039,7 @@ ds1685_rtc_sysfs_serial_show(struct device *dev,
> >  }
> >  static DEVICE_ATTR(serial, S_IRUGO, ds1685_rtc_sysfs_serial_show, NULL);
> >  
> > -/**
> > +/*
> >   * struct ds1685_rtc_sysfs_misc_attrs - list for misc RTC features.
> >   */
> >  static struct attribute*
> > @@ -1050,7 +1050,7 @@ ds1685_rtc_sysfs_misc_attrs[] = {
> >  	NULL,
> >  };
> >  
> > -/**
> > +/*
> >   * struct ds1685_rtc_sysfs_misc_grp - attr group for misc RTC features.
> >   */
> >  static const struct attribute_group
> > @@ -1355,7 +1355,7 @@ ds1685_rtc_remove(struct platform_device *pdev)
> >  	return 0;
> >  }
> >  
> > -/**
> > +/*
> >   * ds1685_rtc_driver - rtc driver properties.
> >   */
> >  static struct platform_driver ds1685_rtc_driver = {
> > 
> 
> /** is for kerneldoc comments.  Is this a bug in kbuild's W=1 implementation
> of not parsing kerneldoc on a struct correctly?  I'm sure I got that syntax
> for structs out of the kerneldoc guide, unless it changed at some point.
> 

I would think it is gcc that is choking on that, probably because the
members are not described.
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
index 8419595e7da7..56c670af2e50 100644
--- a/drivers/rtc/rtc-ds1685.c
+++ b/drivers/rtc/rtc-ds1685.c
@@ -1039,7 +1039,7 @@  ds1685_rtc_sysfs_serial_show(struct device *dev,
 }
 static DEVICE_ATTR(serial, S_IRUGO, ds1685_rtc_sysfs_serial_show, NULL);
 
-/**
+/*
  * struct ds1685_rtc_sysfs_misc_attrs - list for misc RTC features.
  */
 static struct attribute*
@@ -1050,7 +1050,7 @@  ds1685_rtc_sysfs_misc_attrs[] = {
 	NULL,
 };
 
-/**
+/*
  * struct ds1685_rtc_sysfs_misc_grp - attr group for misc RTC features.
  */
 static const struct attribute_group
@@ -1355,7 +1355,7 @@  ds1685_rtc_remove(struct platform_device *pdev)
 	return 0;
 }
 
-/**
+/*
  * ds1685_rtc_driver - rtc driver properties.
  */
 static struct platform_driver ds1685_rtc_driver = {