Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1193145 > unrolled thread
| Started by | Shraddha Barke <shraddha.6596@gmail.com> |
|---|---|
| First post | 2015-07-27 16:10 +0200 |
| Last post | 2015-07-28 13:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Staging : rtl8188eu : os_dep : Compression of lines for immediate return Shraddha Barke <shraddha.6596@gmail.com> - 2015-07-27 16:10 +0200
Re: [PATCH] Staging : rtl8188eu : os_dep : Compression of lines for immediate return Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-07-28 13:20 +0200
| From | Shraddha Barke <shraddha.6596@gmail.com> |
|---|---|
| Date | 2015-07-27 16:10 +0200 |
| Subject | [PATCH] Staging : rtl8188eu : os_dep : Compression of lines for immediate return |
| Message-ID | <pQRgn-46U-35@gated-at.bofh.it> |
This patch compresses two lines into a single line if immediate return is
found. Also remove variable ret as it is no longer needed.
Semantic patch used for this is as follows:
@@
type T;
identifier i,f;
constant C;
@@
- T i;
...when != i
when strict
(
return -C;
|
- i =
+ return
f(...);
- return i;
)
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 38dba14..0ca3340 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -2485,16 +2485,13 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int
static int rtw_hostapd_sta_flush(struct net_device *dev)
{
- int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
DBG_88E("%s\n", __func__);
flush_all_cam_entry(padapter); /* clear CAM */
- ret = rtw_sta_flush(padapter);
-
- return ret;
+ return rtw_sta_flush(padapter);
}
static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
@@ -2809,7 +2806,6 @@ static int rtw_set_hidden_ssid(struct net_device *dev, struct ieee_param *param,
static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *param, int len)
{
- int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@@ -2820,13 +2816,11 @@ static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param *p
param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff &&
param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff)
return -EINVAL;
- ret = rtw_acl_remove_sta(padapter, param->sta_addr);
- return ret;
+ return rtw_acl_remove_sta(padapter, param->sta_addr);
}
static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *param, int len)
{
- int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
@@ -2837,8 +2831,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param *para
param->sta_addr[2] == 0xff && param->sta_addr[3] == 0xff &&
param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff)
return -EINVAL;
- ret = rtw_acl_add_sta(padapter, param->sta_addr);
- return ret;
+ return rtw_acl_add_sta(padapter, param->sta_addr);
}
static int rtw_ioctl_set_macaddr_acl(struct net_device *dev, struct ieee_param *param, int len)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-07-28 13:20 +0200 |
| Subject | Re: [PATCH] Staging : rtl8188eu : os_dep : Compression of lines for immediate return |
| Message-ID | <pRb5o-7Bt-19@gated-at.bofh.it> |
| In reply to | #1193145 |
On Mon, Jul 27, 2015 at 07:37:40PM +0530, Shraddha Barke wrote: > This patch compresses two lines into a single line if immediate return is > found. Also remove variable ret as it is no longer needed. Hi Shraddha, Something is wrong. All your patches are coming 2 times. You had me in the Cc list of the first patch but this again you sent and you have me in the To: list. If same patch is coming more than one time then Greg usually drops them as he will not understand which one to apply. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web