All of lore.kernel.org
 help / color / mirror / Atom feed
* checkpatch doing the wrong thing with "*" in return statement
@ 2009-06-18 13:16 Boaz Harrosh
  0 siblings, 0 replies; only message in thread
From: Boaz Harrosh @ 2009-06-18 13:16 UTC (permalink / raw)
  To: Andy Whitcroft, Linux Kernel

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>
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index b07e154..e8b5fba 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
@@ -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>

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-18 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-18 13:16 checkpatch doing the wrong thing with "*" in return statement Boaz Harrosh

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.