Skip to contentSkip to conversation

staging: rts5208: Lines should not end with a '('

PATCH Superseded Branden Bonaby 3 participants 4 messages Mar 14, 2019 – Mar 17, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rts5208: Lines should not end with a '('

Start function arguments after initial bracket so that the line does not end with a opening bracket.
CHECK: Lines should not end with a '('

---
 drivers/staging/rts5208/rtsx_transport.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/staging/rts5208/rtsx_transport.c +10 -6
index 8277d7895608..d2c1dfcb95e4 100644
@@ -257,8 +257,9 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	spin_unlock_irq(&rtsx->reg_lock);
 
 	/* Wait for TRANS_OK_INT */
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n",
 			chip->int_reg);
@@ -284,8 +285,10 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	return err;
 }
 
-static inline void rtsx_add_sg_tbl(
-	struct rtsx_chip *chip, u32 addr, u32 len, u8 option)
+static inline void rtsx_add_sg_tbl(struct rtsx_chip *chip,
+				   u32 addr,
+				   u32 len,
+				   u8 option)
 {
 	__le64 *sgb = (__le64 *)(chip->host_sg_tbl_ptr);
 	u64 val = 0;
@@ -420,8 +423,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
 
 	spin_unlock_irq(&rtsx->reg_lock);
 
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n",
 			__func__, __LINE__);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 26 lines · Branden Bonaby

Start function arguments after initial bracket so that the line does not end with a opening bracket.
CHECK: Lines should not end with a '('

---
 drivers/staging/rts5208/rtsx_transport.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/staging/rts5208/rtsx_transport.c +3 -2
index 8277d7895608..d2c1dfcb95e4 100644
@@ -257,8 +257,9 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	spin_unlock_irq(&rtsx->reg_lock);
 
 	/* Wait for TRANS_OK_INT */
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n",
 			chip->int_reg);

drivers/staging/rts5208/rtsx_transport.c int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout) · line 291

Quoted 9 lines
drivers/staging/rts5208/rtsx_transport.c +4 -2
@@ -284,8 +285,10 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	return err;
 }
 
-static inline void rtsx_add_sg_tbl(
-	struct rtsx_chip *chip, u32 addr, u32 len, u8 option)
+static inline void rtsx_add_sg_tbl(struct rtsx_chip *chip,
+				   u32 addr,
+				   u32 len,
+				   u8 option)

There is no actual need to have one parameter per line. Is this what is done elsewhere in the file or in the driver?

julia

Quoted 25 lines
drivers/staging/rts5208/rtsx_transport.c +3 -3
 {
 	__le64 *sgb = (__le64 *)(chip->host_sg_tbl_ptr);
 	u64 val = 0;
@@ -420,8 +423,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
 
 	spin_unlock_irq(&rtsx->reg_lock);
 
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n",
 			__func__, __LINE__);
--

2.17.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/20190314150017.25470-1-brandonbonaby94%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw

PATCH v2 1/1 staging: rts5208: Lines should not end with a '('

In reply to Branden Bonaby

Start function arguments after initial bracket so that the line does not end with a opening bracket.
CHECK: Lines should not end with a '('

---
Changes in v2:
Moved function arguments that do not go over the 80 character a line limit, to the same line as the function name.

 drivers/staging/rts5208/rtsx_transport.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/rts5208/rtsx_transport.c +8 -6
index 8277d7895608..a476e22767e9 100644
@@ -257,8 +257,9 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	spin_unlock_irq(&rtsx->reg_lock);
 
 	/* Wait for TRANS_OK_INT */
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n",
 			chip->int_reg);
@@ -284,8 +285,8 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	return err;
 }
 
-static inline void rtsx_add_sg_tbl(
-	struct rtsx_chip *chip, u32 addr, u32 len, u8 option)
+static inline void rtsx_add_sg_tbl(struct rtsx_chip *chip, u32 addr, u32 len,
+				    u8 option)
 {
 	__le64 *sgb = (__le64 *)(chip->host_sg_tbl_ptr);
 	u64 val = 0;
@@ -420,8 +421,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
 
 	spin_unlock_irq(&rtsx->reg_lock);
 
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,
+						     msecs_to_jiffies(timeout));
 	if (timeleft <= 0) {
 		dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n",
 			__func__, __LINE__);
Signature · 1 line
2.17.1
maintainer
#3 lore raw
Quoted 19 lines · Branden Bonaby

Start function arguments after initial bracket so that the line does not end with a opening bracket.
CHECK: Lines should not end with a '('

---
Changes in v2:
Moved function arguments that do not go over the 80 character a line limit, to the same line as the function name.

 drivers/staging/rts5208/rtsx_transport.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/rts5208/rtsx_transport.c +0 -0
index 8277d7895608..a476e22767e9 100644

drivers/staging/rts5208/rtsx_transport.c int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout) · line 261

Quoted 7 lines
drivers/staging/rts5208/rtsx_transport.c +2 -2
@@ -257,8 +257,9 @@ int rtsx_send_cmd(struct rtsx_chip *chip, u8 card, int timeout)
 	spin_unlock_irq(&rtsx->reg_lock);
 
 	/* Wait for TRANS_OK_INT */
-	timeleft = wait_for_completion_interruptible_timeout(
-		&trans_done, msecs_to_jiffies(timeout));
+	timeleft =
+	   wait_for_completion_interruptible_timeout(&trans_done,

Indenting 4 spaces is not acceptable coding style, sorry.

greg k-h