mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Daniele Nicolodi <daniele@grinta.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Samu Onkalo <samu.p.onkalo@nokia.com>
Subject: Re: misc: bh1770glc: Use common error handling code in bh1770_power_state_store()
Date: Fri, 27 Oct 2017 20:04:17 +0200	[thread overview]
Message-ID: <8e931bdb-5327-000e-3167-6634ce349f73@users.sourceforge.net> (raw)
In-Reply-To: <9c0b957a-93b5-39c9-f9bd-cb754d009d62@grinta.net>

>> Adjust jump targets so that a bit of exception handling can be better
>> reused in an if branch of this function.
> 
> What is the benefit brought by this change?

Will you notice that the object code size can be a bit smaller
because the call of the function “pm_runtime_put” is specified at
two places in the implementation in comparison to three places before?


> Anyhow, are you seriously suggesting adding a goto to a label define
> within a if block?

Yes. - For this update suggestion.


> Is this somehow an Halloween related joke?

I hope not.

Another software design approach would be to move two statements from
the affected if branch to the end of this function. Such an adjustment
would have the consequence that the statement “goto unlock” will be
transformed into a jump to a backward target.
Would you prefer such an implementation variant instead?

Regards,
Markus

      parent reply	other threads:[~2017-10-27 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 16:20 [PATCH] " SF Markus Elfring
2017-10-27 17:11 ` Daniele Nicolodi
2017-10-27 17:23   ` Greg Kroah-Hartman
2017-10-27 18:04   ` SF Markus Elfring [this message]

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=8e931bdb-5327-000e-3167-6634ce349f73@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@oracle.com \
    --cc=daniele@grinta.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samu.p.onkalo@nokia.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

all inboxes | Powered by JetHome®