Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Jerome Brunet
On Mon, 2018-01-15 at 13:02 +0100, Martin Blumenstingl wrote: > > Here you'd allocate memory for each string which will remain until the > > driver > > unload. It's not much, but still, it is wasted memory. > > good catch, thank you! > maybe I should drop this patch for now and clean up the

Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Martin Blumenstingl
Hi Jerome, On Mon, Jan 15, 2018 at 12:46 PM, Jerome Brunet wrote: > On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: >> Instead of using a custom buffer, snprintf() and devm_kstrdup() we can >> simplify this by using devm_kasprintf(). >> No functional changes -

Re: [RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-15 Thread Jerome Brunet
On Sun, 2018-01-14 at 22:48 +0100, Martin Blumenstingl wrote: > Instead of using a custom buffer, snprintf() and devm_kstrdup() we can > simplify this by using devm_kasprintf(). > No functional changes - this just makes the code shorter. CCF copies the name from the init_data to its own

[RFT net-next v4 2/5] net: stmmac: dwmac-meson8b: simplify generating the clock names

2018-01-14 Thread Martin Blumenstingl
Instead of using a custom buffer, snprintf() and devm_kstrdup() we can simplify this by using devm_kasprintf(). No functional changes - this just makes the code shorter. Signed-off-by: Martin Blumenstingl ---