* [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
@ 2018-03-13 12:49 ` hariprasath.elango
0 siblings, 0 replies; 6+ messages in thread
From: hariprasath.elango @ 2018-03-13 12:49 UTC (permalink / raw)
To: aditya.shankar, ganesh.krishna
Cc: hariprasath.elango, Greg Kroah-Hartman, linux-wireless, devel,
linux-kernel
From: HariPrasath Elango <hariprasath.elango@gmail.com>
kmalloc followed by memcpy can be replaced by kmemdup.Also added the
related error handling part
Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
---
drivers/staging/wilc1000/host_interface.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0fac8e1..4ae2da6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -992,9 +992,13 @@ static s32 handle_connect(struct wilc_vif *vif,
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
info_element_size = hif_drv->usr_conn_req.ies_len;
- info_element = kmalloc(info_element_size, GFP_KERNEL);
- memcpy(info_element, hif_drv->usr_conn_req.ies,
- info_element_size);
+ info_element = kmemdup(hif_drv->usr_conn_req.ies,
+ info_element_size,
+ GFP_KERNEL);
+ if (!info_element) {
+ result = -ENOMEM;
+ goto ERRORHANDLER;
+ }
}
wid_list[wid_cnt].id = (u16)WID_11I_MODE;
--
2.10.0.GIT
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
@ 2018-03-13 12:49 ` hariprasath.elango
0 siblings, 0 replies; 6+ messages in thread
From: hariprasath.elango @ 2018-03-13 12:49 UTC (permalink / raw)
To: aditya.shankar, ganesh.krishna
Cc: devel, Greg Kroah-Hartman, linux-wireless, linux-kernel,
hariprasath.elango
From: HariPrasath Elango <hariprasath.elango@gmail.com>
kmalloc followed by memcpy can be replaced by kmemdup.Also added the
related error handling part
Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
---
drivers/staging/wilc1000/host_interface.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0fac8e1..4ae2da6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -992,9 +992,13 @@ static s32 handle_connect(struct wilc_vif *vif,
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
info_element_size = hif_drv->usr_conn_req.ies_len;
- info_element = kmalloc(info_element_size, GFP_KERNEL);
- memcpy(info_element, hif_drv->usr_conn_req.ies,
- info_element_size);
+ info_element = kmemdup(hif_drv->usr_conn_req.ies,
+ info_element_size,
+ GFP_KERNEL);
+ if (!info_element) {
+ result = -ENOMEM;
+ goto ERRORHANDLER;
+ }
}
wid_list[wid_cnt].id = (u16)WID_11I_MODE;
--
2.10.0.GIT
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
2018-03-13 12:49 ` hariprasath.elango
@ 2018-03-14 11:38 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-14 11:38 UTC (permalink / raw)
To: hariprasath.elango
Cc: aditya.shankar, ganesh.krishna, devel, linux-wireless, linux-kernel
On Tue, Mar 13, 2018 at 06:19:32PM +0530, hariprasath.elango@gmail.com wrote:
> From: HariPrasath Elango <hariprasath.elango@gmail.com>
>
> kmalloc followed by memcpy can be replaced by kmemdup.Also added the
> related error handling part
>
> Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
You have sent at least 8 patches for this driver over the past day, yet
I have no idea what order to apply these in at all.
Please resend them all as a proper patch series, numbered so I have a
clue as to what order to apply them in. Also preserve the acks/reviews
that others have provided so they don't have to provide that again.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
@ 2018-03-14 11:38 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-14 11:38 UTC (permalink / raw)
To: hariprasath.elango
Cc: devel, aditya.shankar, linux-wireless, linux-kernel, ganesh.krishna
On Tue, Mar 13, 2018 at 06:19:32PM +0530, hariprasath.elango@gmail.com wrote:
> From: HariPrasath Elango <hariprasath.elango@gmail.com>
>
> kmalloc followed by memcpy can be replaced by kmemdup.Also added the
> related error handling part
>
> Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
You have sent at least 8 patches for this driver over the past day, yet
I have no idea what order to apply these in at all.
Please resend them all as a proper patch series, numbered so I have a
clue as to what order to apply them in. Also preserve the acks/reviews
that others have provided so they don't have to provide that again.
thanks,
greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
2018-03-14 11:38 ` Greg Kroah-Hartman
@ 2018-03-14 12:21 ` <Hariprasath Elango>
-1 siblings, 0 replies; 6+ messages in thread
From: <Hariprasath Elango> @ 2018-03-14 12:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: hariprasath.elango, aditya.shankar, ganesh.krishna, devel,
linux-wireless, linux-kernel
On Wed, Mar 14, 2018 at 12:38:18PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 13, 2018 at 06:19:32PM +0530, hariprasath.elango@gmail.com wrote:
> > From: HariPrasath Elango <hariprasath.elango@gmail.com>
> >
> > kmalloc followed by memcpy can be replaced by kmemdup.Also added the
> > related error handling part
> >
> > Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> > ---
> > drivers/staging/wilc1000/host_interface.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
>
> You have sent at least 8 patches for this driver over the past day, yet
> I have no idea what order to apply these in at all.
>
> Please resend them all as a proper patch series, numbered so I have a
> clue as to what order to apply them in. Also preserve the acks/reviews
> that others have provided so they don't have to provide that again.
>
> thanks,
>
> greg k-h
Hi Greg, thanks. Yes I will send a patchset to make things easier for
you keeping in tact the review history
regards,
hari prasath
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy
@ 2018-03-14 12:21 ` <Hariprasath Elango>
0 siblings, 0 replies; 6+ messages in thread
From: <Hariprasath Elango> @ 2018-03-14 12:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: devel, linux-wireless, linux-kernel, hariprasath.elango,
ganesh.krishna, aditya.shankar
On Wed, Mar 14, 2018 at 12:38:18PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Mar 13, 2018 at 06:19:32PM +0530, hariprasath.elango@gmail.com wrote:
> > From: HariPrasath Elango <hariprasath.elango@gmail.com>
> >
> > kmalloc followed by memcpy can be replaced by kmemdup.Also added the
> > related error handling part
> >
> > Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> > ---
> > drivers/staging/wilc1000/host_interface.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
>
> You have sent at least 8 patches for this driver over the past day, yet
> I have no idea what order to apply these in at all.
>
> Please resend them all as a proper patch series, numbered so I have a
> clue as to what order to apply them in. Also preserve the acks/reviews
> that others have provided so they don't have to provide that again.
>
> thanks,
>
> greg k-h
Hi Greg, thanks. Yes I will send a patchset to make things easier for
you keeping in tact the review history
regards,
hari prasath
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-14 12:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 12:49 [PATCH] staging: wilc1000: use kmemdup to replace kmalloc/memcpy hariprasath.elango
2018-03-13 12:49 ` hariprasath.elango
2018-03-14 11:38 ` Greg Kroah-Hartman
2018-03-14 11:38 ` Greg Kroah-Hartman
2018-03-14 12:21 ` <Hariprasath Elango>
2018-03-14 12:21 ` <Hariprasath Elango>
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.