public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Cc: "Dan Carpenter" <dan.carpenter@oracle.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eugeniu Rosca" <erosca@de.adit-jv.com>,
	"Kazuya Mizuguchi" <kazuya.mizuguchi.ks@renesas.com>,
	"Masaru Nagai" <masaru.nagai.vx@renesas.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>,
	"Simon Horman" <horms+renesas@verge.net.au>,
	"Yuval Shaia" <yuval.shaia@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] ravb: Use common error handling code in ravb_probe()
Date: Sun, 29 Oct 2017 11:50:37 +0000	[thread overview]
Message-ID: <3b700d27-2da5-b7d0-13f0-e55a7df4a24d@users.sourceforge.net> (raw)
In-Reply-To: <CAMuHMdXEWpryexcrN7OYcsGfyE3Y_-7Ej2CfgvYgUbZFTTHEWg@mail.gmail.com>

>> @@ -2069,10 +2069,9 @@ static int ravb_probe(struct platform_device *pdev)
>>                 irq = platform_get_irq_byname(pdev, "ch22");
>>         else
>>                 irq = platform_get_irq(pdev, 0);
>> -       if (irq < 0) {
>> -               error = irq;
>> -               goto out_release;
>> -       }
>> +       if (irq < 0)
>> +               goto failure_indication;
> 
> IMHO, it's really confusing that "irq" contains the error code, not "error".
> Especially when jumping to a meaningless label named "failure_indication"
> ("irq_failure" would be more intuitive).

Thanks for your constructive feedback.


> So I prefer the original code, regardless of the label name.

Can another attempt make sense to concentrate the setting of a variable
at the end of this function with more pleasing identifiers?

Regards,
Markus

  reply	other threads:[~2017-10-29 11:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 17:19 [PATCH] ravb: Use common error handling code in ravb_probe() SF Markus Elfring
2017-10-29 11:00 ` Geert Uytterhoeven
2017-10-29 11:50   ` SF Markus Elfring [this message]
2017-10-30 21:08   ` Sergei Shtylyov
2017-10-30 20:51 ` Sergei Shtylyov
2017-10-30 21:19   ` Sergei Shtylyov

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=3b700d27-2da5-b7d0-13f0-e55a7df4a24d@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=erosca@de.adit-jv.com \
    --cc=geert@linux-m68k.org \
    --cc=horms+renesas@verge.net.au \
    --cc=kazuya.mizuguchi.ks@renesas.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=masaru.nagai.vx@renesas.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=yuval.shaia@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox