diff mbox series

[v1,7/9] pinctrl: cherryview: Describe members of couple of structs

Message ID 20180904112625.8630-7-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/9] pinctrl: intel: Move linux/pm.h to the local header | expand

Commit Message

Andy Shevchenko Sept. 4, 2018, 11:26 a.m. UTC
Compiler unsatisfied to see half described data structures
and issues warnings:

drivers/pinctrl/intel/pinctrl-cherryview.c:136: warning: Function parameter or member 'acpi_space_id' not described in 'chv_community'
drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_intmask' not described in 'chv_pinctrl'
drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_pin_context' not described in 'chv_pinctrl'

To satisfy it, describe mentioned members.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-cherryview.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Mika Westerberg Sept. 5, 2018, 7:19 a.m. UTC | #1
On Tue, Sep 04, 2018 at 02:26:23PM +0300, Andy Shevchenko wrote:
> Compiler unsatisfied to see half described data structures
  ^^^^^^^^

Are you sure the compiler even sees the comments? AFAIK preprocessor
removes them before the compiler is run. Maybe these come from sparse or
some other tool instead?

> and issues warnings:
> 
> drivers/pinctrl/intel/pinctrl-cherryview.c:136: warning: Function parameter or member 'acpi_space_id' not described in 'chv_community'
> drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_intmask' not described in 'chv_pinctrl'
> drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_pin_context' not described in 'chv_pinctrl'
Andy Shevchenko Sept. 5, 2018, 9:37 a.m. UTC | #2
On Wed, Sep 05, 2018 at 10:19:19AM +0300, Mika Westerberg wrote:
> On Tue, Sep 04, 2018 at 02:26:23PM +0300, Andy Shevchenko wrote:
> > Compiler unsatisfied to see half described data structures
>   ^^^^^^^^
> 
> Are you sure the compiler even sees the comments? AFAIK preprocessor
> removes them before the compiler is run. Maybe these come from sparse or
> some other tool instead?

kernel-doc prints a message very like similar to what usually compiler produces.
Should I resend this, or, Linus, you can change this when applying?

> 
> > and issues warnings:
> > 
> > drivers/pinctrl/intel/pinctrl-cherryview.c:136: warning: Function parameter or member 'acpi_space_id' not described in 'chv_community'
> > drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_intmask' not described in 'chv_pinctrl'
> > drivers/pinctrl/intel/pinctrl-cherryview.c:169: warning: Function parameter or member 'saved_pin_context' not described in 'chv_pinctrl'
diff mbox series

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index f0420dc2e567..4eda96bf0764 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -121,6 +121,7 @@  struct chv_gpio_pinrange {
  * @gpio_ranges: An array of GPIO ranges in this community
  * @ngpio_ranges: Number of GPIO ranges
  * @nirqs: Total number of IRQs this community can generate
+ * @acpi_space_id: An address space ID for ACPI OpRegion handler
  */
 struct chv_community {
 	const char *uid;
@@ -151,6 +152,8 @@  struct chv_pin_context {
  * @intr_lines: Stores mapping between 16 HW interrupt wires and GPIO
  *		offset (in GPIO number space)
  * @community: Community this pinctrl instance represents
+ * @saved_intmask: Interrupt mask saved for system sleep
+ * @saved_pin_context: Pointer to a context of the pins saved for system sleep
  *
  * The first group in @groups is expected to contain all pins that can be
  * used as GPIOs.