On Fri, Feb 16, 2018 at 03:55:24PM +, David Laight wrote:
> From: Andy Shevchenko
> > Sent: 16 February 2018 15:40
> >
> > kasprintf() does the job of two: kmalloc() and sprintf().
> > Replace two calls with one.
> ...
> > - buf = kmalloc(strlen(wdriver->driver.name) + 5, GFP_KERNEL);
On Fri, Feb 16, 2018 at 5:55 PM, David Laight wrote:
>> kasprintf() does the job of two: kmalloc() and sprintf().
>> Replace two calls with one.
> ...
>> - buf = kmalloc(strlen(wdriver->driver.name) + 5, GFP_KERNEL);
>> + buf = kasprintf(GFP_KERNEL, "wmi/%s", wdriver->driv
From: Andy Shevchenko
> Sent: 16 February 2018 15:40
>
> kasprintf() does the job of two: kmalloc() and sprintf().
> Replace two calls with one.
...
> - buf = kmalloc(strlen(wdriver->driver.name) + 5, GFP_KERNEL);
> + buf = kasprintf(GFP_KERNEL, "wmi/%s", wdriver->driver.nam
kasprintf() does the job of two: kmalloc() and sprintf().
Replace two calls with one.
Signed-off-by: Andy Shevchenko
---
drivers/platform/x86/wmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index c0c8945603cb..4e
4 matches
Mail list logo