All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks
@ 2015-09-05 13:28 Shraddha Barke
  2015-09-05 13:28 ` [PATCH 02/10] Staging: lustre: ptlrpc: " Shraddha Barke
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/rtl8723au/hal/usb_halinit.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c
index 68156a1..9926b07 100644
--- a/drivers/staging/rtl8723au/hal/usb_halinit.c
+++ b/drivers/staging/rtl8723au/hal/usb_halinit.c
@@ -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);
 
-- 
2.1.4


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

* [PATCH 02/10] Staging: lustre: ptlrpc: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 03/10] Staging: lustre: libcfs: " Shraddha Barke
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lustre/ptlrpc/client.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index c83a34a..a208620 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -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;
 }
-- 
2.1.4


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

* [PATCH 03/10] Staging: lustre: libcfs: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
  2015-09-05 13:28 ` [PATCH 02/10] Staging: lustre: ptlrpc: " Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 04/10] Staging: lustre: obdclass: " Shraddha Barke
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
index fbbc8a7..328a278 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
@@ -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);
-- 
2.1.4


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

* [PATCH 04/10] Staging: lustre: obdclass: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
  2015-09-05 13:28 ` [PATCH 02/10] Staging: lustre: ptlrpc: " Shraddha Barke
  2015-09-05 13:28 ` [PATCH 03/10] Staging: lustre: libcfs: " Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 05/10] Staging: lustre: llite: llite_close.c: Remove unnecessary braces Shraddha Barke
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lustre/obdclass/dt_object.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/dt_object.c b/drivers/staging/lustre/lustre/obdclass/dt_object.c
index b67b0fe..6b645a1 100644
--- a/drivers/staging/lustre/lustre/obdclass/dt_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/dt_object.c
@@ -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.
-- 
2.1.4


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

* [PATCH 05/10] Staging: lustre: llite: llite_close.c: Remove unnecessary braces
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (2 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 04/10] Staging: lustre: obdclass: " Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 06/10] Staging: lustre: llite: llite_lib.c: " Shraddha Barke
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_close.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c
index 7bdae72..e31cad8 100644
--- a/drivers/staging/lustre/lustre/llite/llite_close.c
+++ b/drivers/staging/lustre/lustre/llite/llite_close.c
@@ -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) {
-- 
2.1.4


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

* [PATCH 06/10] Staging: lustre: llite: llite_lib.c: Remove unnecessary braces
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (3 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 05/10] Staging: lustre: llite: llite_close.c: Remove unnecessary braces Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 07/10] Staging: lustre: lnet: Remove braces for single statement blocks Shraddha Barke
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_lib.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index b4ed6c8..77bae6f 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -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;
 }
 
-- 
2.1.4


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

* [PATCH 07/10] Staging: lustre: lnet: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (4 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 06/10] Staging: lustre: llite: llite_lib.c: " Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 08/10] Staging: android: Remove unnecessary braces Shraddha Barke
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index a23a6d9..345ed4d 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -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;
-- 
2.1.4


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

* [PATCH 08/10] Staging: android: Remove unnecessary braces.
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (5 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 07/10] Staging: lustre: lnet: Remove braces for single statement blocks Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 09/10] Staging: speakup: Remove braces for single statement blocks Shraddha Barke
  2015-09-05 13:28 ` [PATCH 10/10] Staging: rtl8192e: rtl_wx.c: " Shraddha Barke
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/android/ashmem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index cefc208..78d5d50 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -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:
-- 
2.1.4


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

* [PATCH 09/10] Staging: speakup: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (6 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 08/10] Staging: android: Remove unnecessary braces Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  2015-09-05 13:28 ` [PATCH 10/10] Staging: rtl8192e: rtl_wx.c: " Shraddha Barke
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/speakup/speakup_dectlk.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
index b5a23d4..09063b8 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -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);
-- 
2.1.4


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

* [PATCH 10/10] Staging: rtl8192e: rtl_wx.c: Remove braces for single statement blocks
  2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
                   ` (7 preceding siblings ...)
  2015-09-05 13:28 ` [PATCH 09/10] Staging: speakup: Remove braces for single statement blocks Shraddha Barke
@ 2015-09-05 13:28 ` Shraddha Barke
  8 siblings, 0 replies; 10+ messages in thread
From: Shraddha Barke @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Oleg Drokin, linux-kernel, Greg Donald, Joe Perches
  Cc: Shraddha Barke

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.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 7e3ca7e..7e56137 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -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;
-- 
2.1.4


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

end of thread, other threads:[~2015-09-05 13:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-05 13:28 [PATCH 01/10] Staging: rtl8723au: hal: Remove braces for single statement blocks Shraddha Barke
2015-09-05 13:28 ` [PATCH 02/10] Staging: lustre: ptlrpc: " Shraddha Barke
2015-09-05 13:28 ` [PATCH 03/10] Staging: lustre: libcfs: " Shraddha Barke
2015-09-05 13:28 ` [PATCH 04/10] Staging: lustre: obdclass: " Shraddha Barke
2015-09-05 13:28 ` [PATCH 05/10] Staging: lustre: llite: llite_close.c: Remove unnecessary braces Shraddha Barke
2015-09-05 13:28 ` [PATCH 06/10] Staging: lustre: llite: llite_lib.c: " Shraddha Barke
2015-09-05 13:28 ` [PATCH 07/10] Staging: lustre: lnet: Remove braces for single statement blocks Shraddha Barke
2015-09-05 13:28 ` [PATCH 08/10] Staging: android: Remove unnecessary braces Shraddha Barke
2015-09-05 13:28 ` [PATCH 09/10] Staging: speakup: Remove braces for single statement blocks Shraddha Barke
2015-09-05 13:28 ` [PATCH 10/10] Staging: rtl8192e: rtl_wx.c: " Shraddha Barke

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.