linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: vctrl: Remove unneeded continue statement
@ 2019-03-29  1:46 Axel Lin
  2019-03-29 10:51 ` Mukesh Ojha
  2019-03-29 18:35 ` Matthias Kaehlcke
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2019-03-29  1:46 UTC (permalink / raw)
  To: Mark Brown; +Cc: Matthias Kaehlcke, Liam Girdwood, linux-kernel, Axel Lin

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/vctrl-regulator.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/regulator/vctrl-regulator.c b/drivers/regulator/vctrl-regulator.c
index 78de002037c7..259864520a06 100644
--- a/drivers/regulator/vctrl-regulator.c
+++ b/drivers/regulator/vctrl-regulator.c
@@ -334,10 +334,8 @@ static int vctrl_init_vtable(struct platform_device *pdev)
 		ctrl_uV = regulator_list_voltage(ctrl_reg, i);
 
 		if (ctrl_uV < vrange_ctrl->min_uV ||
-		    ctrl_uV > vrange_ctrl->max_uV) {
+		    ctrl_uV > vrange_ctrl->max_uV)
 			rdesc->n_voltages--;
-			continue;
-		}
 	}
 
 	if (rdesc->n_voltages == 0) {
-- 
2.17.1


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

* Re: [PATCH] regulator: vctrl: Remove unneeded continue statement
  2019-03-29  1:46 [PATCH] regulator: vctrl: Remove unneeded continue statement Axel Lin
@ 2019-03-29 10:51 ` Mukesh Ojha
  2019-03-29 18:35 ` Matthias Kaehlcke
  1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2019-03-29 10:51 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Matthias Kaehlcke, Liam Girdwood, linux-kernel


On 3/29/2019 7:16 AM, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>


Yeah indeed! but where is commit text atleast a one-liner.

Otherwise looks good to me.
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh


> ---
>   drivers/regulator/vctrl-regulator.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/regulator/vctrl-regulator.c b/drivers/regulator/vctrl-regulator.c
> index 78de002037c7..259864520a06 100644
> --- a/drivers/regulator/vctrl-regulator.c
> +++ b/drivers/regulator/vctrl-regulator.c
> @@ -334,10 +334,8 @@ static int vctrl_init_vtable(struct platform_device *pdev)
>   		ctrl_uV = regulator_list_voltage(ctrl_reg, i);
>   
>   		if (ctrl_uV < vrange_ctrl->min_uV ||
> -		    ctrl_uV > vrange_ctrl->max_uV) {
> +		    ctrl_uV > vrange_ctrl->max_uV)
>   			rdesc->n_voltages--;
> -			continue;
> -		}
>   	}
>   
>   	if (rdesc->n_voltages == 0) {

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

* Re: [PATCH] regulator: vctrl: Remove unneeded continue statement
  2019-03-29  1:46 [PATCH] regulator: vctrl: Remove unneeded continue statement Axel Lin
  2019-03-29 10:51 ` Mukesh Ojha
@ 2019-03-29 18:35 ` Matthias Kaehlcke
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Kaehlcke @ 2019-03-29 18:35 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel

Hi Axel,

On Fri, Mar 29, 2019 at 09:46:31AM +0800, Axel Lin wrote:

As Mukesh already mentioned, there should be a short description.

> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/regulator/vctrl-regulator.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/regulator/vctrl-regulator.c b/drivers/regulator/vctrl-regulator.c
> index 78de002037c7..259864520a06 100644
> --- a/drivers/regulator/vctrl-regulator.c
> +++ b/drivers/regulator/vctrl-regulator.c
> @@ -334,10 +334,8 @@ static int vctrl_init_vtable(struct platform_device *pdev)
>  		ctrl_uV = regulator_list_voltage(ctrl_reg, i);
>  
>  		if (ctrl_uV < vrange_ctrl->min_uV ||
> -		    ctrl_uV > vrange_ctrl->max_uV) {
> +		    ctrl_uV > vrange_ctrl->max_uV)
>  			rdesc->n_voltages--;
> -			continue;
> -		}

indeed, the 'continue' is pointless here. I guess at some stage of
development something else was done in the loop and this is a
leftover.

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

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

end of thread, other threads:[~2019-03-29 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29  1:46 [PATCH] regulator: vctrl: Remove unneeded continue statement Axel Lin
2019-03-29 10:51 ` Mukesh Ojha
2019-03-29 18:35 ` Matthias Kaehlcke

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