Re: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-30 Thread Marek Vasut
On Tuesday, December 30, 2014 at 02:34:47 PM, Stefano Babic wrote: > On 16/12/2014 14:09, Marek Vasut wrote: > > The malloc() calls are unnecessary, just allocate the stuff on stack. > > While at it, reorder the code a little, so that only one variable is > > used for the text, use snprintf() inste

Re: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-30 Thread Stefano Babic
On 16/12/2014 14:09, Marek Vasut wrote: > The malloc() calls are unnecessary, just allocate the stuff on stack. > While at it, reorder the code a little, so that only one variable is > used for the text, use snprintf() instead of sprintf() and use %01d > as a formatting string to avoid any possible

Re: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-16 Thread Marek Vasut
On Tuesday, December 16, 2014 at 05:27:53 PM, Simon Glass wrote: > Hi Marek, > > On 16 December 2014 at 06:09, Marek Vasut wrote: > > The malloc() calls are unnecessary, just allocate the stuff on stack. > > While at it, reorder the code a little, so that only one variable is > > used for the tex

Re: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-16 Thread Simon Glass
Hi Marek, On 16 December 2014 at 06:09, Marek Vasut wrote: > The malloc() calls are unnecessary, just allocate the stuff on stack. > While at it, reorder the code a little, so that only one variable is > used for the text, use snprintf() instead of sprintf() and use %01d > as a formatting string

Re: [U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-16 Thread Christian Gmeiner
2014-12-16 14:09 GMT+01:00 Marek Vasut : > The malloc() calls are unnecessary, just allocate the stuff on stack. > While at it, reorder the code a little, so that only one variable is > used for the text, use snprintf() instead of sprintf() and use %01d > as a formatting string to avoid any possibl

[U-Boot] [PATCH 1/8] imx: i2c: Zap unnecessary malloc() calls

2014-12-16 Thread Marek Vasut
The malloc() calls are unnecessary, just allocate the stuff on stack. While at it, reorder the code a little, so that only one variable is used for the text, use snprintf() instead of sprintf() and use %01d as a formatting string to avoid any possible overflows. Signed-off-by: Marek Vasut Cc: Igo