Staging: rtl8723au: hal: Remove braces for single statement blocks
PATCH 1/10 Staging: rtl8723au: hal: Remove braces for single statement blocks
The linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The error was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/rtl8723au/hal/usb_halinit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/rtl8723au/hal/usb_halinit.c +2 -3
@@ -834,12 +834,11 @@ static void phy_SsPwrSwitch92CU(struct rtw_adapter *Adapter,rtl8723au_read32 (Adapter, rOFDM0_TRxPathEnable); Adapter->pwrctrlpriv.PS_BBRegBackup[PSBBREG_RF2 ] =rtl8723au_read32 (Adapter, rFPGA0_RFMOD); -if (pHalData->rf_type ==RF_2T2R ) { +if (pHalData->rf_type ==RF_2T2R )PHY_SetBBReg (Adapter, rFPGA0_XAB_RFParameter,0x380038 ,0 ); - }else if (pHalData->rf_type ==RF_1T1R ) { +else if (pHalData->rf_type ==RF_1T1R )PHY_SetBBReg (Adapter, rFPGA0_XAB_RFParameter,0x38 ,0 ); - }PHY_SetBBReg (Adapter, rOFDM0_TRxPathEnable,0xf0 ,0 );PHY_SetBBReg (Adapter, rFPGA0_RFMOD,BIT (1 ),1 );
Signature · 1 line
2.1.4
PATCH 2/10 Staging: lustre: ptlrpc: Remove braces for single statement blocks
The linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lustre/ptlrpc/client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/client.c +2 -3
@@ -1164,12 +1164,11 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)return err <0 ? err : -EINVAL ; } -if (err <0 ) { +if (err <0 )DEBUG_REQ (D_INFO , req,"status is %d" , err); - }else if (err >0 ) { +else if (err >0 )/* XXX: translate this error from net to host */ DEBUG_REQ (D_INFO , req,"status is %d" , err); - }return err; }
Signature · 1 line
2.1.4
PATCH 3/10 Staging: lustre: libcfs: Remove braces for single statement blocks
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c +2 -3
@@ -71,13 +71,12 @@ static int cfs_crypto_hash_alloc(unsigned char alg_id,* Skip this function for digest, because we use shash logic at * cfs_crypto_hash_alloc. */ -if (key !=NULL ) { +if (key !=NULL ) err =crypto_hash_setkey (desc->tfm, key, key_len); - }else if ((*type)->cht_key !=0 ) { +else if ((*type)->cht_key !=0 ) err =crypto_hash_setkey (desc->tfm, (unsigned char *)&((*type)->cht_key), (*type)->cht_size); - }if (err !=0 ) {crypto_free_hash (desc->tfm);
Signature · 1 line
2.1.4
PATCH 4/10 Staging: lustre: obdclass: Remove braces for single statement blocks
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lustre/obdclass/dt_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/obdclass/dt_object.c +2 -3
@@ -778,7 +778,7 @@ int dt_index_walk(const struct lu_env *env, struct dt_object *obj,return PTR_ERR (it); rc = iops->load (env, it, rdpg->rp_hash); -if (rc ==0 ) { +if (rc ==0 )/* * Iterator didn't find record with exactly the key requested. *
@@ -790,9 +790,8 @@ int dt_index_walk(const struct lu_env *env, struct dt_object *obj,* state)---position it on the next item. */ rc = iops->next (env, it); - }else if (rc >0 ) { + else if (rc > 0) rc =0 ; - }/* Fill containers one after the other. There might be multiple * containers per physical page.
Signature · 1 line
2.1.4
PATCH 5/10 Staging: lustre: llite: llite_close.c: Remove unnecessary braces
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lustre/llite/llite_close.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/llite/llite_close.c +2 -3
@@ -293,14 +293,13 @@ static void ll_done_writing(struct inode *inode) goto out; rc =md_done_writing (ll_i2sbi (inode)->ll_md_exp, op_data,NULL ); -if (rc == -EAGAIN ) { +if (rc == -EAGAIN )/* MDS has instructed us to obtain Size-on-MDS attribute from * OSTs and send setattr to back to MDS. */ rc =ll_som_update (inode, op_data); - }else if (rc) { +else if (rc)CERROR ("inode %lu mdc done_writing failed: rc = %d\n" , inode->i_ino, rc); - } out:ll_finish_md_op_data (op_data);if (och) {
Signature · 1 line
2.1.4
PATCH 6/10 Staging: lustre: llite: llite_lib.c: Remove unnecessary braces
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lustre/llite/llite_lib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -3
@@ -1219,14 +1219,13 @@ static int ll_setattr_done_writing(struct inode *inode,ll_pack_inode2opdata (inode, op_data,NULL ); rc =md_done_writing (ll_i2sbi (inode)->ll_md_exp, op_data, mod); -if (rc == -EAGAIN ) { +if (rc == -EAGAIN )/* MDS has instructed us to obtain Size-on-MDS attribute * from OSTs and send setattr to back to MDS. */ rc =ll_som_update (inode, op_data); - }else if (rc) { +else if (rc)CERROR ("inode %lu mdc truncate failed: rc = %d\n" , inode->i_ino, rc); - }return rc; }
Signature · 1 line
2.1.4
PATCH 7/10 Staging: lustre: lnet: Remove braces for single statement blocks
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +2 -3
@@ -253,11 +253,10 @@ kiblnd_handle_completion(kib_conn_t *conn, int txtype, int status, __u64 cookie) }if (tx->tx_status ==0 ) {/* success so far */ -if (status <0 ) {/* failed? */ +if (status <0 )/* failed? */ tx->tx_status = status; - }else if (txtype ==IBLND_MSG_GET_REQ ) { +else if (txtype ==IBLND_MSG_GET_REQ )lnet_set_reply_msg_len (ni, tx->tx_lntmsg[1 ], status); - } } tx->tx_waiting =0 ;
Signature · 1 line
2.1.4
PATCH 8/10 Staging: android: Remove unnecessary braces.
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/android/ashmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/android/ashmem.c +1 -2
@@ -311,10 +311,9 @@ static ssize_t ashmem_read(struct file *file, char __user *buf,* ashmem_release is called. */ ret =__vfs_read (asma->file, buf, len, pos); -if (ret >=0 ) { +if (ret >=0 )/** Update backing file pos, since f_ops->read() doesn't */ asma->file->f_pos = *pos; - }return ret; out_unlock:
Signature · 1 line
2.1.4
PATCH 9/10 Staging: speakup: Remove braces for single statement blocks
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/speakup/speakup_dectlk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/speakup/speakup_dectlk.c +1 -2
@@ -291,10 +291,9 @@ static void do_catch_up(struct spk_synth *synth)static void synth_flush (struct spk_synth *synth) { -if (in_escape) { +if (in_escape)/* if in command output ']' so we don't get an error */ spk_serial_out (']' ); - } in_escape =0 ; is_flushing =1 ;spk_serial_out (SYNTH_CLEAR );
Signature · 1 line
2.1.4
PATCH 10/10 Staging: rtl8192e: rtl_wx.c: Remove braces for single statement blocks
In reply to Shraddha BarkeThe linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces.
The warning was detected using checkpatch.pl. Coccinelle was used to make the change.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +1 -2
@@ -334,10 +334,9 @@ static int rtl8192_wx_get_range(struct net_device *dev,/* ~130 Mb/s real (802.11n) */ range->throughput =130 *1000 *1000 ; -if (priv->rf_set_sens !=NULL ) { +if (priv->rf_set_sens !=NULL )/* signal level threshold range */ range->sensitivity = priv->max_sens; - } range->max_qual.qual =100 ; range->max_qual.level =0 ;
Signature · 1 line
2.1.4