public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage
@ 2017-07-04 10:41 Jaya Durga
  2017-07-11 17:09 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jaya Durga @ 2017-07-04 10:41 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, florian.c.schilhabel, devel, linux-kernel,
	Jaya Durga, Jaya Durga

CHECK: multiple assignments should be avoided
CHECK: Prefer kmalloc(sizeof(*pintf_hdl->pintfpriv)...) 
over kmalloc(sizeof(struct intf_priv)...)

Signed-off-by: Jaya Durga <jayad@cdac.in>
---
 drivers/staging/rtl8712/rtl871x_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_io.c b/drivers/staging/rtl8712/rtl871x_io.c
index 3a10940..b8b47c4 100644
--- a/drivers/staging/rtl8712/rtl871x_io.c
+++ b/drivers/staging/rtl8712/rtl871x_io.c
@@ -60,8 +60,9 @@ static uint _init_intf_hdl(struct _adapter *padapter,
 	set_intf_funs = &(r8712_usb_set_intf_funs);
 	set_intf_ops = &r8712_usb_set_intf_ops;
 	init_intf_priv = &r8712_usb_init_intf_priv;
-	pintf_priv = pintf_hdl->pintfpriv = kmalloc(sizeof(struct intf_priv),
+	pintf_hdl->pintfpriv = kmalloc(sizeof(*pintf_hdl->pintfpriv),
 						    GFP_ATOMIC);
+	pintf_priv = pintf_hdl->pintfpriv;
 	if (pintf_priv == NULL)
 		goto _init_intf_hdl_fail;
 	pintf_hdl->adapter = (u8 *)padapter;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage
  2017-07-04 10:41 [PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage Jaya Durga
@ 2017-07-11 17:09 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2017-07-11 17:09 UTC (permalink / raw)
  To: Jaya Durga
  Cc: Larry.Finger, florian.c.schilhabel, devel, linux-kernel,
	Jaya Durga

On Tue, Jul 04, 2017 at 04:11:31PM +0530, Jaya Durga wrote:
> CHECK: multiple assignments should be avoided
> CHECK: Prefer kmalloc(sizeof(*pintf_hdl->pintfpriv)...) 
> over kmalloc(sizeof(struct intf_priv)...)
> 
> Signed-off-by: Jaya Durga <jayad@cdac.in>
> ---
>  drivers/staging/rtl8712/rtl871x_io.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Where are the other 6 patches in this series?  I can't apply just one of
them :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-11 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 10:41 [PATCH 7/7] Staging: rtl8712 : rtl871x_io.c:fix coding style of kmalloc usage Jaya Durga
2017-07-11 17:09 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox