From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH RFC next 2/2] net: rfkill: gpio: simplify code flow
Date: Fri, 29 May 2015 14:42:30 +0200 [thread overview]
Message-ID: <20150529124230.GJ18985@pengutronix.de> (raw)
In-Reply-To: <1432898224.2104.12.camel@sipsolutions.net>
On Fri, May 29, 2015 at 01:17:04PM +0200, Johannes Berg wrote:
> On Thu, 2015-05-28 at 11:46 +0200, Uwe Kleine-König wrote:
> > When assigning directly to the pointer contained in the driver data the
> > local variable can be dropped together with the extra assignment to it.
>
> I'm not really sure I see the big benefit of this? It doesn't really
> seem to make the code much easier to read/follow.
>
> I also don't really see the (perceived) objection with "dynamic memory"
> though since that memory is freed pretty much immediately as soon as we
> return a non-zero value from this function ... the function itself
> allocates the memory, and clearly we return without it ever being able
> to use it, so ...
>
> Anyway - I might apply this for the few removed lines of code, but only
> with a better commit log.
Alternatively squash it into patch 1/2 and add:
While touching the code simplify it a bit to not need a local
variable for the gpio descriptors.
?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2015-05-29 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 9:46 [PATCH next 0/2] net: rfkill: gpio: make better use of gpiod API Uwe Kleine-König
2015-05-28 9:46 ` [PATCH next 1/2] " Uwe Kleine-König
2015-05-29 11:11 ` Johannes Berg
2015-05-28 9:46 ` [PATCH RFC next 2/2] net: rfkill: gpio: simplify code flow Uwe Kleine-König
2015-05-29 11:17 ` Johannes Berg
2015-05-29 12:42 ` Uwe Kleine-König [this message]
2015-05-29 12:45 ` Johannes Berg
2015-05-29 12:46 ` Uwe Kleine-König
2015-05-29 12:48 ` Uwe Kleine-König
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=20150529124230.GJ18985@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=johannes@sipsolutions.net \
--cc=kernel@pengutronix.de \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).