Clean GPIO of W=1 warnings
Subsystems (5)
cover Clean GPIO of W=1 warnings
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
Lee Jones (10):
gpio: gpiolib-of: Provide documentation for of_gpio_spi_cs_get_count()
gpio: gpio-altera: Add missing kerneldoc entry and demote comment
gpio: gpio-ml-ioh: Fix missing ':' in 'struct ioh_gpio_reg_data
gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map'
gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic
comment blocks
gpio: gpio-syscon: Fix formatting issues which confuse kerneldoc
gpio: gpio-it87: Fix formatting issues which confuse kerneldoc
gpio: gpio-mlxbf: Tell the compiler that ACPI functions may not be
used
gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be
use
gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing
Sparse
drivers/gpio/gpio-altera.c | 3 ++- drivers/gpio/gpio-it87.c | 14 +++++++------- drivers/gpio/gpio-ml-ioh.c | 2 +- drivers/gpio/gpio-mlxbf.c | 2 +- drivers/gpio/gpio-mlxbf2.c | 4 +++- drivers/gpio/gpio-pmic-eic-sprd.c | 2 +- drivers/gpio/gpio-sama5d2-piobu.c | 16 ++++++++-------- drivers/gpio/gpio-syscon.c | 12 ++++++------ drivers/gpio/gpiolib-of.c | 3 +++ 9 files changed, 32 insertions(+), 26 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/10 gpio: gpiolib-of: Provide documentation for of_gpio_spi_cs_get_count()
Descriptions for of_gpio_spi_cs_get_count()'s 2 arguments are missing. Document both 'dev' and 'con_id'.
Fixes the following W=1 kernel build warnings:
drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'dev' not described in 'of_gpio_spi_cs_get_count' drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'con_id' not described in 'of_gpio_spi_cs_get_count'
--- drivers/gpio/gpiolib-of.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpio/gpiolib-of.c +3 -0
@@ -25,6 +25,9 @@/** * of_gpio_spi_cs_get_count() - special GPIO counting for SPI +* @dev: Consuming device +* @con_id: Function within the GPIO consumer +* * Some elder GPIO controllers need special quirks. Currently we handle * the Freescale GPIO controller with bindings that doesn't use the * established "cs-gpios" for chip selects but instead rely on
Signature · 1 line
2.25.1
Re: [PATCH 01/10] gpio: gpiolib-of: Provide documentation for of_gpio_spi_cs_get_count()
Quoted 10 lines · Lee Jones
Descriptions for of_gpio_spi_cs_get_count()'s 2 arguments are missing. Document both 'dev' and '
con_id'.Fixes the following W=1 kernel build warnings:
drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'dev' not described in 'of_gpio_spi_cs_get_count'drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'con_id' not described in 'of_gpio_spi_cs_get_count'Cc Anton Vorontsov <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 2/10 gpio: gpio-altera: Add missing kerneldoc entry and demote comment
In reply to Lee Jones'struct altera_gpio_chip's 'irq_chip' property is undocumented. So add property description to the struct's kerneldoc header. Also demote comment block which is clearly not in kerneldoc format.
Fixes the following W=1 warnings:
drivers/gpio/gpio-altera.c:34: warning: Function parameter or member 'irq_chip' not described in 'altera_gpio_chip' drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'd' not described in 'altera_gpio_irq_set_type' drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'type' not described in 'altera_gpio_irq_set_type'
--- drivers/gpio/gpio-altera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-altera.c +2 -1
@@ -24,6 +24,7 @@* @interrupt_trigger : specifies the hardware configured IRQ trigger type * (rising, falling, both, high) * @mapped_irq : kernel mapped irq number. +* @irq_chip : IRQ chip configuration */ struct altera_gpio_chip {struct of_mm_gpio_chip mmchip;
@@ -69,7 +70,7 @@ static void altera_gpio_irq_mask(struct irq_data *d)raw_spin_unlock_irqrestore (&altera_gc->gpio_lock, flags); } -/** +/* * This controller's IRQ type is synthesized in hardware, so this function * just checks if the requested set_type matches the synthesized IRQ type */
Signature · 1 line
2.25.1
Re: [PATCH 02/10] gpio: gpio-altera: Add missing kerneldoc entry and demote comment
Quoted 6 lines · Lee Jones
'struct altera_gpio_chip's '
irq_chip' property is undocumented. So add property description to the struct's kerneldoc header. Also demote comment block which is clearly not in kerneldoc format.Fixes the following W=1 warnings:
Quoted 7 lines
drivers/gpio/gpio-altera.c:34: warning: Function parameter or member 'irq_chip' not described in 'altera_gpio_chip'drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'd' not described in 'altera_gpio_irq_set_type'drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'type' not described in 'altera_gpio_irq_set_type'Cc Joyce Ooi <[email protected]>Cc Tien Hock Loh <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 3/10 gpio: gpio-ml-ioh: Fix missing ':' in 'struct ioh_gpio_reg_data
In reply to Lee Jones'struct ioh_gpio_reg_data's 'ien_reg' property is missing a ':' which confuses the kerneldoc tooling/parsers/validators.
Replacing it squashes the following W=1 warning:
drivers/gpio/gpio-ml-ioh.c:63: warning: Function parameter or member 'ien_reg' not described in 'ioh_gpio_reg_data'
--- drivers/gpio/gpio-ml-ioh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-ml-ioh.c +1 -1
@@ -44,7 +44,7 @@ struct ioh_regs {/** * struct ioh_gpio_reg_data - The register store data. -* @ien_reg To store contents of interrupt enable register. +* @ien_reg: To store contents of interrupt enable register. * @imask_reg: To store contents of interrupt mask regist * @po_reg: To store contents of PO register. * @pm_reg: To store contents of PM register.
Signature · 1 line
2.25.1
Andy Shevchenko
AppliedRe: [PATCH 03/10] gpio: gpio-ml-ioh: Fix missing ':' in 'struct ioh_gpio_reg_data
Quoted 6 lines · Lee Jones
'struct ioh_gpio_reg_data's '
ien_reg' property is missing a ':' which confuses the kerneldoc tooling/parsers/validators.Replacing it squashes the following W=1 warning:
drivers/gpio/gpio-ml-ioh.c:63: warning: Function parameter or member 'ien_reg' not described in 'ioh_gpio_reg_data'
Applied, thanks!
Quoted 23 lines
Cc Andy Shevchenko <[email protected]>Signed-off-by Lee Jones <[email protected]>--- drivers/gpio/gpio-ml-ioh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-ml-ioh.c +1
-1@@ -44,7 +44,7 @@ struct ioh_regs {/** * struct ioh_gpio_reg_data - The register store data. -* @ien_reg To store contents of interrupt enable register. +* @ien_reg: To store contents of interrupt enable register. * @imask_reg: To store contents of interrupt mask regist * @po_reg: To store contents of PO register. * @pm_reg: To store contents of PM register. Signature · 1 line
2.25.1
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 4/10 gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map'
In reply to Lee JonesA good attempt has been made to properly document 'struct sprd_pmic_eic', but 'map' has been incorrectly described as 'regmap' since the driver's inception in 2018.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-pmic-eic-sprd.c:65: warning: Function parameter or member 'map' not described in 'sprd_pmic_eic'
--- drivers/gpio/gpio-pmic-eic-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-pmic-eic-sprd.c +1 -1
@@ -48,7 +48,7 @@ enum {* struct sprd_pmic_eic - PMIC EIC controller * @chip: the gpio_chip structure. * @intc: the irq_chip structure. -* @regmap: the regmap from the parent device. +* @map: the regmap from the parent device. * @offset: the EIC controller's offset address of the PMIC. * @reg: the array to cache the EIC registers. * @buslock: for bus lock/sync and unlock.
Signature · 1 line
2.25.1
Re: [PATCH 04/10] gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map'
Quoted 5 lines · Lee Jones
A good attempt has been made to properly document 'struct
sprd_pmic_eic', but 'map' has been incorrectly described as 'regmap' since the driver's inception in 2018.
Quoted 8 lines
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-pmic-eic-sprd.c:65: warning: Function parameter or member 'map' not described in 'sprd_pmic_eic'Cc Orson Zhai <[email protected]>Cc Baolin Wang <[email protected]>Cc Chunyan Zhang <[email protected]>Signed-off-by Lee Jones <[email protected]>
Looks good to me.
Quoted 20 lines
--- drivers/gpio/gpio-pmic-eic-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-pmic-eic-sprd.c +1
-2@@ -48,7 +48,7 @@ enum {* struct sprd_pmic_eic - PMIC EIC controller * @chip: the gpio_chip structure. * @intc: the irq_chip structure. -* @regmap: the regmap from the parent device. +* @map: the regmap from the parent device. * @offset: the EIC controller's offset address of the PMIC. * @reg: the array to cache the EIC registers. * @buslock: for bus lock/sync and unlock. -- 2.25.1
Signature · 1 line
Baolin Wang
Re: [PATCH 04/10] gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map'
In reply to Lee JonesQuoted 4 lines · Lee Jones
A good attempt has been made to properly document 'struct
sprd_pmic_eic', but 'map' has been incorrectly described as 'regmap' since the driver's inception in 2018.
Quoted 8 lines
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-pmic-eic-sprd.c:65: warning: Function parameter or member 'map' not described in 'sprd_pmic_eic'Cc Orson Zhai <[email protected]>Cc Baolin Wang <[email protected]>Cc Chunyan Zhang <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 5/10 gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic comment blocks
In reply to Lee JonesNo attempt has been made to provide proper descriptions for each of the function arguments throughout the file. Simply demote all kerneldoc headers to basic function headers.
Fixes the following W=1 kernel build warnings:
drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_setup_pin' drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_setup_pin' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get_direction' drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get_direction' drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_input' drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_input' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get' drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_set' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_set' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_set'
--- drivers/gpio/gpio-sama5d2-piobu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpio/gpio-sama5d2-piobu.c +8 -8
@@ -49,7 +49,7 @@ struct sama5d2_piobu {struct regmap *regmap; }; -/** +/* * sama5d2_piobu_setup_pin() - prepares a pin for set_direction call * * Do not consider pin for tamper detection (normal and backup modes)
@@ -73,7 +73,7 @@ static int sama5d2_piobu_setup_pin(struct gpio_chip *chip, unsigned int pin)return regmap_update_bits (piobu->regmap,PIOBU_WKPR , mask,0 ); } -/** +/* * sama5d2_piobu_write_value() - writes value & mask at the pin's PIOBU register */ static int sama5d2_piobu_write_value(struct gpio_chip *chip, unsigned int pin,
@@ -88,7 +88,7 @@ static int sama5d2_piobu_write_value(struct gpio_chip *chip, unsigned int pin,return regmap_update_bits (piobu->regmap, reg, mask, value); } -/** +/* * sama5d2_piobu_read_value() - read the value with masking from the pin's PIOBU * register */
@@ -108,7 +108,7 @@ static int sama5d2_piobu_read_value(struct gpio_chip *chip, unsigned int pin,return val & mask; } -/** +/* * sama5d2_piobu_get_direction() - gpiochip get_direction */ static int sama5d2_piobu_get_direction(struct gpio_chip *chip,
@@ -123,7 +123,7 @@ static int sama5d2_piobu_get_direction(struct gpio_chip *chip,GPIO_LINE_DIRECTION_OUT ; } -/** +/* * sama5d2_piobu_direction_input() - gpiochip direction_input */ static int sama5d2_piobu_direction_input(struct gpio_chip *chip,
@@ -132,7 +132,7 @@ static int sama5d2_piobu_direction_input(struct gpio_chip *chip,return sama5d2_piobu_write_value (chip, pin,PIOBU_DIRECTION ,PIOBU_IN ); } -/** +/* * sama5d2_piobu_direction_output() - gpiochip direction_output */ static int sama5d2_piobu_direction_output(struct gpio_chip *chip,
@@ -147,7 +147,7 @@ static int sama5d2_piobu_direction_output(struct gpio_chip *chip, val); } -/** +/* * sama5d2_piobu_get() - gpiochip get */ static int sama5d2_piobu_get (struct gpio_chip *chip,unsigned int pin)
@@ -166,7 +166,7 @@ static int sama5d2_piobu_get(struct gpio_chip *chip, unsigned int pin)return !!ret; } -/** +/* * sama5d2_piobu_set() - gpiochip set */ static void sama5d2_piobu_set(struct gpio_chip *chip, unsigned int pin,
Signature · 1 line
2.25.1
Re: [PATCH 05/10] gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic comment blocks
Quoted 30 lines · Lee Jones
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
No attempt has been made to provide proper descriptions for each of the function arguments throughout the file. Simply demote all kerneldoc headers to basic function headers.
Fixes the following W=1 kernel build warnings:
drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_setup_pin'drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_setup_pin'drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_write_value'drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_write_value'drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_write_value'drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_write_value'drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_read_value'drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_read_value'drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_read_value'drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get_direction'drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get_direction'drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_input'drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_input'drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_output'drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_output'drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_direction_output'drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get'drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get'drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_set'drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_set'drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_set'
Quoted 3 lines
Cc Ludovic Desroches <[email protected]>Cc Andrei Stefanescu <[email protected]>Signed-off-by Lee Jones <[email protected]>
Thanks.
Quoted 83 lines
--- drivers/gpio/gpio-sama5d2-piobu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/gpio/gpio-sama5d2-piobu.c +8
-9@@ -49,7 +49,7 @@ struct sama5d2_piobu {struct regmap *regmap; }; -/** +/* * sama5d2_piobu_setup_pin() - prepares a pin for set_direction call * * Do not consider pin for tamper detection (normal and backup modes) @@ -73,7 +73,7 @@ static int sama5d2_piobu_setup_pin(struct gpio_chip *chip, unsigned int pin)return regmap_update_bits (piobu->regmap,PIOBU_WKPR , mask,0 ); } -/** +/* * sama5d2_piobu_write_value() - writes value & mask at the pin's PIOBU register */ static int sama5d2_piobu_write_value(struct gpio_chip *chip, unsigned int pin,@@ -88,7 +88,7 @@ static int sama5d2_piobu_write_value(struct gpio_chip *chip, unsigned int pin,return regmap_update_bits (piobu->regmap, reg, mask, value); } -/** +/* * sama5d2_piobu_read_value() - read the value with masking from the pin's PIOBU * register */ @@ -108,7 +108,7 @@ static int sama5d2_piobu_read_value(struct gpio_chip *chip, unsigned int pin,return val & mask; } -/** +/* * sama5d2_piobu_get_direction() - gpiochip get_direction */ static int sama5d2_piobu_get_direction(struct gpio_chip *chip,@@ -123,7 +123,7 @@ static int sama5d2_piobu_get_direction(struct gpio_chip *chip,GPIO_LINE_DIRECTION_OUT ; } -/** +/* * sama5d2_piobu_direction_input() - gpiochip direction_input */ static int sama5d2_piobu_direction_input(struct gpio_chip *chip,@@ -132,7 +132,7 @@ static int sama5d2_piobu_direction_input(struct gpio_chip *chip,return sama5d2_piobu_write_value (chip, pin,PIOBU_DIRECTION ,PIOBU_IN ); } -/** +/* * sama5d2_piobu_direction_output() - gpiochip direction_output */ static int sama5d2_piobu_direction_output(struct gpio_chip *chip,@@ -147,7 +147,7 @@ static int sama5d2_piobu_direction_output(struct gpio_chip *chip, val); } -/** +/* * sama5d2_piobu_get() - gpiochip get */ static int sama5d2_piobu_get (struct gpio_chip *chip,unsigned int pin)@@ -166,7 +166,7 @@ static int sama5d2_piobu_get(struct gpio_chip *chip, unsigned int pin)return !!ret; } -/** +/* * sama5d2_piobu_set() - gpiochip set */ static void sama5d2_piobu_set(struct gpio_chip *chip, unsigned int pin, --2.25.1
Re: [PATCH 05/10] gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic comment blocks
In reply to Lee JonesQuoted 3 lines · Lee Jones
No attempt has been made to provide proper descriptions for each of the function arguments throughout the file. Simply demote all kerneldoc headers to basic function headers.
(...)
Quoted 4 lines
Cc Ludovic Desroches <[email protected]>Cc Andrei Stefanescu <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 6/10 gpio: gpio-syscon: Fix formatting issues which confuse kerneldoc
In reply to Lee JonesKerneldoc expects struct properties to be documented using the syntax '@.*: ', but no '@' has been provided in 'struct syscon_gpio_data's header. Add them to stop confusing kerneldoc.
Fixes the following W=1 warnings:
drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'compatible' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'flags' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'bit_count' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dat_bit_offset' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dir_bit_offset' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'set' not described in 'syscon_gpio_data'
--- drivers/gpio/gpio-syscon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpio/gpio-syscon.c +6 -6
@@ -24,16 +24,16 @@/** * struct syscon_gpio_data - Configuration for the device. -* compatible: SYSCON driver compatible string. -* flags: Set of GPIO_SYSCON_FEAT_ flags: +* @compatible: SYSCON driver compatible string. +* @flags: Set of GPIO_SYSCON_FEAT_ flags: * GPIO_SYSCON_FEAT_IN: GPIOs supports input, * GPIO_SYSCON_FEAT_OUT: GPIOs supports output, * GPIO_SYSCON_FEAT_DIR: GPIOs supports switch direction. -* bit_count: Number of bits used as GPIOs. -* dat_bit_offset: Offset (in bits) to the first GPIO bit. -* dir_bit_offset: Optional offset (in bits) to the first bit to switch +* @bit_count: Number of bits used as GPIOs. +* @dat_bit_offset: Offset (in bits) to the first GPIO bit. +* @dir_bit_offset: Optional offset (in bits) to the first bit to switch * GPIO direction (Used with GPIO_SYSCON_FEAT_DIR flag). -* set: HW specific callback to assigns output value +* @set: HW specific callback to assigns output value * for signal "offset" */
Signature · 1 line
2.25.1
Re: [PATCH 06/10] gpio: gpio-syscon: Fix formatting issues which confuse kerneldoc
Quoted 13 lines · Lee Jones
Kerneldoc expects struct properties to be documented using the syntax '@.*: ', but no '@' has been provided in 'struct syscon_gpio_data's header. Add them to stop confusing kerneldoc.
Fixes the following W=1 warnings:
drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'compatible' not described in 'syscon_gpio_data'drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'flags' not described in 'syscon_gpio_data'drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'bit_count' not described in 'syscon_gpio_data'drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dat_bit_offset' not described in 'syscon_gpio_data'drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dir_bit_offset' not described in 'syscon_gpio_data'drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'set' not described in 'syscon_gpio_data'
Quoted 2 lines
Cc Alexander Shiyan <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 7/10 gpio: gpio-it87: Fix formatting issues which confuse kerneldoc
In reply to Lee JonesKerneldoc expects struct properties to be documented using the syntax '@.*: ', but no ':' has been provided in 'struct it87_gpio's header. Add them to stop confusing kerneldoc.
Fixes the following W=1 warnings:
drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'chip' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'lock' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_size' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'output_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_size' not described in 'it87_gpio'
--- drivers/gpio/gpio-it87.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpio/gpio-it87.c +7 -7
@@ -47,13 +47,13 @@/** * struct it87_gpio - it87-specific GPIO chip -* @chip the underlying gpio_chip structure -* @lock a lock to avoid races between operations -* @io_base base address for gpio ports -* @io_size size of the port rage starting from io_base. -* @output_base Super I/O register address for Output Enable register -* @simple_base Super I/O 'Simple I/O' Enable register -* @simple_size Super IO 'Simple I/O' Enable register size; this is +* @chip: the underlying gpio_chip structure +* @lock: a lock to avoid races between operations +* @io_base: base address for gpio ports +* @io_size: size of the port rage starting from io_base. +* @output_base: Super I/O register address for Output Enable register +* @simple_base: Super I/O 'Simple I/O' Enable register +* @simple_size: Super IO 'Simple I/O' Enable register size; this is * required because IT87xx chips might only provide Simple I/O * switches on a subset of lines, whereas the others keep the * same status all time.
Signature · 1 line
2.25.1
Re: [PATCH 07/10] gpio: gpio-it87: Fix formatting issues which confuse kerneldoc
Quoted 14 lines · Lee Jones
Kerneldoc expects struct properties to be documented using the syntax '@.*: ', but no ':' has been provided in 'struct it87_gpio's header. Add them to stop confusing kerneldoc.
Fixes the following W=1 warnings:
drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'chip' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'lock' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_base' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_size' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'output_base' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_base' not described in 'it87_gpio'drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_size' not described in 'it87_gpio'
Quoted 2 lines
Cc "Diego Elio Pettenò" <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 8/10 gpio: gpio-mlxbf: Tell the compiler that ACPI functions may not be used
In reply to Lee Jones... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-mlxbf.c:130:36: warning: ‘mlxbf_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 130 | static const struct acpi_device_id mlxbf_gpio_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~
--- drivers/gpio/gpio-mlxbf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-mlxbf.c +1 -1
@@ -127,7 +127,7 @@ static int mlxbf_gpio_resume(struct platform_device *pdev) }#endif -static const struct acpi_device_id mlxbf_gpio_acpi_match[] = { +static const struct acpi_device_id __maybe_unused mlxbf_gpio_acpi_match[] = { {"MLNXBF02" ,0 }, {} };
Signature · 1 line
2.25.1
Re: [PATCH 08/10] gpio: gpio-mlxbf: Tell the compiler that ACPI functions may not be used
Quoted 10 lines · Lee Jones
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-mlxbf.c:130:36: warning: ‘mlxbf_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 130 | static const structacpi_device_idmlxbf_gpio_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~Cc Shravan Kumar Ramani <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 9/10 gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be use
In reply to Lee Jones... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-mlxbf2.c:312:36: warning: ‘mlxbf2_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id mlxbf2_gpio_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
--- drivers/gpio/gpio-mlxbf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-mlxbf2.c +1 -1
@@ -309,7 +309,7 @@ static int mlxbf2_gpio_resume(struct platform_device *pdev) }#endif -static const struct acpi_device_id mlxbf2_gpio_acpi_match[] = { +static const struct acpi_device_id __maybe_unused mlxbf2_gpio_acpi_match[] = { {"MLNXBF22" ,0 }, {}, };
Signature · 1 line
2.25.1
RE: [PATCH 09/10] gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be use
Thank you.
-----Original Message-----
From: Lee Jones <[email protected]>
Sent: Tuesday, June 30, 2020 9:34 AM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lee Jones <[email protected]>; Asmaa Mnebhi <[email protected]>
Subject: [PATCH 09/10] gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be use
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-mlxbf2.c:312:36: warning: ‘mlxbf2_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id mlxbf2_gpio_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~
--- drivers/gpio/gpio-mlxbf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-mlxbf2.c +2 -2
@@ -309,7 +309,7 @@ static int mlxbf2_gpio_resume(struct platform_device *pdev) } #endif -static const struct acpi_device_id mlxbf2_gpio_acpi_match[] = { +static const struct acpi_device_id __maybe_unused +mlxbf2_gpio_acpi_match[] = { {"MLNXBF22" ,0 }, {}, }; --
2.25.1
Re: [PATCH 09/10] gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be use
In reply to Lee JonesQuoted 10 lines · Lee Jones
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/gpio/gpio-mlxbf2.c:312:36: warning: ‘mlxbf2_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 312 | static const structacpi_device_idmlxbf2_gpio_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~~Cc Asmaa Mnebhi <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij
PATCH 10/10 gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse
In reply to Lee JonesSparse cannot peer into other functions to see when and if locks are acquired and released, thus it simply warns that a 'context imbalance' is detected instead. Let's be kind to Sparse and let it know that this behaviour is intentional.
drivers/gpio/gpio-mlxbf2.c:125:12: warning: context imbalance in 'mlxbf2_gpio_lock_acquire' - different lock contexts for basic block drivers/gpio/gpio-mlxbf2.c:151:13: warning: context imbalance in 'mlxbf2_gpio_lock_release' - unexpected unlock
--- drivers/gpio/gpio-mlxbf2.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpio/gpio-mlxbf2.c +2 -0
@@ -149,6 +149,8 @@ static int mlxbf2_gpio_lock_acquire(struct mlxbf2_gpio_context *gs)* Release the YU arm_gpio_lock after changing the direction mode. */ static void mlxbf2_gpio_lock_release (struct mlxbf2_gpio_context *gs) + __releases(&gs->gc.bgpio_lock) + __releases(yu_arm_gpio_lock_param.lock) {writel (YU_ARM_GPIO_LOCK_RELEASE , yu_arm_gpio_lock_param.io);spin_unlock (&gs->gc.bgpio_lock);
Signature · 1 line
2.25.1
RE: [PATCH 10/10] gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse
Thank you.
-----Original Message-----
From: Lee Jones <[email protected]>
Sent: Tuesday, June 30, 2020 9:34 AM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lee Jones <[email protected]>; Asmaa Mnebhi <[email protected]>
Subject: [PATCH 10/10] gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse
Sparse cannot peer into other functions to see when and if locks are acquired and released, thus it simply warns that a 'context imbalance' is detected instead. Let's be kind to Sparse and let it know that this behaviour is intentional.
drivers/gpio/gpio-mlxbf2.c:125:12: warning: context imbalance in 'mlxbf2_gpio_lock_acquire' - different lock contexts for basic block drivers/gpio/gpio-mlxbf2.c:151:13: warning: context imbalance in 'mlxbf2_gpio_lock_release' - unexpected unlock
--- drivers/gpio/gpio-mlxbf2.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpio/gpio-mlxbf2.c +2 -0
@@ -149,6 +149,8 @@ static int mlxbf2_gpio_lock_acquire(struct mlxbf2_gpio_context *gs)* Release the YU arm_gpio_lock after changing the direction mode. */ static void mlxbf2_gpio_lock_release (struct mlxbf2_gpio_context *gs) + __releases(&gs->gc.bgpio_lock) + __releases(yu_arm_gpio_lock_param.lock) {writel (YU_ARM_GPIO_LOCK_RELEASE , yu_arm_gpio_lock_param.io);spin_unlock (&gs->gc.bgpio_lock);
--
2.25.1
Re: [PATCH 10/10] gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse
In reply to Lee JonesQuoted 10 lines · Lee Jones
Sparse cannot peer into other functions to see when and if locks are acquired and released, thus it simply warns that a 'context imbalance' is detected instead. Let's be kind to Sparse and let it know that this behaviour is intentional.
drivers/gpio/gpio-mlxbf2.c:125:12: warning: context imbalance in 'mlxbf2_gpio_lock_acquire' - different lock contexts for basic blockdrivers/gpio/gpio-mlxbf2.c:151:13: warning: context imbalance in 'mlxbf2_gpio_lock_release' - unexpected unlockCc Asmaa Mnebhi <[email protected]>Signed-off-by Lee Jones <[email protected]>
Patch applied!
Yours,
Linus Walleij