linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator
@ 2020-06-26  6:57 Lee Jones
  2020-06-26  6:57 ` [PATCH 1/9] regulator: max8998: Staticify internal function max8998_get_current_limit() Lee Jones
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood; +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.

This is the last of them.  Once applied, drivers/regulator will
be clean of W=1 warnings.

Lee Jones (9):
  regulator: max8998: Staticify internal function
    max8998_get_current_limit()
  regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header
    formatting
  regulator: pwm-regulator: Demote kerneldoc header to standard comment
  regulator: stpmic1_regulator: Properly document 'struct
    stpmic1_regulator_cfg'
  regulator: tps65217-regulator: Remove pointless 'is unsigned int <0'
    check
  regulator: tps65217-regulator: Use the returned value of
    tps65217_reg_read()
  regulator: tps65218-regulator: Remove pointless 'is unsigned int <0'
    check
  regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
  regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc
    pmi8994_boost'

 drivers/regulator/max8998.c             |  2 +-
 drivers/regulator/pwm-regulator.c       |  2 +-
 drivers/regulator/qcom-rpmh-regulator.c | 14 +++++++-------
 drivers/regulator/qcom_smd-regulator.c  |  9 ---------
 drivers/regulator/stpmic1_regulator.c   |  2 +-
 drivers/regulator/tps65217-regulator.c  |  7 +++++--
 drivers/regulator/tps65218-regulator.c  |  4 ++--
 drivers/regulator/wm8400-regulator.c    |  6 +++---
 8 files changed, 20 insertions(+), 26 deletions(-)

-- 
2.25.1


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

* [PATCH 1/9] regulator: max8998: Staticify internal function max8998_get_current_limit()
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  6:57 ` [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting Lee Jones
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Kyungmin Park,
	Marek Szyprowski

max8998_get_current_limit() is only used via the .get_current_limit,
so it doesn't need to be publicly supported, or to have its own
external prototype.  Instead, we'll make it static.

Fixes the following W=1 warning:

 drivers/regulator/max8998.c:418:5: warning: no previous prototype for ‘max8998_get_current_limit’ [-Wmissing-prototypes]
 418 | int max8998_get_current_limit(struct regulator_dev *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/max8998.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 340413bba0c5f..ac69bdd398cb3 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -415,7 +415,7 @@ static int max8998_set_current_limit(struct regulator_dev *rdev,
 				  sel, rdev->desc->csel_mask);
 }
 
-int max8998_get_current_limit(struct regulator_dev *rdev)
+static int max8998_get_current_limit(struct regulator_dev *rdev)
 {
 	struct max8998_data *max8998 = rdev_get_drvdata(rdev);
 	struct i2c_client *i2c = max8998->iodev->i2c;
-- 
2.25.1


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

* [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
  2020-06-26  6:57 ` [PATCH 1/9] regulator: max8998: Staticify internal function max8998_get_current_limit() Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  7:18   ` Bjorn Andersson
  2020-06-26  6:57 ` [PATCH 3/9] regulator: pwm-regulator: Demote kerneldoc header to standard comment Lee Jones
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Andy Gross,
	Bjorn Andersson, linux-arm-msm

W=1 kernel builds report a lack of descriptions for various
enum properties and function arguments.  In reality they are
documented, but the formatting was not as expected '@.*:'.
Instead, some weird arg identifiers were used or none at all.

This change fixes the following warnings:

 drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type'
 drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg'

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/qcom-rpmh-regulator.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 79bdc129cb504..08dcc614efa7f 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -22,9 +22,9 @@
 
 /**
  * enum rpmh_regulator_type - supported RPMh accelerator types
- * %VRM:	RPMh VRM accelerator which supports voting on enable, voltage,
+ * @VRM:	RPMh VRM accelerator which supports voting on enable, voltage,
  *		and mode of LDO, SMPS, and BOB type PMIC regulators.
- * %XOB:	RPMh XOB accelerator which supports voting on the enable state
+ * @XOB:	RPMh XOB accelerator which supports voting on the enable state
  *		of PMIC regulators.
  */
 enum rpmh_regulator_type {
@@ -399,13 +399,13 @@ static const struct regulator_ops rpmh_regulator_xob_ops = {
 
 /**
  * rpmh_regulator_init_vreg() - initialize all attributes of an rpmh-regulator
- * vreg:		Pointer to the individual rpmh-regulator resource
- * dev:			Pointer to the top level rpmh-regulator PMIC device
- * node:		Pointer to the individual rpmh-regulator resource
+ * @vreg:		Pointer to the individual rpmh-regulator resource
+ * @dev:			Pointer to the top level rpmh-regulator PMIC device
+ * @node:		Pointer to the individual rpmh-regulator resource
  *			device node
- * pmic_id:		String used to identify the top level rpmh-regulator
+ * @pmic_id:		String used to identify the top level rpmh-regulator
  *			PMIC device on the board
- * pmic_rpmh_data:	Pointer to a null-terminated array of rpmh-regulator
+ * @pmic_rpmh_data:	Pointer to a null-terminated array of rpmh-regulator
  *			resources defined for the top level PMIC device
  *
  * Return: 0 on success, errno on failure
-- 
2.25.1


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

* [PATCH 3/9] regulator: pwm-regulator: Demote kerneldoc header to standard comment
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
  2020-06-26  6:57 ` [PATCH 1/9] regulator: max8998: Staticify internal function max8998_get_current_limit() Lee Jones
  2020-06-26  6:57 ` [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  6:57 ` [PATCH 4/9] regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg' Lee Jones
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: linux-arm-kernel, linux-kernel, Lee Jones

This particular comment doesn't have anything to do with documenting
functions or data structures.  Instead it is used as a section header.

Fixes W=1 warning:

 drivers/regulator/pwm-regulator.c:55: warning: Function parameter or member 'rdev' not described in 'pwm_regulator_init_state'

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

diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index 638329bd0745e..3234b118b53ea 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -48,7 +48,7 @@ struct pwm_voltages {
 	unsigned int dutycycle;
 };
 
-/**
+/*
  * Voltage table call-backs
  */
 static void pwm_regulator_init_state(struct regulator_dev *rdev)
-- 
2.25.1


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

* [PATCH 4/9] regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg'
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (2 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 3/9] regulator: pwm-regulator: Demote kerneldoc header to standard comment Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  6:57 ` [PATCH 5/9] regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Pascal Paillet

In kerneldoc format, data structures have to start with 'struct'
else the kerneldoc tooling/parsers/validators get confused.

Fixes the following W=1 kernel build warning:

 drivers/regulator/stpmic1_regulator.c:25: warning: cannot understand function prototype: 'struct stpmic1_regulator_cfg '

Cc: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/stpmic1_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c
index adc9973d1b2f7..73e0ab2baeaa6 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -15,7 +15,7 @@
 #include <dt-bindings/mfd/st,stpmic1.h>
 
 /**
- * stpmic1 regulator description: this structure is used as driver data
+ * struct stpmic1 regulator description: this structure is used as driver data
  * @desc: regulator framework description
  * @mask_reset_reg: mask reset register address
  * @mask_reset_mask: mask rank and mask reset register mask
-- 
2.25.1


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

* [PATCH 5/9] regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (3 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 4/9] regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg' Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  6:57 ` [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Lee Jones
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Russ Dill, Keerthy,
	AnilKumar Ch, linux-omap

'rid' is declared as unsigned int, so there is little point checking for <0.

Removing these checks fixes the following W=1 warnings:

 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_enable’:
 drivers/regulator/tps65217-regulator.c:127:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 127 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 | ^
 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_disable’:
 drivers/regulator/tps65217-regulator.c:140:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 140 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 | ^

Cc: Russ Dill <Russ.Dill@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/tps65217-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index d27dbbafcf721..f2d3a4a9f3e77 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -124,7 +124,7 @@ static int tps65217_pmic_set_suspend_enable(struct regulator_dev *dev)
 	struct tps65217 *tps = rdev_get_drvdata(dev);
 	unsigned int rid = rdev_get_id(dev);
 
-	if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
+	if (rid > TPS65217_LDO_4)
 		return -EINVAL;
 
 	return tps65217_clear_bits(tps, dev->desc->bypass_reg,
@@ -137,7 +137,7 @@ static int tps65217_pmic_set_suspend_disable(struct regulator_dev *dev)
 	struct tps65217 *tps = rdev_get_drvdata(dev);
 	unsigned int rid = rdev_get_id(dev);
 
-	if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
+	if (rid > TPS65217_LDO_4)
 		return -EINVAL;
 
 	if (!tps->strobes[rid])
-- 
2.25.1


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

* [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (4 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 5/9] regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26 13:33   ` Mark Brown
  2020-06-26  6:57 ` [PATCH 7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Russ Dill, Keerthy,
	AnilKumar Ch, linux-omap

Until now the aforementioned return value has been ignored.
Previous and current calls to tps65217_reg_read() return
instantly when the value is not 0, so let's do that.

Fixes the following W=1 warning:

 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_regulator_probe’:
 drivers/regulator/tps65217-regulator.c:227:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 227 | int i, ret;
 | ^~~

Cc: Russ Dill <Russ.Dill@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/tps65217-regulator.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index f2d3a4a9f3e77..3f5ea029e2e3f 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -254,6 +254,9 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
 
 		/* Store default strobe info */
 		ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val);
+		if (ret)
+			return ret;
+
 		tps->strobes[i] = val & regulators[i].bypass_mask;
 	}
 
-- 
2.25.1


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

* [PATCH 7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (5 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  6:57 ` [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting Lee Jones
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Keerthy, Tero Kristo,
	Dave Gerlach, linux-omap

'rid' is declared as unsigned int, so there is little point checking for <0.

Removing these checks fixes the following W=1 warnings:

 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_enable’:
 drivers/regulator/tps65218-regulator.c:131:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 131 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^
 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_disable’:
 drivers/regulator/tps65218-regulator.c:144:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 144 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^

Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/tps65218-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index 05d13f8079182..9133d0af793a7 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -128,7 +128,7 @@ static int tps65218_pmic_set_suspend_enable(struct regulator_dev *dev)
 	struct tps65218 *tps = rdev_get_drvdata(dev);
 	unsigned int rid = rdev_get_id(dev);
 
-	if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
+	if (rid > TPS65218_LDO_1)
 		return -EINVAL;
 
 	return tps65218_clear_bits(tps, dev->desc->bypass_reg,
@@ -141,7 +141,7 @@ static int tps65218_pmic_set_suspend_disable(struct regulator_dev *dev)
 	struct tps65218 *tps = rdev_get_drvdata(dev);
 	unsigned int rid = rdev_get_id(dev);
 
-	if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
+	if (rid > TPS65218_LDO_1)
 		return -EINVAL;
 
 	/*
-- 
2.25.1


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

* [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (6 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  9:20   ` Charles Keepax
  2020-06-26  6:57 ` [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost' Lee Jones
  2020-06-26 15:21 ` [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Mark Brown
  9 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: linux-arm-kernel, linux-kernel, Lee Jones, patches

W=1 kernel builds report a lack of descriptions for various
function arguments.  In reality they are documented, but the
formatting was not as expected '@.*:'.  Instead, some weird
arg identifiers were used.

This change fixes the following warnings:

 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'dev' not described in 'wm8400_register_regulator'
 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'reg' not described in 'wm8400_register_regulator'
 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'initdata' not described in 'wm8400_register_regulator'

Cc: patches@opensource.cirrus.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/wm8400-regulator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index 4cb1fbb597227..e9fd137077213 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -234,9 +234,9 @@ static struct platform_driver wm8400_regulator_driver = {
  * the regulator API.  It is intended to be called from the
  * platform_init() callback of the WM8400 MFD driver.
  *
- * @param dev      The WM8400 device to operate on.
- * @param reg      The regulator to control.
- * @param initdata Regulator initdata for the regulator.
+ * @dev:      The WM8400 device to operate on.
+ * @reg:      The regulator to control.
+ * @initdata: Regulator initdata for the regulator.
  */
 int wm8400_register_regulator(struct device *dev, int reg,
 			      struct regulator_init_data *initdata)
-- 
2.25.1


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

* [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost'
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (7 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting Lee Jones
@ 2020-06-26  6:57 ` Lee Jones
  2020-06-26  7:19   ` Bjorn Andersson
  2020-06-26 15:21 ` [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Mark Brown
  9 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2020-06-26  6:57 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-arm-kernel, linux-kernel, Lee Jones, Andy Gross,
	Bjorn Andersson, linux-arm-msm

This was an upstreaming error.  Remove it as it's not to be used.

Fixes the following W=1 kernel build warning:

 drivers/regulator/qcom_smd-regulator.c:477:36: warning: ‘pmi8994_boost’ defined but not used [-Wunused-const-variable=]

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/regulator/qcom_smd-regulator.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index 53a64d856926f..4c0a469d8a115 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -474,15 +474,6 @@ static const struct regulator_desc pmi8994_bby = {
 	.ops = &rpm_bob_ops,
 };
 
-static const struct regulator_desc pmi8994_boost = {
-	.linear_ranges = (struct linear_range[]) {
-		REGULATOR_LINEAR_RANGE(4000000, 0, 30, 50000),
-	},
-	.n_linear_ranges = 1,
-	.n_voltages = 31,
-	.ops = &rpm_smps_ldo_ops,
-};
-
 static const struct regulator_desc pm8998_ftsmps = {
 	.linear_ranges = (struct linear_range[]) {
 		REGULATOR_LINEAR_RANGE(320000, 0, 258, 4000),
-- 
2.25.1


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

* Re: [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting
  2020-06-26  6:57 ` [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting Lee Jones
@ 2020-06-26  7:18   ` Bjorn Andersson
  0 siblings, 0 replies; 17+ messages in thread
From: Bjorn Andersson @ 2020-06-26  7:18 UTC (permalink / raw)
  To: Lee Jones
  Cc: broonie, lgirdwood, linux-arm-kernel, linux-kernel, Andy Gross,
	linux-arm-msm

On Thu 25 Jun 23:57 PDT 2020, Lee Jones wrote:

> W=1 kernel builds report a lack of descriptions for various
> enum properties and function arguments.  In reality they are
> documented, but the formatting was not as expected '@.*:'.
> Instead, some weird arg identifiers were used or none at all.
> 
> This change fixes the following warnings:
> 
>  drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type'
>  drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type'
>  drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg'
>  drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg'
>  drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg'
>  drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg'
>  drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg'
> 
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Thanks,
Bjorn

> ---
>  drivers/regulator/qcom-rpmh-regulator.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
> index 79bdc129cb504..08dcc614efa7f 100644
> --- a/drivers/regulator/qcom-rpmh-regulator.c
> +++ b/drivers/regulator/qcom-rpmh-regulator.c
> @@ -22,9 +22,9 @@
>  
>  /**
>   * enum rpmh_regulator_type - supported RPMh accelerator types
> - * %VRM:	RPMh VRM accelerator which supports voting on enable, voltage,
> + * @VRM:	RPMh VRM accelerator which supports voting on enable, voltage,
>   *		and mode of LDO, SMPS, and BOB type PMIC regulators.
> - * %XOB:	RPMh XOB accelerator which supports voting on the enable state
> + * @XOB:	RPMh XOB accelerator which supports voting on the enable state
>   *		of PMIC regulators.
>   */
>  enum rpmh_regulator_type {
> @@ -399,13 +399,13 @@ static const struct regulator_ops rpmh_regulator_xob_ops = {
>  
>  /**
>   * rpmh_regulator_init_vreg() - initialize all attributes of an rpmh-regulator
> - * vreg:		Pointer to the individual rpmh-regulator resource
> - * dev:			Pointer to the top level rpmh-regulator PMIC device
> - * node:		Pointer to the individual rpmh-regulator resource
> + * @vreg:		Pointer to the individual rpmh-regulator resource
> + * @dev:			Pointer to the top level rpmh-regulator PMIC device
> + * @node:		Pointer to the individual rpmh-regulator resource
>   *			device node
> - * pmic_id:		String used to identify the top level rpmh-regulator
> + * @pmic_id:		String used to identify the top level rpmh-regulator
>   *			PMIC device on the board
> - * pmic_rpmh_data:	Pointer to a null-terminated array of rpmh-regulator
> + * @pmic_rpmh_data:	Pointer to a null-terminated array of rpmh-regulator
>   *			resources defined for the top level PMIC device
>   *
>   * Return: 0 on success, errno on failure
> -- 
> 2.25.1
> 

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

* Re: [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost'
  2020-06-26  6:57 ` [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost' Lee Jones
@ 2020-06-26  7:19   ` Bjorn Andersson
  0 siblings, 0 replies; 17+ messages in thread
From: Bjorn Andersson @ 2020-06-26  7:19 UTC (permalink / raw)
  To: Lee Jones
  Cc: broonie, lgirdwood, linux-arm-kernel, linux-kernel, Andy Gross,
	linux-arm-msm

On Thu 25 Jun 23:57 PDT 2020, Lee Jones wrote:

> This was an upstreaming error.  Remove it as it's not to be used.
> 
> Fixes the following W=1 kernel build warning:
> 
>  drivers/regulator/qcom_smd-regulator.c:477:36: warning: ‘pmi8994_boost’ defined but not used [-Wunused-const-variable=]
> 
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Thanks,
Bjorn

> ---
>  drivers/regulator/qcom_smd-regulator.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
> index 53a64d856926f..4c0a469d8a115 100644
> --- a/drivers/regulator/qcom_smd-regulator.c
> +++ b/drivers/regulator/qcom_smd-regulator.c
> @@ -474,15 +474,6 @@ static const struct regulator_desc pmi8994_bby = {
>  	.ops = &rpm_bob_ops,
>  };
>  
> -static const struct regulator_desc pmi8994_boost = {
> -	.linear_ranges = (struct linear_range[]) {
> -		REGULATOR_LINEAR_RANGE(4000000, 0, 30, 50000),
> -	},
> -	.n_linear_ranges = 1,
> -	.n_voltages = 31,
> -	.ops = &rpm_smps_ldo_ops,
> -};
> -
>  static const struct regulator_desc pm8998_ftsmps = {
>  	.linear_ranges = (struct linear_range[]) {
>  		REGULATOR_LINEAR_RANGE(320000, 0, 258, 4000),
> -- 
> 2.25.1
> 

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

* Re: [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
  2020-06-26  6:57 ` [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting Lee Jones
@ 2020-06-26  9:20   ` Charles Keepax
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Keepax @ 2020-06-26  9:20 UTC (permalink / raw)
  To: Lee Jones; +Cc: broonie, lgirdwood, linux-arm-kernel, linux-kernel, patches

On Fri, Jun 26, 2020 at 07:57:37AM +0100, Lee Jones wrote:
> W=1 kernel builds report a lack of descriptions for various
> function arguments.  In reality they are documented, but the
> formatting was not as expected '@.*:'.  Instead, some weird
> arg identifiers were used.
> 
> This change fixes the following warnings:
> 
>  drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'dev' not described in 'wm8400_register_regulator'
>  drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'reg' not described in 'wm8400_register_regulator'
>  drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'initdata' not described in 'wm8400_register_regulator'
> 
> Cc: patches@opensource.cirrus.com
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

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

* Re: [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
  2020-06-26  6:57 ` [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Lee Jones
@ 2020-06-26 13:33   ` Mark Brown
  2020-06-26 15:31     ` Lee Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Mark Brown @ 2020-06-26 13:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: lgirdwood, linux-arm-kernel, linux-kernel, Russ Dill, Keerthy,
	AnilKumar Ch, linux-omap

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

On Fri, Jun 26, 2020 at 07:57:35AM +0100, Lee Jones wrote:

> Until now the aforementioned return value has been ignored.

This is only aforementioned in the subject.

>  		/* Store default strobe info */
>  		ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val);
> +		if (ret)
> +			return ret;
> +

We should really be logging an error there rather than just returning,
that way it's a bit more apparent to someone debugging things what went
wrong if there is actually a problem.

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

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

* Re: [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator
  2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
                   ` (8 preceding siblings ...)
  2020-06-26  6:57 ` [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost' Lee Jones
@ 2020-06-26 15:21 ` Mark Brown
  9 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2020-06-26 15:21 UTC (permalink / raw)
  To: Lee Jones, lgirdwood; +Cc: linux-arm-kernel, linux-kernel

On Fri, 26 Jun 2020 07:57:29 +0100, Lee Jones wrote:
> Attempting to clean-up W=1 kernel builds, which are currently
> overwhelmingly riddled with niggly little warnings.
> 
> This is the last of them.  Once applied, drivers/regulator will
> be clean of W=1 warnings.
> 
> Lee Jones (9):
>   regulator: max8998: Staticify internal function
>     max8998_get_current_limit()
>   regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header
>     formatting
>   regulator: pwm-regulator: Demote kerneldoc header to standard comment
>   regulator: stpmic1_regulator: Properly document 'struct
>     stpmic1_regulator_cfg'
>   regulator: tps65217-regulator: Remove pointless 'is unsigned int <0'
>     check
>   regulator: tps65217-regulator: Use the returned value of
>     tps65217_reg_read()
>   regulator: tps65218-regulator: Remove pointless 'is unsigned int <0'
>     check
>   regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
>   regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc
>     pmi8994_boost'
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/9] regulator: max8998: Staticify internal function max8998_get_current_limit()
      commit: 36f69fa96a23a054d3aea5793ce2ef3d95907713
[2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting
      commit: 7cb5f692077e3b91dcb706cbf58d495d066439ce
[3/9] regulator: pwm-regulator: Demote kerneldoc header to standard comment
      commit: 4e773e7392fb561eb4ae10deb526aa1ac8c13f61
[4/9] regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg'
      commit: ec84a7dff4474d0af6ef003719509e30aa93071d
[5/9] regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check
      commit: f10a5e499cf3e0978845cd85d8a375bcfa193907
[6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
      commit: 44455a6d3bcab53ae8330a009d513ade0f12c0c0
[7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check
      commit: 02d88863198c48675ceb2a244e5985c5650e5fe6
[8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
      commit: 0c5261663785b6505bf5d0f210f1ff0e4bd5ef2c
[9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost'
      commit: bfa29acd18e53ff44135f2eae2b942419a8582cc

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] 17+ messages in thread

* Re: [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
  2020-06-26 13:33   ` Mark Brown
@ 2020-06-26 15:31     ` Lee Jones
  2020-06-26 15:34       ` Mark Brown
  0 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2020-06-26 15:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, linux-arm-kernel, linux-kernel, Russ Dill, Keerthy,
	AnilKumar Ch, linux-omap

On Fri, 26 Jun 2020, Mark Brown wrote:

> On Fri, Jun 26, 2020 at 07:57:35AM +0100, Lee Jones wrote:
> 
> > Until now the aforementioned return value has been ignored.
> 
> This is only aforementioned in the subject.
> 
> >  		/* Store default strobe info */
> >  		ret = tps65217_reg_read(tps, regulators[i].bypass_reg, &val);
> > +		if (ret)
> > +			return ret;
> > +
> 
> We should really be logging an error there rather than just returning,
> that way it's a bit more apparent to someone debugging things what went
> wrong if there is actually a problem.

Would you like me to fix that up subsequently?

-- 
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] 17+ messages in thread

* Re: [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
  2020-06-26 15:31     ` Lee Jones
@ 2020-06-26 15:34       ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2020-06-26 15:34 UTC (permalink / raw)
  To: Lee Jones
  Cc: lgirdwood, linux-arm-kernel, linux-kernel, Russ Dill, Keerthy,
	AnilKumar Ch, linux-omap

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

On Fri, Jun 26, 2020 at 04:31:19PM +0100, Lee Jones wrote:
> On Fri, 26 Jun 2020, Mark Brown wrote:

> > We should really be logging an error there rather than just returning,
> > that way it's a bit more apparent to someone debugging things what went
> > wrong if there is actually a problem.

> Would you like me to fix that up subsequently?

That'd be great, yeah!

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

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

end of thread, other threads:[~2020-06-26 15:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26  6:57 [PATCH 0/9] Fix a bunch more W=1 warnings in Regulator Lee Jones
2020-06-26  6:57 ` [PATCH 1/9] regulator: max8998: Staticify internal function max8998_get_current_limit() Lee Jones
2020-06-26  6:57 ` [PATCH 2/9] regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting Lee Jones
2020-06-26  7:18   ` Bjorn Andersson
2020-06-26  6:57 ` [PATCH 3/9] regulator: pwm-regulator: Demote kerneldoc header to standard comment Lee Jones
2020-06-26  6:57 ` [PATCH 4/9] regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg' Lee Jones
2020-06-26  6:57 ` [PATCH 5/9] regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
2020-06-26  6:57 ` [PATCH 6/9] regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Lee Jones
2020-06-26 13:33   ` Mark Brown
2020-06-26 15:31     ` Lee Jones
2020-06-26 15:34       ` Mark Brown
2020-06-26  6:57 ` [PATCH 7/9] regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check Lee Jones
2020-06-26  6:57 ` [PATCH 8/9] regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting Lee Jones
2020-06-26  9:20   ` Charles Keepax
2020-06-26  6:57 ` [PATCH 9/9] regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost' Lee Jones
2020-06-26  7:19   ` Bjorn Andersson
2020-06-26 15:21 ` [PATCH 0/9] Fix a bunch more 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).