All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Shuah Khan <shuahkh@osg.samsung.com>,
	balbi@kernel.org, gregkh@linuxfoundation.org, kgene@kernel.org,
	krzk@kernel.org
Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names
Date: Wed, 11 Jan 2017 14:06:01 -0300	[thread overview]
Message-ID: <d32213e3-98c8-6c8c-231c-53aaba6468ff@osg.samsung.com> (raw)
In-Reply-To: <20170111164537.2981-1-shuahkh@osg.samsung.com>

Hello Shuah,

On 01/11/2017 01:45 PM, Shuah Khan wrote:
> Change goto labels to meaningful names from a series of errNs.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  drivers/usb/dwc3/dwc3-exynos.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index f7421c2..ea50f74 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -147,53 +147,53 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
>  	exynos->vdd33 = devm_regulator_get(dev, "vdd33");
>  	if (IS_ERR(exynos->vdd33)) {
>  		ret = PTR_ERR(exynos->vdd33);
> -		goto err2;
> +		goto vdd33_err;
>  	}

I think it's better to use as labels what will be done in the error path
rather than what failed. IOW, "disable_axius_clk" or "disable_clks" are
more clear than vdd33_err for me, since can give you an idea of what will
happen in the error path.

But I don't have a strong opinion and your naming is an improvement over
the current one, so:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

WARNING: multiple messages have this Message-ID (diff)
From: javier@osg.samsung.com (Javier Martinez Canillas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names
Date: Wed, 11 Jan 2017 14:06:01 -0300	[thread overview]
Message-ID: <d32213e3-98c8-6c8c-231c-53aaba6468ff@osg.samsung.com> (raw)
In-Reply-To: <20170111164537.2981-1-shuahkh@osg.samsung.com>

Hello Shuah,

On 01/11/2017 01:45 PM, Shuah Khan wrote:
> Change goto labels to meaningful names from a series of errNs.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  drivers/usb/dwc3/dwc3-exynos.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index f7421c2..ea50f74 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -147,53 +147,53 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
>  	exynos->vdd33 = devm_regulator_get(dev, "vdd33");
>  	if (IS_ERR(exynos->vdd33)) {
>  		ret = PTR_ERR(exynos->vdd33);
> -		goto err2;
> +		goto vdd33_err;
>  	}

I think it's better to use as labels what will be done in the error path
rather than what failed. IOW, "disable_axius_clk" or "disable_clks" are
more clear than vdd33_err for me, since can give you an idea of what will
happen in the error path.

But I don't have a strong opinion and your naming is an improvement over
the current one, so:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2017-01-11 17:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 16:45 [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names Shuah Khan
2017-01-11 16:45 ` Shuah Khan
2017-01-11 17:06 ` Javier Martinez Canillas [this message]
2017-01-11 17:06   ` Javier Martinez Canillas
2017-01-16 10:33 ` Felipe Balbi
2017-01-16 10:33   ` Felipe Balbi
2017-01-16 10:33   ` Felipe Balbi
2017-01-17 22:09   ` Shuah Khan
2017-01-17 22:09     ` Shuah Khan
2017-01-30 19:25 Shuah Khan
2017-01-30 19:25 ` Shuah Khan
2017-03-16 15:32 ` Shuah Khan
2017-03-16 15:32   ` Shuah Khan
2017-03-16 15:32   ` Shuah Khan
2017-03-17  8:42   ` Felipe Balbi
2017-03-17  8:42     ` Felipe Balbi
2017-03-17  8:42     ` Felipe Balbi
2017-03-17  6:24 ` Vivek Gautam
2017-03-17  6:24   ` Vivek Gautam
2017-03-17  6:24   ` Vivek Gautam
2017-03-17 14:27   ` Shuah Khan
2017-03-17 14:27     ` Shuah Khan
2017-03-17 14:27     ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d32213e3-98c8-6c8c-231c-53aaba6468ff@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=shuahkh@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.