Skip to contentSkip to conversation

Staging: i2o: i2o_scsi: Fixed coding style issue

PATCH In review Tolga Ceylan 2 participants 3 messages Feb 19, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: i2o: i2o_scsi: Fixed coding style issue

Removed assignment in if condition

---
 drivers/staging/i2o/i2o_scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/i2o/i2o_scsi.c +2 -1
index 1b11dcb..f320366 100644
@@ -750,7 +750,8 @@ static int i2o_scsi_bios_param(struct scsi_device *sdev,
 	size = capacity;
 	ip[0] = 64;		/* heads                        */
 	ip[1] = 32;		/* sectors                      */
-	if ((ip[2] = size >> 11) > 1024) {	/* cylinders, test for big disk */
+	ip[2] = size >> 11;
+	if (ip[2] > 1024) {	/* cylinders, test for big disk */
 		ip[0] = 255;	/* heads                        */
 		ip[1] = 63;	/* sectors                      */
 		ip[2] = size / (255 * 63);	/* cylinders                    */
Signature · 1 line
2.3.0
#1 lore raw
Quoted 2 lines · Tolga Ceylan

Removed assignment in if condition

This patch looks good, but it's not really worth cleaning up i2o. We just moved it to staging to see if anyone noticed that it was gone. Next kernel release we want to delete it entirely.

regards,
dan carpenter

#2 lore raw

Also you sent three patches with the exact same subject. Don't do that.

The subject should be more specific. Also the word "fix" is sort of reserved for actual fixes, this is a cleanup. The tutorials all suggest terrible subjects so everyone makes these mistakes.

regards,
dan carpenter