Skip to contentSkip to conversation

Staging: mt29f_spinand: Remove space after a cast

PATCH In review Eva Rachel Retuya 2 participants 4 messages Oct 18, 2015 – Oct 19, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: mt29f_spinand: Remove space after a cast

Remove the unneeded space before retval.
Checkpatch found this issue.

CHECK: No space is necessary after a cast

---

Changes since v2:
* Made commit message more clear

 drivers/staging/mt29f_spinand/mt29f_spinand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt29f_spinand/mt29f_spinand.c +1 -1
index 1aa449e..cf98228 100644
@@ -594,7 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
 		if (retval < 0) {
 			dev_err(&spi_nand->dev,
 					"error %d reading status register\n",
-					(int) retval);
+					(int)retval);
 			return retval;
 		}
 
Signature · 1 line
1.9.1
#1 lore raw

drivers/staging/mt29f_spinand/mt29f_spinand.c static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) · line 598

Quoted 11 lines · On Sunday 18 October 2015 18:16:09 Eva Rachel Retuya wrote:
drivers/staging/mt29f_spinand/mt29f_spinand.c +1 -1
index 1aa449e..cf98228 100644
@@ -594,7 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
                if (retval < 0) {
                        dev_err(&spi_nand->dev,
                                        "error %d reading status register\n",
-                                       (int) retval);
+                                       (int)retval);
                        return retval;

The change is correct, but it would be nicer to remove the cast as well, because 'retval' is already an 'int'.

Arnd

#2 lore raw
Quoted 17 lines · Arnd Bergmann

drivers/staging/mt29f_spinand/mt29f_spinand.c static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) · line 598

Quoted 11 lines · On Sunday 18 October 2015 18:16:09 Eva Rachel Retuya wrote:
drivers/staging/mt29f_spinand/mt29f_spinand.c +1 -1
index 1aa449e..cf98228 100644
@@ -594,7 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
                if (retval < 0) {
                        dev_err(&spi_nand->dev,
                                        "error %d reading status register\n",
-                                       (int) retval);
+                                       (int)retval);
                        return retval;

The change is correct, but it would be nicer to remove the cast as well, because 'retval' is already an 'int'.

Quoted 1 line

Arnd

Looking back, you are indeed right. Do I have to send this change as a revision or go for a new patch?

Thank you for pointing this out. I admit, all I did was to change the
piece of code as suggested by the checkpatch. Next time I will be more mindful of the change/s I'm introducing.

Eva

#3 lore raw
Quoted 18 lines · On Monday 19 October 2015 00:00:16 Eva Rachel Retuya wrote:
Quoted 17 lines · Arnd Bergmann

drivers/staging/mt29f_spinand/mt29f_spinand.c static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) · line 598

Quoted 11 lines · On Sunday 18 October 2015 18:16:09 Eva Rachel Retuya wrote:
drivers/staging/mt29f_spinand/mt29f_spinand.c +1 -1
index 1aa449e..cf98228 100644
@@ -594,7 +594,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
                if (retval < 0) {
                        dev_err(&spi_nand->dev,
                                        "error %d reading status register\n",
-                                       (int) retval);
+                                       (int)retval);
                        return retval;

The change is correct, but it would be nicer to remove the cast as well, because 'retval' is already an 'int'.

Quoted 8 lines
Quoted 1 line

Arnd

Looking back, you are indeed right. Do I have to send this change as a revision or go for a new patch?

Thank you for pointing this out. I admit, all I did was to change the
piece of code as suggested by the checkpatch. Next time I will be more mindful of the change/s I'm introducing.

If Greg has applied your patch already, it would be nice to get a patch on top. Otherwise, I would suggest sending a replacement.

Arnd