diff mbox series

[v3,19/19] hwmon: (mr75203) fix coding style space errors

Message ID 20220830192212.28570-20-farbere@amazon.com (mailing list archive)
State Changes Requested
Headers show
Series Variety of fixes and new features for mr75203 driver | expand

Commit Message

Farber, Eliav Aug. 30, 2022, 7:22 p.m. UTC
Fix: "ERROR: space required before the open parenthesis '('"

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/hwmon/mr75203.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

Comments

Andy Shevchenko Aug. 31, 2022, 12:15 p.m. UTC | #1
On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
> Fix: "ERROR: space required before the open parenthesis '('"

This patch may have other fixes like adding new blank lines (noted in one
of the patches in the series), etc.
Farber, Eliav Sept. 1, 2022, 2:21 p.m. UTC | #2
On 8/31/2022 3:15 PM, Andy Shevchenko wrote:
> On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
>> Fix: "ERROR: space required before the open parenthesis '('"
>
> This patch may have other fixes like adding new blank lines (noted in one
> of the patches in the series), etc.
This patch fixed a specific space error which existed before my changes
and repeated many time.
I fixed the blank line I added a previous patch (but is it isn’t an error
reported by checkpatch).

--
Regards, Eliav
Guenter Roeck Sept. 1, 2022, 2:46 p.m. UTC | #3
On Thu, Sep 01, 2022 at 05:21:43PM +0300, Farber, Eliav wrote:
> On 8/31/2022 3:15 PM, Andy Shevchenko wrote:
> > On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
> > > Fix: "ERROR: space required before the open parenthesis '('"
> > 
> > This patch may have other fixes like adding new blank lines (noted in one
> > of the patches in the series), etc.
> This patch fixed a specific space error which existed before my changes
> and repeated many time.
> I fixed the blank line I added a previous patch (but is it isn’t an error
> reported by checkpatch).

That should really be fixed where it was introduced, not be introduced
and fixed here.

Guenter
Farber, Eliav Sept. 1, 2022, 3:31 p.m. UTC | #4
On 9/1/2022 5:46 PM, Guenter Roeck wrote:
> On Thu, Sep 01, 2022 at 05:21:43PM +0300, Farber, Eliav wrote:
>> On 8/31/2022 3:15 PM, Andy Shevchenko wrote:
>> > On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
>> > > Fix: "ERROR: space required before the open parenthesis '('"
>> >
>> > This patch may have other fixes like adding new blank lines (noted 
>> in one
>> > of the patches in the series), etc.
>> This patch fixed a specific space error which existed before my changes
>> and repeated many time.
>> I fixed the blank line I added a previous patch (but is it isn’t an 
>> error
>> reported by checkpatch).
>
> That should really be fixed where it was introduced, not be introduced
> and fixed here.


So what do you suggest?
I can drop the patch from this series and ignore it or move it to be the
first patch in the series, or publish it separately later on.
I had it because it was annoying seeing existing checkpatch errors when
I came to check my change.

--
Thanks, Eliav
Guenter Roeck Sept. 1, 2022, 5:09 p.m. UTC | #5
On 9/1/22 08:31, Farber, Eliav wrote:
> On 9/1/2022 5:46 PM, Guenter Roeck wrote:
>> On Thu, Sep 01, 2022 at 05:21:43PM +0300, Farber, Eliav wrote:
>>> On 8/31/2022 3:15 PM, Andy Shevchenko wrote:
>>> > On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
>>> > > Fix: "ERROR: space required before the open parenthesis '('"
>>> >
>>> > This patch may have other fixes like adding new blank lines (noted in one
>>> > of the patches in the series), etc.
>>> This patch fixed a specific space error which existed before my changes
>>> and repeated many time.
>>> I fixed the blank line I added a previous patch (but is it isn’t an error
>>> reported by checkpatch).
>>
>> That should really be fixed where it was introduced, not be introduced
>> and fixed here.
> 
> 
> So what do you suggest?
> I can drop the patch from this series and ignore it or move it to be the
> first patch in the series, or publish it separately later on.
> I had it because it was annoying seeing existing checkpatch errors when
> I came to check my change.
> 

Sorry, you lost me. I referred to "I fixed the blank line I added
a previous patch". That should not be fixed in this patch but be dropped
from the patch where you introduced it. Did I misunderstand your comment ?

Guenter
Farber, Eliav Sept. 1, 2022, 6:40 p.m. UTC | #6
On 9/1/2022 8:09 PM, Guenter Roeck wrote:
> On 9/1/22 08:31, Farber, Eliav wrote:
>> On 9/1/2022 5:46 PM, Guenter Roeck wrote:
>>> On Thu, Sep 01, 2022 at 05:21:43PM +0300, Farber, Eliav wrote:
>>>> On 8/31/2022 3:15 PM, Andy Shevchenko wrote:
>>>> > On Tue, Aug 30, 2022 at 07:22:12PM +0000, Eliav Farber wrote:
>>>> > > Fix: "ERROR: space required before the open parenthesis '('"
>>>> >
>>>> > This patch may have other fixes like adding new blank lines 
>>>> (noted in one
>>>> > of the patches in the series), etc.
>>>> This patch fixed a specific space error which existed before my 
>>>> changes
>>>> and repeated many time.
>>>> I fixed the blank line I added a previous patch (but is it isn’t an 
>>>> error
>>>> reported by checkpatch).
>>>
>>> That should really be fixed where it was introduced, not be introduced
>>> and fixed here.
>>
>>
>> So what do you suggest?
>> I can drop the patch from this series and ignore it or move it to be the
>> first patch in the series, or publish it separately later on.
>> I had it because it was annoying seeing existing checkpatch errors when
>> I came to check my change.
>>
>
> Sorry, you lost me. I referred to "I fixed the blank line I added
> a previous patch". That should not be fixed in this patch but be dropped
> from the patch where you introduced it. Did I misunderstand your 
> comment ?


Indeed I fixed the blank line in the original patch in which it was
introduced.
Patch #19 only addresses previously existing space related checkpatch
errors.

--
Thanks, Eliav
diff mbox series

Patch

diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
index 8c30f0521452..6a19f3d2a708 100644
--- a/drivers/hwmon/mr75203.c
+++ b/drivers/hwmon/mr75203.c
@@ -404,7 +404,7 @@  static int pvt_read_temp(struct device *dev, u32 attr, int channel, long *val)
 			return ret;
 
 		ret = regmap_read(t_map, SDIF_DATA(channel), &nbs);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		nbs &= SAMPLE_DATA_MSK;
@@ -445,7 +445,7 @@  static int pvt_read_in(struct device *dev, u32 attr, int channel, long *val)
 			return ret;
 
 		ret = regmap_read(v_map, VM_SDIF_DATA(vm_idx, ch_idx), &n);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		n &= SAMPLE_DATA_MSK;
@@ -542,19 +542,19 @@  static int pvt_init(struct pvt_device *pvt)
 
 	if (t_num) {
 		ret = regmap_write(t_map, SDIF_SMPL_CTRL, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(t_map, SDIF_HALT, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(t_map, CLK_SYNTH, clk_synth);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(t_map, SDIF_DISABLE, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(t_map, SDIF_STAT,
@@ -567,7 +567,7 @@  static int pvt_init(struct pvt_device *pvt)
 		val = CFG0_MODE_2 | CFG0_PARALLEL_OUT | CFG0_12_BIT |
 		      IP_CFG << SDIF_ADDR_SFT | SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(t_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(t_map, SDIF_STAT,
@@ -580,7 +580,7 @@  static int pvt_init(struct pvt_device *pvt)
 		val = POWER_DELAY_CYCLE_256 | IP_TMR << SDIF_ADDR_SFT |
 			      SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(t_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(t_map, SDIF_STAT,
@@ -594,39 +594,39 @@  static int pvt_init(struct pvt_device *pvt)
 		      IP_CTRL << SDIF_ADDR_SFT |
 		      SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(t_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 	}
 
 	if (p_num) {
 		ret = regmap_write(p_map, SDIF_HALT, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(p_map, SDIF_DISABLE, BIT(p_num) - 1);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(p_map, CLK_SYNTH, clk_synth);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 	}
 
 	if (v_num) {
 		ret = regmap_write(v_map, SDIF_SMPL_CTRL, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(v_map, SDIF_HALT, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(v_map, CLK_SYNTH, clk_synth);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_write(v_map, SDIF_DISABLE, 0x0);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(v_map, SDIF_STAT,
@@ -654,7 +654,7 @@  static int pvt_init(struct pvt_device *pvt)
 		      CFG1_14_BIT | IP_CFG << SDIF_ADDR_SFT |
 		      SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(v_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(v_map, SDIF_STAT,
@@ -667,7 +667,7 @@  static int pvt_init(struct pvt_device *pvt)
 		val = POWER_DELAY_CYCLE_64 | IP_TMR << SDIF_ADDR_SFT |
 		      SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(v_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 
 		ret = regmap_read_poll_timeout(v_map, SDIF_STAT,
@@ -681,7 +681,7 @@  static int pvt_init(struct pvt_device *pvt)
 		      IP_CTRL << SDIF_ADDR_SFT |
 		      SDIF_WRN_W | SDIF_PROG;
 		ret = regmap_write(v_map, SDIF_W, val);
-		if(ret < 0)
+		if (ret < 0)
 			return ret;
 	}
 
@@ -967,7 +967,7 @@  static int mr75203_probe(struct platform_device *pdev)
 	}
 
 	ret = regmap_read(pvt->c_map, PVT_IP_CONFIG, &val);
-	if(ret < 0)
+	if (ret < 0)
 		return ret;
 
 	ts_num = (val & TS_NUM_MSK) >> TS_NUM_SFT;