Search Linux Wireless

Re: [PATCH RFC next 2/2] net: rfkill: gpio: simplify code flow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux