linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator
@ 2020-06-25 16:36 Lee Jones
  2020-06-25 16:36 ` [PATCH 01/10] regulator: consumer: Supply missing prototypes for 3 core functions Lee Jones
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Attempting to clean-up W=1 kernel builds, which are currently
overwhelmingly riddled with niggly little warnings.

Lee Jones (10):
  regulator: consumer: Supply missing prototypes for 3 core functions
  regulator: devres: Fix issues with kerneldoc headers
  regulator: of_regulator: Add missing colon for rdev kerneldoc argument
  regulator: dbx500-prcmu: Remove unused function
    dbx500_regulator_testcase()
  regulator: ab8500: Remove unused embedded struct expand_register
  regulator: wm8350-regulator: Repair odd formatting in documentation
  regulator: cpcap-regulator: Remove declared and set, but never used
    variable 'ignore'
  regulator: cpcap-regulator: Demote kerneldoc header to standard
    comment
  regulator: da9063-regulator: Fix .suspend 'initialized field
    overwritten' warnings
  regulator: max14577-regulator: Demote kerneldoc header to standard
    comment

 drivers/regulator/ab8500.c             |  7 +------
 drivers/regulator/cpcap-regulator.c    | 16 ++++++++--------
 drivers/regulator/da9063-regulator.c   |  1 -
 drivers/regulator/dbx500-prcmu.c       |  8 --------
 drivers/regulator/devres.c             |  4 +++-
 drivers/regulator/max14577-regulator.c |  2 +-
 drivers/regulator/of_regulator.c       |  2 +-
 drivers/regulator/wm8350-regulator.c   | 10 +++++-----
 include/linux/regulator/consumer.h     | 10 ++++++++++
 9 files changed, 29 insertions(+), 31 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 01/10] regulator: consumer: Supply missing prototypes for 3 core functions
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers Lee Jones
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

regulator_suspend_enable(), regulator_suspend_disable() and
regulator_set_suspend_voltage() are all exported members of the
API, but are all missing prototypes.

Fixes the following W=1 warning(s):

 drivers/regulator/core.c:3805:5: warning: no previous prototype for ‘regulator_suspend_enable’ [-Wmissing-prototypes]
 3805 | int regulator_suspend_enable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3812:5: warning: no previous prototype for ‘regulator_suspend_disable’ [-Wmissing-prototypes]
 3812 | int regulator_suspend_disable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3851:5: warning: no previous prototype for ‘regulator_set_suspend_voltage’ [-Wmissing-prototypes]
 3851 | int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/regulator/consumer.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 6a92fd3105a31..2024944fd2f78 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -32,10 +32,12 @@
 #define __LINUX_REGULATOR_CONSUMER_H_
 
 #include <linux/err.h>
+#include <linux/suspend.h>
 
 struct device;
 struct notifier_block;
 struct regmap;
+struct regulator_dev;
 
 /*
  * Regulator operating modes.
@@ -277,6 +279,14 @@ int regulator_unregister_notifier(struct regulator *regulator,
 void devm_regulator_unregister_notifier(struct regulator *regulator,
 					struct notifier_block *nb);
 
+/* regulator suspend */
+int regulator_suspend_enable(struct regulator_dev *rdev,
+			     suspend_state_t state);
+int regulator_suspend_disable(struct regulator_dev *rdev,
+			      suspend_state_t state);
+int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
+				  int max_uV, suspend_state_t state);
+
 /* driver data - core doesn't touch */
 void *regulator_get_drvdata(struct regulator *regulator);
 void regulator_set_drvdata(struct regulator *regulator, void *data);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
  2020-06-25 16:36 ` [PATCH 01/10] regulator: consumer: Supply missing prototypes for 3 core functions Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 17:28   ` Mark Brown
  2020-06-25 16:36 ` [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument Lee Jones
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Provide descriptions for some missing function args and
rename others to match the names used.

Fixes the following W=1 warning(s):

 drivers/regulator/devres.c:187: warning: Function parameter or member 'dev' not described in 'devm_regulator_register'
 drivers/regulator/devres.c:226: warning: Function parameter or member 'dev' not described in 'devm_regulator_unregister'
 drivers/regulator/devres.c:226: warning: Function parameter or member 'rdev' not described in 'devm_regulator_unregister'
 drivers/regulator/devres.c:226: warning: Excess function parameter 'regulator' description in 'devm_regulator_unregister'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/devres.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 3ea1c170f8402..d59009d07a57e 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -173,6 +173,7 @@ static void devm_rdev_release(struct device *dev, void *res)
 
 /**
  * devm_regulator_register - Resource managed regulator_register()
+ * @dev: device for regulator "consumer"
  * @regulator_desc: regulator to register
  * @config: runtime configuration for regulator
  *
@@ -216,7 +217,8 @@ static int devm_rdev_match(struct device *dev, void *res, void *data)
 
 /**
  * devm_regulator_unregister - Resource managed regulator_unregister()
- * @regulator: regulator to free
+ * @dev: device for regulator "consumer"
+ * @rdev: regulator to free
  *
  * Unregister a regulator registered with devm_regulator_register().
  * Normally this function will not need to be called and the resource
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
  2020-06-25 16:36 ` [PATCH 01/10] regulator: consumer: Supply missing prototypes for 3 core functions Lee Jones
  2020-06-25 16:36 ` [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 17:29   ` Mark Brown
  2020-06-25 16:36 ` [PATCH 04/10] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase() Lee Jones
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Kerneldoc validation gets confused if syntax isn't "@.*: ".

Adding the missing colons squashes the following W=1 warnings:

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/of_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 87637eb6bcbcb..292e68c818ea1 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -532,7 +532,7 @@ static bool of_coupling_find_node(struct device_node *src,
 /**
  * of_check_coupling_data - Parse rdev's coupling properties and check data
  *			    consistency
- * @rdev - pointer to regulator_dev whose data is checked
+ * @rdev: - pointer to regulator_dev whose data is checked
  *
  * Function checks if all the following conditions are met:
  * - rdev's max_spread is greater than 0
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 04/10] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase()
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (2 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 05/10] regulator: ab8500: Remove unused embedded struct expand_register Lee Jones
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

There isn't any code present within the current kernel to
override this 'weak' function.  Besides returning '0', which
is never checked anyway, the whole function appears to be
superfluous.

Consequently fixes W=1 warning:

 drivers/regulator/dbx500-prcmu.c:113:27: warning: no previous prototype for ‘dbx500_regulator_testcase’ [-Wmissing-prototypes]
 113 | int __attribute__((weak)) dbx500_regulator_testcase(
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/dbx500-prcmu.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index f604c8db6d0e9..c3ad6aa6b5d37 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -110,13 +110,6 @@ static int ux500_regulator_status_show(struct seq_file *s, void *p)
 }
 DEFINE_SHOW_ATTRIBUTE(ux500_regulator_status);
 
-int __attribute__((weak)) dbx500_regulator_testcase(
-	struct dbx500_regulator_info *regulator_info,
-	int num_regulators)
-{
-	return 0;
-}
-
 int
 ux500_regulator_debug_init(struct platform_device *pdev,
 	struct dbx500_regulator_info *regulator_info,
@@ -152,7 +145,6 @@ ux500_regulator_debug_init(struct platform_device *pdev,
 	if (!rdebug.state_after_suspend)
 		goto exit_free;
 
-	dbx500_regulator_testcase(regulator_info, num_regulators);
 	return 0;
 
 exit_free:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 05/10] regulator: ab8500: Remove unused embedded struct expand_register
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (3 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 04/10] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase() Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 06/10] regulator: wm8350-regulator: Repair odd formatting in documentation Lee Jones
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Used primarily for the AB8540 which lost support in early 2018.
It is now deemed safe to remove this legacy data structure.

Also fixes W=1 issue:

  drivers/regulator/ab8500.c:88: warning: Function parameter or member 'expand_register' not described in 'ab8500_regulator_info'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/ab8500.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 716ca5bb178e7..47b8b6f7b5715 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -59,6 +59,7 @@ struct ab8500_shared_mode {
  * @voltage_bank: bank to control regulator voltage
  * @voltage_reg: register to control regulator voltage
  * @voltage_mask: mask to control regulator voltage
+ * @expand_register: 
  */
 struct ab8500_regulator_info {
 	struct device		*dev;
@@ -79,12 +80,6 @@ struct ab8500_regulator_info {
 	u8 voltage_bank;
 	u8 voltage_reg;
 	u8 voltage_mask;
-	struct {
-		u8 voltage_limit;
-		u8 voltage_bank;
-		u8 voltage_reg;
-		u8 voltage_mask;
-	} expand_register;
 };
 
 /* voltage tables for the vauxn/vintcore supplies */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 06/10] regulator: wm8350-regulator: Repair odd formatting in documentation
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (4 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 05/10] regulator: ab8500: Remove unused embedded struct expand_register Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 07/10] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore' Lee Jones
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Kerneldoc expects function arguments to be in the format '@.*:'.  If
this format is not followed the kerneldoc tooling/parsers/validators
get confused.

Fixes the following W=1 warning(s):

 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'wm8350' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'lednum' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'dcdc' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'isink' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'pdata' not described in 'wm8350_register_led'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/wm8350-regulator.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index ae5f0e7fce8bb..2e7bfdf7c87bb 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1216,11 +1216,11 @@ EXPORT_SYMBOL_GPL(wm8350_register_regulator);
 /**
  * wm8350_register_led - Register a WM8350 LED output
  *
- * @param wm8350 The WM8350 device to configure.
- * @param lednum LED device index to create.
- * @param dcdc The DCDC to use for the LED.
- * @param isink The ISINK to use for the LED.
- * @param pdata Configuration for the LED.
+ * @wm8350: The WM8350 device to configure.
+ * @lednum: LED device index to create.
+ * @dcdc: The DCDC to use for the LED.
+ * @isink: The ISINK to use for the LED.
+ * @pdata: Configuration for the LED.
  *
  * The WM8350 supports the use of an ISINK together with a DCDC to
  * provide a power-efficient LED driver.  This function registers the
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 07/10] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore'
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (5 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 06/10] regulator: wm8350-regulator: Repair odd formatting in documentation Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 08/10] regulator: cpcap-regulator: Demote kerneldoc header to standard comment Lee Jones
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

It's okay to not check the return value that you're not conserned
about, however it is not okay to assign a variable and not check or
use the result.

Fixes W=1 warnings(s):

 drivers/regulator/cpcap-regulator.c:172:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
 172 | int error, ignore;
 | ^~~~~~
 drivers/regulator/cpcap-regulator.c: In function ‘cpcap_regulator_disable’:
 drivers/regulator/cpcap-regulator.c:196:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
 196 | int error, ignore;
 | ^~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/cpcap-regulator.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c
index f80781d58a282..fbf823b830308 100644
--- a/drivers/regulator/cpcap-regulator.c
+++ b/drivers/regulator/cpcap-regulator.c
@@ -169,7 +169,7 @@ enum cpcap_regulator_id {
 static int cpcap_regulator_enable(struct regulator_dev *rdev)
 {
 	struct cpcap_regulator *regulator = rdev_get_drvdata(rdev);
-	int error, ignore;
+	int error;
 
 	error = regulator_enable_regmap(rdev);
 	if (error)
@@ -180,7 +180,7 @@ static int cpcap_regulator_enable(struct regulator_dev *rdev)
 					   regulator->assign_mask,
 					   regulator->assign_mask);
 		if (error)
-			ignore = regulator_disable_regmap(rdev);
+			regulator_disable_regmap(rdev);
 	}
 
 	return error;
@@ -193,7 +193,7 @@ static int cpcap_regulator_enable(struct regulator_dev *rdev)
 static int cpcap_regulator_disable(struct regulator_dev *rdev)
 {
 	struct cpcap_regulator *regulator = rdev_get_drvdata(rdev);
-	int error, ignore;
+	int error;
 
 	if (rdev->desc->enable_val & CPCAP_REG_OFF_MODE_SEC) {
 		error = regmap_update_bits(rdev->regmap, regulator->assign_reg,
@@ -204,9 +204,9 @@ static int cpcap_regulator_disable(struct regulator_dev *rdev)
 
 	error = regulator_disable_regmap(rdev);
 	if (error && (rdev->desc->enable_val & CPCAP_REG_OFF_MODE_SEC)) {
-		ignore = regmap_update_bits(rdev->regmap, regulator->assign_reg,
-					    regulator->assign_mask,
-					    regulator->assign_mask);
+		regmap_update_bits(rdev->regmap, regulator->assign_reg,
+				   regulator->assign_mask,
+				   regulator->assign_mask);
 	}
 
 	return error;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 08/10] regulator: cpcap-regulator: Demote kerneldoc header to standard comment
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (6 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 07/10] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore' Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 16:36 ` [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings Lee Jones
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Nothing about this comment identifies it as a kerneldoc header.
They're missing all of their struct's property descriptions and
the correct 'struct *' header.

Fixes the following W=1 warning(s):

 drivers/regulator/cpcap-regulator.c:99: warning: cannot understand function prototype: 'struct cpcap_regulator '
 drivers/regulator/cpcap-regulator.c:337: warning: cannot understand function prototype: 'const struct cpcap_regulator omap4_regulators[] = '

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/cpcap-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c
index fbf823b830308..221e8db358c9e 100644
--- a/drivers/regulator/cpcap-regulator.c
+++ b/drivers/regulator/cpcap-regulator.c
@@ -89,7 +89,7 @@
  */
 #define CPCAP_REG_OFF_MODE_SEC		BIT(15)
 
-/**
+/*
  * SoC specific configuration for CPCAP regulator. There are at least three
  * different SoCs each with their own parameters: omap3, omap4 and tegra2.
  *
@@ -325,7 +325,7 @@ static const unsigned int vvib_val_tbl[] = { 1300000, 1800000, 2000000,
 static const unsigned int vusb_val_tbl[] = { 0, 3300000, };
 static const unsigned int vaudio_val_tbl[] = { 0, 2775000, };
 
-/**
+/*
  * SoC specific configuration for omap4. The data below is comes from Motorola
  * Linux kernel tree. It's basically the values of cpcap_regltr_data,
  * cpcap_regulator_mode_values and cpcap_regulator_off_mode_values, see
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (7 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 08/10] regulator: cpcap-regulator: Demote kerneldoc header to standard comment Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 17:44   ` Mark Brown
  2020-06-25 16:36 ` [PATCH 10/10] regulator: max14577-regulator: Demote kerneldoc header to standard comment Lee Jones
  2020-06-25 19:58 ` [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Mark Brown
  10 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Looks as though 9f75ce666199 ("regulator: da9063: fix suspend") failed
to clean-up all of the existing .suspend variable initialisations.
This has led to some 'initilized field overwritten' issues now present
in W=1 builds.

This patch squashes the following build warnings:

 In file included from drivers/regulator/da9063-regulator.c:17:
 include/linux/regmap.h:1124:37: warning: initialized field overwritten [-Woverride-init]
 1124 | #define REG_FIELD(_reg, _lsb, _msb) { | ^
 drivers/regulator/da9063-regulator.c:27:2: note: in expansion of macro ‘REG_FIELD’
 27 | REG_FIELD(_reg, __builtin_ffs((int)_mask) - 1, | ^~~~~~~~~
 drivers/regulator/da9063-regulator.c:515:14: note: in expansion of macro ‘BFIELD’
 515 | .suspend = BFIELD(DA9063_REG_LDO9_CONT, DA9063_VLDO9_SEL),
 | ^~~~~~
 include/linux/regmap.h:1124:37: note: (near initialization for ‘da9063_regulator_info[11].suspend’)
 1124 | #define REG_FIELD(_reg, _lsb, _msb) { | ^
 drivers/regulator/da9063-regulator.c:27:2: note: in expansion of macro ‘REG_FIELD’
 27 | REG_FIELD(_reg, __builtin_ffs((int)_mask) - 1, | ^~~~~~~~~
 drivers/regulator/da9063-regulator.c:515:14: note: in expansion of macro ‘BFIELD’
 515 | .suspend = BFIELD(DA9063_REG_LDO9_CONT, DA9063_VLDO9_SEL),
 | ^~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/da9063-regulator.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index e1d6c8f6d40bb..fe65b5acaf280 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -512,7 +512,6 @@ static const struct da9063_regulator_info da9063_regulator_info[] = {
 	},
 	{
 		DA9063_LDO(DA9063, LDO9, 950, 50, 3600),
-		.suspend = BFIELD(DA9063_REG_LDO9_CONT, DA9063_VLDO9_SEL),
 	},
 	{
 		DA9063_LDO(DA9063, LDO11, 900, 50, 3600),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 10/10] regulator: max14577-regulator: Demote kerneldoc header to standard comment
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (8 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings Lee Jones
@ 2020-06-25 16:36 ` Lee Jones
  2020-06-25 19:58 ` [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Mark Brown
  10 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 16:36 UTC (permalink / raw)
  To: lgirdwood, broonie; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

Nothing about this comment identifies it as a kerneldoc header.
It's missing all of it's function argument descriptions and the
correct function header.

Fixes the following W=1 warning(s):

 drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'max14577' not described in 'max14577_get_regma
 drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'reg_id' not described in 'max14577_get_regmap'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/max14577-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c
index 07a150c9bbf22..e34face736f48 100644
--- a/drivers/regulator/max14577-regulator.c
+++ b/drivers/regulator/max14577-regulator.c
@@ -155,7 +155,7 @@ static const struct regulator_desc max77836_supported_regulators[] = {
 	[MAX77836_LDO2] = MAX77836_LDO_REG(2),
 };
 
-/**
+/*
  * Registers for regulators of max77836 use different I2C slave addresses so
  * different regmaps must be used for them.
  *
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers
  2020-06-25 16:36 ` [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers Lee Jones
@ 2020-06-25 17:28   ` Mark Brown
  2020-06-25 18:42     ` Lee Jones
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Brown @ 2020-06-25 17:28 UTC (permalink / raw)
  To: Lee Jones; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

On Thu, Jun 25, 2020 at 05:36:06PM +0100, Lee Jones wrote:

>  /**
>   * devm_regulator_register - Resource managed regulator_register()
> + * @dev: device for regulator "consumer"
>   * @regulator_desc: regulator to register
>   * @config: runtime configuration for regulator
>   *

That's an odd style you're using in your "change" here - why the quotes?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument
  2020-06-25 16:36 ` [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument Lee Jones
@ 2020-06-25 17:29   ` Mark Brown
  2020-06-25 18:42     ` Lee Jones
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Brown @ 2020-06-25 17:29 UTC (permalink / raw)
  To: Lee Jones; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

On Thu, Jun 25, 2020 at 05:36:07PM +0100, Lee Jones wrote:
> Kerneldoc validation gets confused if syntax isn't "@.*: ".
> 
> Adding the missing colons squashes the following W=1 warnings:

>   * of_check_coupling_data - Parse rdev's coupling properties and check data
>   *			    consistency
> - * @rdev - pointer to regulator_dev whose data is checked
> + * @rdev: - pointer to regulator_dev whose data is checked

It shuts up the warning but are you sure this is going to get formatted
well by the tools?  We now have a - as the first character in the
description which I'm guessing the tools are going to render which won't
look great.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings
  2020-06-25 16:36 ` [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings Lee Jones
@ 2020-06-25 17:44   ` Mark Brown
  2020-06-25 18:43     ` Lee Jones
  0 siblings, 1 reply; 19+ messages in thread
From: Mark Brown @ 2020-06-25 17:44 UTC (permalink / raw)
  To: Lee Jones; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

On Thu, Jun 25, 2020 at 05:36:13PM +0100, Lee Jones wrote:
> Looks as though 9f75ce666199 ("regulator: da9063: fix suspend") failed

$ git show 9f75ce666199
fatal: ambiguous argument '9f75ce666199': unknown revision or path not in the working tree.

You should probably CC this to the authors of that commit - a similar
thing applies to several of the other patches here.  You probably don't
want to CC everyone on everything but OTOH there isn't really any need
for things to be bundled up in a series anyway.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers
  2020-06-25 17:28   ` Mark Brown
@ 2020-06-25 18:42     ` Lee Jones
  2020-06-25 18:45       ` Mark Brown
  0 siblings, 1 reply; 19+ messages in thread
From: Lee Jones @ 2020-06-25 18:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

On Thu, 25 Jun 2020, Mark Brown wrote:

> On Thu, Jun 25, 2020 at 05:36:06PM +0100, Lee Jones wrote:
> 
> >  /**
> >   * devm_regulator_register - Resource managed regulator_register()
> > + * @dev: device for regulator "consumer"
> >   * @regulator_desc: regulator to register
> >   * @config: runtime configuration for regulator
> >   *
> 
> That's an odd style you're using in your "change" here - why the quotes?

It's taken from other instances in the same file.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument
  2020-06-25 17:29   ` Mark Brown
@ 2020-06-25 18:42     ` Lee Jones
  0 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 18:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

On Thu, 25 Jun 2020, Mark Brown wrote:

> On Thu, Jun 25, 2020 at 05:36:07PM +0100, Lee Jones wrote:
> > Kerneldoc validation gets confused if syntax isn't "@.*: ".
> > 
> > Adding the missing colons squashes the following W=1 warnings:
> 
> >   * of_check_coupling_data - Parse rdev's coupling properties and check data
> >   *			    consistency
> > - * @rdev - pointer to regulator_dev whose data is checked
> > + * @rdev: - pointer to regulator_dev whose data is checked
> 
> It shuts up the warning but are you sure this is going to get formatted
> well by the tools?  We now have a - as the first character in the
> description which I'm guessing the tools are going to render which won't
> look great.

Happy to fix.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings
  2020-06-25 17:44   ` Mark Brown
@ 2020-06-25 18:43     ` Lee Jones
  0 siblings, 0 replies; 19+ messages in thread
From: Lee Jones @ 2020-06-25 18:43 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

On Thu, 25 Jun 2020, Mark Brown wrote:

> On Thu, Jun 25, 2020 at 05:36:13PM +0100, Lee Jones wrote:
> > Looks as though 9f75ce666199 ("regulator: da9063: fix suspend") failed
> 
> $ git show 9f75ce666199
> fatal: ambiguous argument '9f75ce666199': unknown revision or path not in the working tree.
> 
> You should probably CC this to the authors of that commit - a similar
> thing applies to several of the other patches here.  You probably don't
> want to CC everyone on everything but OTOH there isn't really any need
> for things to be bundled up in a series anyway.

Sounds fair.  Will Cc important people on individual patches.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers
  2020-06-25 18:42     ` Lee Jones
@ 2020-06-25 18:45       ` Mark Brown
  0 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2020-06-25 18:45 UTC (permalink / raw)
  To: Lee Jones; +Cc: lgirdwood, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]

On Thu, Jun 25, 2020 at 07:42:18PM +0100, Lee Jones wrote:
> On Thu, 25 Jun 2020, Mark Brown wrote:
> > On Thu, Jun 25, 2020 at 05:36:06PM +0100, Lee Jones wrote:

> > > + * @dev: device for regulator "consumer"

> > That's an odd style you're using in your "change" here - why the quotes?

> It's taken from other instances in the same file.

Should probably fix the others then - I suspect it's bitrot and
cut'n'paste from when there was a parameter called consumer.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator
  2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
                   ` (9 preceding siblings ...)
  2020-06-25 16:36 ` [PATCH 10/10] regulator: max14577-regulator: Demote kerneldoc header to standard comment Lee Jones
@ 2020-06-25 19:58 ` Mark Brown
  10 siblings, 0 replies; 19+ messages in thread
From: Mark Brown @ 2020-06-25 19:58 UTC (permalink / raw)
  To: lgirdwood, Lee Jones; +Cc: linux-arm-kernel, linux-kernel

On Thu, 25 Jun 2020 17:36:04 +0100, Lee Jones wrote:
> Attempting to clean-up W=1 kernel builds, which are currently
> overwhelmingly riddled with niggly little warnings.
> 
> Lee Jones (10):
>   regulator: consumer: Supply missing prototypes for 3 core functions
>   regulator: devres: Fix issues with kerneldoc headers
>   regulator: of_regulator: Add missing colon for rdev kerneldoc argument
>   regulator: dbx500-prcmu: Remove unused function
>     dbx500_regulator_testcase()
>   regulator: ab8500: Remove unused embedded struct expand_register
>   regulator: wm8350-regulator: Repair odd formatting in documentation
>   regulator: cpcap-regulator: Remove declared and set, but never used
>     variable 'ignore'
>   regulator: cpcap-regulator: Demote kerneldoc header to standard
>     comment
>   regulator: da9063-regulator: Fix .suspend 'initialized field
>     overwritten' warnings
>   regulator: max14577-regulator: Demote kerneldoc header to standard
>     comment
> 
> [...]

Applied to

   local tree regulator-next

Thanks!

[1/7] regulator: consumer: Supply missing prototypes for 3 core functions
      commit: da6690767cbd344998f36081815c85f3d467e78c
[2/7] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase()
      commit: d3cc3dfcc20e72d537550dbeebbe4a8faa7c2606
[3/7] regulator: ab8500: Remove unused embedded struct expand_register
      commit: aeee55b76bfd100d2612f50d2f9526d760ee2e37
[4/7] regulator: wm8350-regulator: Repair odd formatting in documentation
      commit: 2f5add1e42165c7eb7e4367e1180ae76aa13d394
[5/7] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore'
      commit: b89a5effb3345a484584cc2b090af62e1ecb0871
[6/7] regulator: cpcap-regulator: Demote kerneldoc header to standard comment
      commit: 7b804ce0c2e0bbf77b3a1d4b457520145822c496
[7/7] regulator: max14577-regulator: Demote kerneldoc header to standard comment
      commit: 0c32f8aa0711af177248c2cba9cb105f18e0c9bb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-06-25 19:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 16:36 [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Lee Jones
2020-06-25 16:36 ` [PATCH 01/10] regulator: consumer: Supply missing prototypes for 3 core functions Lee Jones
2020-06-25 16:36 ` [PATCH 02/10] regulator: devres: Fix issues with kerneldoc headers Lee Jones
2020-06-25 17:28   ` Mark Brown
2020-06-25 18:42     ` Lee Jones
2020-06-25 18:45       ` Mark Brown
2020-06-25 16:36 ` [PATCH 03/10] regulator: of_regulator: Add missing colon for rdev kerneldoc argument Lee Jones
2020-06-25 17:29   ` Mark Brown
2020-06-25 18:42     ` Lee Jones
2020-06-25 16:36 ` [PATCH 04/10] regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase() Lee Jones
2020-06-25 16:36 ` [PATCH 05/10] regulator: ab8500: Remove unused embedded struct expand_register Lee Jones
2020-06-25 16:36 ` [PATCH 06/10] regulator: wm8350-regulator: Repair odd formatting in documentation Lee Jones
2020-06-25 16:36 ` [PATCH 07/10] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore' Lee Jones
2020-06-25 16:36 ` [PATCH 08/10] regulator: cpcap-regulator: Demote kerneldoc header to standard comment Lee Jones
2020-06-25 16:36 ` [PATCH 09/10] regulator: da9063-regulator: Fix .suspend 'initialized field overwritten' warnings Lee Jones
2020-06-25 17:44   ` Mark Brown
2020-06-25 18:43     ` Lee Jones
2020-06-25 16:36 ` [PATCH 10/10] regulator: max14577-regulator: Demote kerneldoc header to standard comment Lee Jones
2020-06-25 19:58 ` [PATCH 00/10] Fix a bunch of W=1 warnings in Regulator Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).