Re: [PATCH 5/6] drivers: base: Share code for dev_request_mem_region*()

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

 



On Sat, Oct 27, 2018 at 10:20:39AM +0200, Sam Ravnborg wrote:
> Hi Andrey
> 
> On Fri, Oct 26, 2018 at 06:32:29PM -0700, Andrey Smirnov wrote:
> > Both dev_request_mem_region() and dev_request_mem_region_err_null()
> > implement exactly the same functionality different only in error
> > reporting value. Change the code to make use of a common generic
> > function whose return type can be specified via an argument.
> > 
> > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> 
> Using functions that takes a boolean to do two different things
> is not an improvement.
> At least not when the functions are this small and obvious.

+1

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux