staging: Remove useless initialisation
Subsystems (2)
cover staging: Remove useless initialisation
This patchset removes multiple useless intialisations of variables which are immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Amitoj Kaur Chawla (18):
staging: rtl8723au: hal: Remove useless intialisation
staging: rtl8723au: core: rtw_wlan_util: Remove useless intialisation
staging: rtl8723au: core: rtw_recv: Remove useless initialisation
staging: rtl8723au: core: rtw_ap: Remove useless intialisation
staging: media: lirc: Remove useless initialisation
staging: media: davinci_vpfe: Remove useless intialisation
staging: lustre: ptlrpc: Remove useless initialisation
staging: skein: Remove useless initialisation
staging: vt6655: Remove useless initialisation
staging: vt6656: Remove useless initialisation
staging: wilc1000: wilc_wfi_cfgoperations: Remove useless
initialisation
staging: wilc1000: coreconfigurator: Remove useless initialisation
staging: rdma: ipath: ipath_eeprom: Remove useless intialisation
staging: rdma: ipath: ipath_init_chip: Remove useless initialisation
staging: rdma: hfi1: diag: Remove useless initialisation
staging: rdma: hfi1: sysfs: Remove useless initialisation
staging: dgnc: dgnc_tty: Remove useless initialisation
staging: dgnc: dgnc_driver: Remove useless initialisation
drivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 4 ++-- drivers/staging/rdma/hfi1/sysfs.c | 2 +- drivers/staging/rdma/ipath/ipath_eeprom.c | 2 +- drivers/staging/rdma/ipath/ipath_init_chip.c | 2 +- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++++---- drivers/staging/skein/skein_api.c | 2 +- drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6656/card.c | 2 +- drivers/staging/wilc1000/coreconfigurator.c | 10 +++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 18 files changed, 29 insertions(+), 29 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/18 staging: rtl8723au: hal: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned. The problem was found using coccinelle semantic patch and further opportunities were identified by hand.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +4 -4
@@ -5648,7 +5648,7 @@ static void btdm_1AntTdmaDurationAdjustForACL(struct rtw_adapter *padapter) (pBtdm8723->curPsTdma != 11)) { btdm_1AntSetPSTDMA(padapter, true, 0, true, pBtdm8723->psTdmaDuAdjType); } else { -s32 judge =0 ; +s32 judge; judge =btdm_1AntTdmaJudgement (padapter, pHalData->bt_coexist.halCoex8723.btRetryCnt);if (judge ==-1 ) {
@@ -9079,7 +9079,7 @@ static void btdm_BTCoexist8723AHandler(struct rtw_adapter *padapter)u32 BTDM_BtTxRxCounterH (struct rtw_adapter *padapter) {struct hal_data_8723a *pHalData =GET_HAL_DATA (padapter); -u32 counters =0 ; +u32 counters; counters = pHalData->bt_coexist.halCoex8723.highPriorityTx+ pHalData->bt_coexist.halCoex8723.highPriorityRx;
@@ -9089,7 +9089,7 @@ u32 BTDM_BtTxRxCounterH(struct rtw_adapter *padapter)u32 BTDM_BtTxRxCounterL (struct rtw_adapter *padapter) {struct hal_data_8723a *pHalData =GET_HAL_DATA (padapter); -u32 counters =0 ; +u32 counters; counters = pHalData->bt_coexist.halCoex8723.lowPriorityTx+ pHalData->bt_coexist.halCoex8723.lowPriorityRx;
@@ -9301,7 +9301,7 @@ static void BTDM_AdjustForBtOperation8723A(struct rtw_adapter *padapter)static void BTDM_FwC2hBtRssi8723A (struct rtw_adapter *padapter,u8 *tmpBuf) {struct hal_data_8723a *pHalData =GET_HAL_DATA (padapter); -u8 percent =0 , u1tmp =0 ; +u8 percent, u1tmp; u1tmp = tmpBuf[0 ]; percent = u1tmp*2 +10 ;
Signature · 1 line
1.9.1
Quoted 2 lines · Amitoj Kaur Chawla
This patchset removes multiple useless intialisations of variables which are immediately reassigned.
The patch is probably fine, but in general, you may find that it is more comfortable not to send quite so many patches at once.
julia
Quoted 69 lines
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@T x
- = C
;
x = e;
// </smpl>Amitoj Kaur Chawla (18):
staging: rtl8723au: hal: Remove useless intialisation
staging: rtl8723au: core:rtw_wlan_util: Remove useless intialisation
staging: rtl8723au: core:rtw_recv: Remove useless initialisation
staging: rtl8723au: core:rtw_ap: Remove useless intialisation
staging: media: lirc: Remove useless initialisation
staging: media:davinci_vpfe: Remove useless intialisation
staging: lustre: ptlrpc: Remove useless initialisation
staging: skein: Remove useless initialisation
staging: vt6655: Remove useless initialisation
staging: vt6656: Remove useless initialisation
staging: wilc1000:wilc_wfi_cfgoperations: Remove useless
initialisation
staging: wilc1000: coreconfigurator: Remove useless initialisation
staging: rdma: ipath:ipath_eeprom: Remove useless intialisation
staging: rdma: ipath:ipath_init_chip: Remove useless initialisation
staging: rdma: hfi1: diag: Remove useless initialisation
staging: rdma: hfi1: sysfs: Remove useless initialisation
staging: dgnc:dgnc_tty: Remove useless initialisation
staging: dgnc:dgnc_driver: Remove useless initialisationdrivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 4 ++-- drivers/staging/rdma/hfi1/sysfs.c | 2 +- drivers/staging/rdma/ipath/ipath_eeprom.c | 2 +- drivers/staging/rdma/ipath/ipath_init_chip.c | 2 +- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++++---- drivers/staging/skein/skein_api.c | 2 +- drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6656/card.c | 2 +- drivers/staging/wilc1000/coreconfigurator.c | 10 +++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 18 files changed, 29 insertions(+), 29 deletions(-)--
1.9.1--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1444895817.git.amitoj1606%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 2/18 staging: rtl8723au: core: rtw_wlan_util: Remove useless intialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723au/core/rtw_wlan_util.c +1 -1
@@ -1212,7 +1212,7 @@ unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz)unsigned int update_MSC_rate23a (struct ieee80211_ht_cap *pHT_caps) { -unsigned int mask =0 ; +unsigned int mask; mask = pHT_caps->mcs.rx_mask[0 ] <<12 | pHT_caps->mcs.rx_mask[1 ] <<20 ;
Signature · 1 line
1.9.1
PATCH 3/18 staging: rtl8723au: core: rtw_recv: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723au/core/rtw_recv.c +3 -3
@@ -626,7 +626,7 @@ void process23a_pwrbit_data(struct rtw_adapter *padapter,struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;struct rx_pkt_attrib *pattrib = &precv_frame->attrib;struct sta_priv *pstapriv = &padapter->stapriv; -struct sta_info *psta =NULL ; +struct sta_info *psta; psta =rtw_get_stainfo23a (pstapriv, pattrib->src);
@@ -653,7 +653,7 @@ void process_wmmps_data(struct rtw_adapter *padapter,#ifdef CONFIG_8723AU_AP_MODE struct rx_pkt_attrib *pattrib = &precv_frame->attrib;struct sta_priv *pstapriv = &padapter->stapriv; -struct sta_info *psta =NULL ; +struct sta_info *psta; psta =rtw_get_stainfo23a (pstapriv, pattrib->src);
@@ -2151,7 +2151,7 @@ int process_recv_indicatepkts(struct rtw_adapter *padapter,static int recv_func_prehandle (struct rtw_adapter *padapter,struct recv_frame *rframe) { -int ret = _SUCCESS; +int ret;/* check the frame crtl field and decache */ ret =validate_recv_frame (padapter, rframe);
Signature · 1 line
1.9.1
PATCH 4/18 staging: rtl8723au: core: rtw_ap: Remove useless intialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723au/core/rtw_ap.c +2 -2
@@ -403,7 +403,7 @@ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_l init_rate =get_highest_rate_idx23a (tx_ra_bitmap&0x0fffffff )&0x3f ;if (psta->aid <NUM_STA ) { -u8 arg =0 ; +u8 arg; arg = psta->mac_id&0x1f ;
@@ -487,7 +487,7 @@ static void update_bmc_sta(struct rtw_adapter *padapter)rtl8723a_SetHalODMVar (padapter,HAL_ODM_STA_INFO , psta, true); { -u8 arg =0 ; +u8 arg; arg = psta->mac_id&0x1f ;
Signature · 1 line
1.9.1
PATCH 5/18 staging: media: lirc: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/media/lirc/lirc_sasem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/lirc/lirc_sasem.c +1 -1
@@ -244,7 +244,7 @@ exit:*/ static long vfd_ioctl (struct file *file,unsigned cmd,unsigned long arg) { -struct sasem_context *context =NULL ; +struct sasem_context *context; context = (struct sasem_context *) file->private_data;
Signature · 1 line
1.9.1
PATCH 6/18 staging: media: davinci_vpfe: Remove useless intialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +1 -1
@@ -294,7 +294,7 @@ static void vpfe_detach_irq(struct vpfe_device *vpfe_dev)*/ static int vpfe_attach_irq (struct vpfe_device *vpfe_dev) { -int ret =0 ; +int ret; ret =request_irq (vpfe_dev->ccdc_irq0, vpfe_isr,0 ,"vpfe_capture0" , vpfe_dev);
Signature · 1 line
1.9.1
PATCH 7/18 staging: lustre: ptlrpc: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/client.c +1 -1
@@ -696,7 +696,7 @@ static inlinestruct ptlrpc_request *__ptlrpc_request_alloc (struct obd_import *imp,struct ptlrpc_request_pool *pool) { -struct ptlrpc_request *request =NULL ; +struct ptlrpc_request *request; request =ptlrpc_request_cache_alloc (GFP_NOFS );
Signature · 1 line
1.9.1
PATCH 8/18 staging: skein: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/skein/skein_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/skein/skein_api.c +1 -1
@@ -128,7 +128,7 @@ int skein_mac_init(struct skein_ctx *ctx, const u8 *key, size_t key_len,void skein_reset (struct skein_ctx *ctx) {size_t x_len =0 ; -u64 *x =NULL ; +u64 *x;/* * The following two lines rely of the fact that the real Skein
Signature · 1 line
1.9.1
PATCH 9/18 staging: vt6655: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/vt6655/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/card.c +1 -1
@@ -892,7 +892,7 @@ bool CARDbSoftwareReset(struct vnt_private *pDevice)u64 CARDqGetTSFOffset (unsigned char byRxRate,u64 qwTSF1,u64 qwTSF2) {u64 qwTSFOffset =0 ; -unsigned short wRxBcnTSFOffst =0 ; +unsigned short wRxBcnTSFOffst; wRxBcnTSFOffst = cwRXBCNTSFOff[byRxRate%MAX_RATE ];
Signature · 1 line
1.9.1
PATCH 10/18 staging: vt6656: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/vt6656/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6656/card.c +1 -1
@@ -508,7 +508,7 @@ u8 vnt_get_pkt_type(struct vnt_private *priv)u64 vnt_get_tsf_offset (u8 rx_rate,u64 tsf1,u64 tsf2) {u64 tsf_offset =0 ; -u16 rx_bcn_offset =0 ; +u16 rx_bcn_offset; rx_bcn_offset = cwRXBCNTSFOff[rx_rate %MAX_RATE ];
Signature · 1 line
1.9.1
PATCH 11/18 staging: wilc1000: wilc_wfi_cfgoperations: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -1
@@ -550,7 +550,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent,if (enuConnDisconnEvent ==CONN_DISCONN_EVENT_CONN_RESP ) {/*Initialization*/ -u16 u16ConnectStatus =WLAN_STATUS_SUCCESS ; +u16 u16ConnectStatus; u16ConnectStatus = pstrConnectInfo->u16ConnectStatus;
Signature · 1 line
1.9.1
PATCH 12/18 staging: wilc1000: coreconfigurator: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/wilc1000/coreconfigurator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +5 -5
@@ -114,7 +114,7 @@ enum info_element_id {/* response frame. */ static inline u16 get_beacon_period (u8 *data) { -u16 bcn_per =0 ; +u16 bcn_per; bcn_per = data[0 ]; bcn_per |= (data[1 ] <<8 );
@@ -256,7 +256,7 @@ static inline u16 get_cap_info(u8 *data)/* response frame. */ static inline u16 get_assoc_resp_cap_info (u8 *data) { -u16 cap_info =0 ; +u16 cap_info; cap_info = data[0 ]; cap_info |= (data[1 ] <<8 );
@@ -268,7 +268,7 @@ static inline u16 get_assoc_resp_cap_info(u8 *data)/* association response frame and returns association status code */ static inline u16 get_asoc_status (u8 *data) { -u16 asoc_status =0 ; +u16 asoc_status; asoc_status = data[3 ]; asoc_status = (asoc_status <<8 ) | data[2 ];
@@ -280,7 +280,7 @@ static inline u16 get_asoc_status(u8 *data)/* response frame */ static inline u16 get_asoc_id (u8 *data) { -u16 asoc_id =0 ; +u16 asoc_id; asoc_id = data[4 ]; asoc_id |= (data[5 ] <<8 );
@@ -290,7 +290,7 @@ static inline u16 get_asoc_id(u8 *data)u8 *get_tim_elm (u8 *pu8msa,u16 u16RxLen,u16 u16TagParamOffset) { -u16 u16index =0 ; +u16 u16index;/*************************************************************************/ /* Beacon Frame - Frame Body */
Signature · 1 line
1.9.1
PATCH 13/18 staging: rdma: ipath: ipath_eeprom: Remove useless intialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rdma/ipath/ipath_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rdma/ipath/ipath_eeprom.c +1 -1
@@ -411,7 +411,7 @@ bail:*/ static int i2c_probe (struct ipath_devdata *dd,int devaddr) { -int ret =0 ; +int ret; ret =eeprom_reset (dd);if (ret) {
Signature · 1 line
1.9.1
PATCH 14/18 staging: rdma: ipath: ipath_init_chip: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rdma/ipath/ipath_init_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rdma/ipath/ipath_init_chip.c +1 -1
@@ -210,7 +210,7 @@ static int bringup_link(struct ipath_devdata *dd)static struct ipath_portdata *create_portdata0 (struct ipath_devdata *dd) { -struct ipath_portdata *pd =NULL ; +struct ipath_portdata *pd; pd =kzalloc (sizeof (*pd),GFP_KERNEL );if (pd) {
Signature · 1 line
1.9.1
PATCH 15/18 staging: rdma: hfi1: diag: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rdma/hfi1/diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rdma/hfi1/diag.c +2 -2
@@ -607,7 +607,7 @@ static int hfi1_snoop_add(struct hfi1_devdata *dd, const char *name)static struct hfi1_devdata *hfi1_dd_from_sc_inode (struct inode *in) {int unit =iminor (in) -HFI1_SNOOP_CAPTURE_BASE ; -struct hfi1_devdata *dd =NULL ; +struct hfi1_devdata *dd; dd =hfi1_lookup (unit);return dd;
@@ -1478,7 +1478,7 @@ static struct snoop_packet *allocate_snoop_packet(u32 hdr_len, u32 md_len) { -struct snoop_packet *packet =NULL ; +struct snoop_packet *packet; packet = kzalloc(sizeof(struct snoop_packet) + hdr_len + data_len + md_len,
Signature · 1 line
1.9.1
PATCH 16/18 staging: rdma: hfi1: sysfs: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/rdma/hfi1/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rdma/hfi1/sysfs.c +1 -1
@@ -555,7 +555,7 @@ static ssize_t show_tempsense(struct device *device, container_of(device, struct hfi1_ibdev, ibdev.dev);struct hfi1_devdata *dd =dd_from_dev (dev);struct hfi1_temp temp; -int ret = -ENXIO ; +int ret; ret =hfi1_tempsense_rd (dd, &temp);if (!ret) {
Signature · 1 line
1.9.1
PATCH 17/18 staging: dgnc: dgnc_tty: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/dgnc/dgnc_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_tty.c +1 -1
@@ -855,7 +855,7 @@ static void dgnc_set_custom_speed(struct channel_t *ch, uint newrate)void dgnc_check_queue_flow_control (struct channel_t *ch) { -int qleft =0 ; +int qleft;/* Store how much space we have left in the queue */ qleft = ch->ch_r_tail - ch->ch_r_head -1 ;
Signature · 1 line
1.9.1
PATCH 18/18 staging: dgnc: dgnc_driver: Remove useless initialisation
In reply to Amitoj Kaur ChawlaRemove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
--- drivers/staging/dgnc/dgnc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_driver.c +1 -1
@@ -170,7 +170,7 @@ static void dgnc_cleanup_module(void)*/ static int __init dgnc_init_module (void ) { -int rc =0 ; +int rc;/* * Initialize global stuff
Signature · 1 line
1.9.1
Quoted 10 lines · Julia Lawall
Quoted 2 lines · Amitoj Kaur Chawla
This patchset removes multiple useless intialisations of variables which are immediately reassigned.
The patch is probably fine, but in general, you may find that it is more comfortable not to send quite so many patches at once.
julia
Hi Julia,
Since all the patches were essentially doing the same thing, just in different files I thought it would be okay to send them all in the same patchset. But if you think it's better to divide and send I'll do so in the future?
Quoted 69 lines
Quoted 69 lines
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@T x
- = C
;
x = e;
// </smpl>Amitoj Kaur Chawla (18):
staging: rtl8723au: hal: Remove useless intialisation
staging: rtl8723au: core:rtw_wlan_util: Remove useless intialisation
staging: rtl8723au: core:rtw_recv: Remove useless initialisation
staging: rtl8723au: core:rtw_ap: Remove useless intialisation
staging: media: lirc: Remove useless initialisation
staging: media:davinci_vpfe: Remove useless intialisation
staging: lustre: ptlrpc: Remove useless initialisation
staging: skein: Remove useless initialisation
staging: vt6655: Remove useless initialisation
staging: vt6656: Remove useless initialisation
staging: wilc1000:wilc_wfi_cfgoperations: Remove useless
initialisation
staging: wilc1000: coreconfigurator: Remove useless initialisation
staging: rdma: ipath:ipath_eeprom: Remove useless intialisation
staging: rdma: ipath:ipath_init_chip: Remove useless initialisation
staging: rdma: hfi1: diag: Remove useless initialisation
staging: rdma: hfi1: sysfs: Remove useless initialisation
staging: dgnc:dgnc_tty: Remove useless initialisation
staging: dgnc:dgnc_driver: Remove useless initialisationdrivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 4 ++-- drivers/staging/rdma/hfi1/sysfs.c | 2 +- drivers/staging/rdma/ipath/ipath_eeprom.c | 2 +- drivers/staging/rdma/ipath/ipath_init_chip.c | 2 +- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++++---- drivers/staging/skein/skein_api.c | 2 +- drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6656/card.c | 2 +- drivers/staging/wilc1000/coreconfigurator.c | 10 +++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 18 files changed, 29 insertions(+), 29 deletions(-)--
1.9.1--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1444895817.git.amitoj1606%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Signature · 1 line
Amitoj
Quoted 12 lines · Amitoj Kaur Chawla
Quoted 10 lines · Julia Lawall
Quoted 2 lines · Amitoj Kaur Chawla
This patchset removes multiple useless intialisations of variables which are immediately reassigned.
The patch is probably fine, but in general, you may find that it is more comfortable not to send quite so many patches at once.
julia
Quoted 6 lines
Hi Julia,
Since all the patches were essentially doing the same thing, just in different files I thought it would be okay to send them all in the same patchset. But if you think it's better to divide and send I'll do so in the future?
It's just a practical issue. The more patches you send at once, the greater the chance that you will make a mistake. I start to feel uncomfortable beyond 10. Even for things that are not too complicated.
But it's just something to keep in mind for the future. No problem with this patch.
julia
Quoted 82 lines
Quoted 62 lines
Quoted 62 lines
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@T x
- = C
;
x = e;
// </smpl>Amitoj Kaur Chawla (18):
staging: rtl8723au: hal: Remove useless intialisation
staging: rtl8723au: core:rtw_wlan_util: Remove useless intialisation
staging: rtl8723au: core:rtw_recv: Remove useless initialisation
staging: rtl8723au: core:rtw_ap: Remove useless intialisation
staging: media: lirc: Remove useless initialisation
staging: media:davinci_vpfe: Remove useless intialisation
staging: lustre: ptlrpc: Remove useless initialisation
staging: skein: Remove useless initialisation
staging: vt6655: Remove useless initialisation
staging: vt6656: Remove useless initialisation
staging: wilc1000:wilc_wfi_cfgoperations: Remove useless
initialisation
staging: wilc1000: coreconfigurator: Remove useless initialisation
staging: rdma: ipath:ipath_eeprom: Remove useless intialisation
staging: rdma: ipath:ipath_init_chip: Remove useless initialisation
staging: rdma: hfi1: diag: Remove useless initialisation
staging: rdma: hfi1: sysfs: Remove useless initialisation
staging: dgnc:dgnc_tty: Remove useless initialisation
staging: dgnc:dgnc_driver: Remove useless initialisationdrivers/staging/dgnc/dgnc_driver.c | 2 +- drivers/staging/dgnc/dgnc_tty.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +- drivers/staging/media/lirc/lirc_sasem.c | 2 +- drivers/staging/rdma/hfi1/diag.c | 4 ++-- drivers/staging/rdma/hfi1/sysfs.c | 2 +- drivers/staging/rdma/ipath/ipath_eeprom.c | 2 +- drivers/staging/rdma/ipath/ipath_init_chip.c | 2 +- drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 8 ++++---- drivers/staging/skein/skein_api.c | 2 +- drivers/staging/vt6655/card.c | 2 +- drivers/staging/vt6656/card.c | 2 +- drivers/staging/wilc1000/coreconfigurator.c | 10 +++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 18 files changed, 29 insertions(+), 29 deletions(-)--
1.9.1Quoted 7 lines
Quoted 7 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1444895817.git.amitoj1606%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
Amitoj--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CA%2B5yK5F%2BaegUFW3UVE1S%2Bj%3D9B28q_0NRQK%3DUHN93pd7jYLP0_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 23 lines · Julia Lawall
Quoted 12 lines · Amitoj Kaur Chawla
Quoted 10 lines · Julia Lawall
Quoted 2 lines · Amitoj Kaur Chawla
This patchset removes multiple useless intialisations of variables which are immediately reassigned.
The patch is probably fine, but in general, you may find that it is more comfortable not to send quite so many patches at once.
julia
Quoted 6 lines
Hi Julia,
Since all the patches were essentially doing the same thing, just in different files I thought it would be okay to send them all in the same patchset. But if you think it's better to divide and send I'll do so in the future?
Quoted 6 lines
It's just a practical issue. The more patches you send at once, the greater the chance that you will make a mistake. I start to feel uncomfortable beyond 10. Even for things that are not too complicated.
But it's just something to keep in mind for the future. No problem with this patch.
Oh yes. Okay will keep that in mind.
Thanks,
Signature · 1 line
Amitoj