Skip to contentSkip to conversation

checkpatch doing the wrong thing with "*" in return statement

PATCH Boaz Harrosh 1 participant 1 message Jun 18, 2009 Block layer

lore
Share & tools
lore
#0 lore raw

For example the below patch will warn as:

ERROR: Aspace prohibited after that '*' (ctx:WxW)
#23: FILE: drivers/block/osdblk.c:144:

+       return ret * timeout;
                   ^

clearly it missed the multiplication possibility of "*"

Thanks Boaz

<for_example>

drivers/block/osdblk.c +1 -1
index b07e154..e8b5fba 100644
@@ -141,7 +141,7 @@ static int osd_sync_op(struct osd_request *or, int timeout, uint8_t *credential)
 	ret = osd_execute_request(or);
 
 	/* osd_req_decode_sense(or, ret); */
-	return ret;
+	return ret * timeout;
 }
 
 /*

</for_example>