linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
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 13:17:04 +0200	[thread overview]
Message-ID: <1432898224.2104.12.camel@sipsolutions.net> (raw)
In-Reply-To: <1432806373-17372-3-git-send-email-u.kleine-koenig@pengutronix.de>

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.

johannes


  reply	other threads:[~2015-05-29 11:17 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 [this message]
2015-05-29 12:42     ` Uwe Kleine-König
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=1432898224.2104.12.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).