linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: remove redundant continue
@ 2018-09-20  8:11 zhong jiang
  2018-09-20 17:30 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: zhong jiang @ 2018-09-20  8:11 UTC (permalink / raw)
  To: linux; +Cc: jdelvare, linux-hwmon, linux-kernel

The continue will not truely skip any code. hence it is safe to
remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/hwmon/scpi-hwmon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
index 7e49da5..111d521 100644
--- a/drivers/hwmon/scpi-hwmon.c
+++ b/drivers/hwmon/scpi-hwmon.c
@@ -286,10 +286,8 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
 		 * any thermal zones or if the thermal subsystem is
 		 * not configured.
 		 */
-		if (IS_ERR(z)) {
+		if (IS_ERR(z))
 			devm_kfree(dev, zone);
-			continue;
-		}
 	}
 
 	return 0;
-- 
1.7.12.4


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

* Re: [PATCH] hwmon: remove redundant continue
  2018-09-20  8:11 [PATCH] hwmon: remove redundant continue zhong jiang
@ 2018-09-20 17:30 ` Guenter Roeck
  2018-09-21  1:38   ` zhong jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2018-09-20 17:30 UTC (permalink / raw)
  To: zhong jiang; +Cc: jdelvare, linux-hwmon, linux-kernel

On Thu, Sep 20, 2018 at 04:11:10PM +0800, zhong jiang wrote:
> The continue will not truely skip any code. hence it is safe to
> remove it.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

The proper subject line would be

hwmon: (scpi-hwmon) <summary>

Since it now happened several times that I got a patch without proper
subject (ie where the subject does not even mention the affected driver),
I am no longer going to accept patches if the affected driver is missing,
sorry.

Guenter

> ---
>  drivers/hwmon/scpi-hwmon.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
> index 7e49da5..111d521 100644
> --- a/drivers/hwmon/scpi-hwmon.c
> +++ b/drivers/hwmon/scpi-hwmon.c
> @@ -286,10 +286,8 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
>  		 * any thermal zones or if the thermal subsystem is
>  		 * not configured.
>  		 */
> -		if (IS_ERR(z)) {
> +		if (IS_ERR(z))
>  			devm_kfree(dev, zone);
> -			continue;
> -		}
>  	}
>  
>  	return 0;
> -- 
> 1.7.12.4
> 

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

* Re: [PATCH] hwmon: remove redundant continue
  2018-09-20 17:30 ` Guenter Roeck
@ 2018-09-21  1:38   ` zhong jiang
  0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-09-21  1:38 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: jdelvare, linux-hwmon, linux-kernel

On 2018/9/21 1:30, Guenter Roeck wrote:
> On Thu, Sep 20, 2018 at 04:11:10PM +0800, zhong jiang wrote:
>> The continue will not truely skip any code. hence it is safe to
>> remove it.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> The proper subject line would be
>
> hwmon: (scpi-hwmon) <summary>
>
> Since it now happened several times that I got a patch without proper
> subject (ie where the subject does not even mention the affected driver),
> I am no longer going to accept patches if the affected driver is missing,
> sorry.
I will fix that and resend.  Thanks

Sincerely,
zhong jiang
> Guenter
>
>> ---
>>  drivers/hwmon/scpi-hwmon.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
>> index 7e49da5..111d521 100644
>> --- a/drivers/hwmon/scpi-hwmon.c
>> +++ b/drivers/hwmon/scpi-hwmon.c
>> @@ -286,10 +286,8 @@ static int scpi_hwmon_probe(struct platform_device *pdev)
>>  		 * any thermal zones or if the thermal subsystem is
>>  		 * not configured.
>>  		 */
>> -		if (IS_ERR(z)) {
>> +		if (IS_ERR(z))
>>  			devm_kfree(dev, zone);
>> -			continue;
>> -		}
>>  	}
>>  
>>  	return 0;
>> -- 
>> 1.7.12.4
>>
>



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

end of thread, other threads:[~2018-09-21  1:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20  8:11 [PATCH] hwmon: remove redundant continue zhong jiang
2018-09-20 17:30 ` Guenter Roeck
2018-09-21  1:38   ` zhong jiang

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).