From: SF Markus Elfring <hidden> Date: 2016-08-20 16:43:38
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:35:43 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Use memdup_user()
Delete an unnecessary jump label
Delete unnecessary variable initialisations
.../net/wireless/intersil/hostap/hostap_ioctl.c | 36 ++++++++--------------
1 file changed, 12 insertions(+), 24 deletions(-)
--
2.9.3
From: SF Markus Elfring <hidden> Date: 2016-08-20 16:45:15
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:19:43 +0200
Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <redacted>
---
.../net/wireless/intersil/hostap/hostap_ioctl.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
From: SF Markus Elfring <hidden> Date: 2016-08-20 16:47:02
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:21:29 +0200
Remove a jump label which is unneeded in this function at the end.
Signed-off-by: Markus Elfring <redacted>
---
drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
From: SF Markus Elfring <hidden> Date: 2016-08-20 16:48:19
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:23:14 +0200
The local variable "ret" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning of four functions.
Signed-off-by: Markus Elfring <redacted>
---
drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -2895,7 +2895,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i){structhostap_interface*iface;local_info_t*local;-intret=0;+intret;u32mode;iface=netdev_priv(dev);
@@ -3035,7 +3035,7 @@ static int ap_mac_cmd_ioctl(local_info_t *local, int *cmd)staticintprism2_ioctl_priv_download(local_info_t*local,structiw_point*p){structprism2_download_param*param;-intret=0;+intret;if(p->length<sizeof(structprism2_download_param)||p->length>1024||!p->pointer)
@@ -3791,7 +3791,7 @@ static int prism2_ioctl_scan_req(local_info_t *local,staticintprism2_ioctl_priv_hostapd(local_info_t*local,structiw_point*p){structprism2_hostapd_param*param;-intret=0;+intret;intap_ioctl=0;if(p->length<sizeof(structprism2_hostapd_param)||
@@ -3954,7 +3954,7 @@ int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)structiwreq*wrq=(structiwreq*)ifr;structhostap_interface*iface;local_info_t*local;-intret=0;+intret;iface=netdev_priv(dev);local=iface->local;
From: Arend van Spriel <arend.vanspriel@broadcom.com> Date: 2016-08-20 19:26:47
On 20-08-16 18:43, SF Markus Elfring wrote:
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:35:43 +0200
A few update suggestions were taken into account
from static source code analysis.
Is it worth touching this old stuff especially when you are not making
any functional changes.
Regards,
Arend
Markus Elfring (3):
Use memdup_user()
Delete an unnecessary jump label
Delete unnecessary variable initialisations
.../net/wireless/intersil/hostap/hostap_ioctl.c | 36 ++++++++--------------
1 file changed, 12 insertions(+), 24 deletions(-)
Hi Marcus,
On Sun, Aug 21, 2016 at 2:46 AM, SF Markus Elfring
[off-list ref] wrote:
quoted hunk
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:21:29 +0200
Remove a jump label which is unneeded in this function at the end.
Signed-off-by: Markus Elfring <redacted>
---
drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
From: Kalle Valo <hidden> Date: 2016-09-26 14:19:50
SF Markus Elfring [off-list ref] wrote:
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:19:43 +0200
Reuse existing functionality from memdup_user() instead of keeping
duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <redacted>
Patch set to Rejected.
[1/3] hostap: Use memdup_user() rather than duplicating i... 2016-08-20 SF Markus El Rejected
Reason: A similar patch is already applied.
Applying: hostap: Use memdup_user() rather than duplicating its implementation
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/intersil/hostap/hostap_ioctl.c
CONFLICT (content): Merge conflict in drivers/net/wireless/intersil/hostap/hostap_ioctl.c
Failed to merge in the changes.
Patch failed at 0001 hostap: Use memdup_user() rather than duplicating its implementation
--
https://patchwork.kernel.org/patch/9306999/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
From: Kalle Valo <hidden> Date: 2016-09-26 15:07:00
SF Markus Elfring [off-list ref] wrote:
From: Markus Elfring <redacted>
Date: Sat, 20 Aug 2016 18:21:29 +0200
Remove a jump label which is unneeded in this function at the end.
Signed-off-by: Markus Elfring <redacted>