All of lore.kernel.org
 help / color / mirror / Atom feed
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:46:37 +0200	[thread overview]
Message-ID: <20150529124637.GL18985@pengutronix.de> (raw)
In-Reply-To: <1432903510.16701.0.camel@sipsolutions.net>

Hello,

On Fri, May 29, 2015 at 02:45:10PM +0200, Johannes Berg wrote:
> On Fri, 2015-05-29 at 14:42 +0200, Uwe Kleine-König wrote:
> > 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.
> 
> Too late, already applied & pushed out the other one.
Ah, I thought you wanted a better commit log, didn't understand that you
looked into that yourself.

Best regards and thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2015-05-29 12:46 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
2015-05-29 12:45       ` Johannes Berg
2015-05-29 12:46         ` Uwe Kleine-König [this message]
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=20150529124637.GL18985@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 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.