All of lore.kernel.org
 help / color / mirror / Atom feed
* Coccinelle based patch processing
@ 2022-11-01 14:14 Deepak R Varma
  2022-11-01 14:34 ` Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: Deepak R Varma @ 2022-11-01 14:14 UTC (permalink / raw)
  To: outreachy

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

Hello,
I have a coccicheck produced patch [attached here] using the following command.
Can you please suggest how to submit this as a patch? Is there a document that I
can follow to accomplish the submission?

   make coccicheck COCCI=./scripts/coccinelle/misc/returnvar.cocci M=driver/staging/r8188eu/ MODE=patch

Thank you,
./drv

[-- Attachment #2: cocci-auto.patch --]
[-- Type: text/x-diff, Size: 3063 bytes --]

diff -u -p a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
--- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
@@ -149,7 +149,6 @@ static void fill_txdesc_phy(struct pkt_a

 static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagg_pkt)
 {
-	int	pull = 0;
 	uint	qsel;
 	u8 data_rate, pwr_status, offset;
 	struct adapter		*adapt = pxmitframe->padapter;
@@ -295,7 +294,7 @@ static s32 update_txdesc(struct xmit_fra
 	ODM_SetTxAntByTxInfo_88E(&haldata->odmpriv, pmem, pattrib->mac_id);

 	rtl8188eu_cal_txdesc_chksum(ptxdesc);
-	return pull;
+	return 0;
 }

 /* for non-agg data frame or  management frame */
diff -u -p a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1415,7 +1415,6 @@ static int amsdu_to_msdu(struct adapter

 	struct recv_priv *precvpriv = &padapter->recvpriv;
 	struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
-	int	ret = _SUCCESS;

 	nr_subframes = 0;

@@ -1513,7 +1512,7 @@ exit:
 	prframe->len = 0;
 	rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */

-	return ret;
+	return _SUCCESS;
 }

 static bool check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
diff -u -p a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -1020,7 +1020,6 @@ u8 ap_free_sta(struct adapter *padapter,
 int rtw_sta_flush(struct adapter *padapter)
 {
 	struct list_head *phead, *plist;
-	int ret = 0;
 	struct sta_info *psta = NULL;
 	struct sta_priv *pstapriv = &padapter->stapriv;
 	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -1028,7 +1027,7 @@ int rtw_sta_flush(struct adapter *padapt
 	u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

 	if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)
-		return ret;
+		return 0;

 	spin_lock_bh(&pstapriv->asoc_list_lock);
 	phead = &pstapriv->asoc_list;
@@ -1051,7 +1050,7 @@ int rtw_sta_flush(struct adapter *padapt

 	associated_clients_update(padapter, true);

-	return ret;
+	return 0;
 }

 /* called > TSR LEVEL for USB or SDIO Interface*/
diff -u -p a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2979,8 +2979,6 @@ static int rtw_p2p_set(struct net_device
 			       struct iw_request_info *info,
 			       union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-
 	if (!memcmp(extra, "enable =", 7)) {
 		rtw_wext_p2p_enable(dev, info, wrqu, &extra[7]);
 	} else if (!memcmp(extra, "setDN =", 6)) {
@@ -3027,7 +3025,7 @@ static int rtw_p2p_set(struct net_device
 		rtw_p2p_set_persistent(dev, info, wrqu, &extra[11]);
 	}

-	return ret;
+	return 0;
 }

 static int rtw_p2p_get2(struct net_device *dev,


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

end of thread, other threads:[~2022-11-01 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-01 14:14 Coccinelle based patch processing Deepak R Varma
2022-11-01 14:34 ` Julia Lawall
2022-11-01 14:52   ` Deepak R Varma
2022-11-01 15:09     ` Julia Lawall
2022-11-01 15:19       ` Deepak R Varma
2022-11-01 15:28         ` Julia Lawall
2022-11-01 16:57           ` Deepak R Varma

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.