Thread (10 messages) 10 messages, 2 authors, 2014-01-03

Re: [PATCH v3 REPOST 3/4] i2c: i2c-ibm-iic: Implements transfer abortion

From: Wolfram Sang <hidden>
Date: 2014-01-03 15:09:52
Also in: linux-i2c

On Fri, Dec 20, 2013 at 04:12:55PM +0100, jean-jacques hiblot wrote:
From: jean-jacques hiblot <redacted>

Clean-up properly when a transfer fails for whatever reason.
Cancel the transfer when the process is signaled.
Please describe what you do a little. I wonder how you can remove so
much code while keeping the functionality?
Signed-off-by: jean-jacques hiblot <redacted>
-	out_8(&iic->cntl, CNTL_HMT);
+	DBG(dev, "aborting transfer\n");
+	/* transfer should be aborted within 10ms */
+	end = jiffies + 10;
Eeks, msecs_to_jiffies() macro please!

And please consider running checkpatch and sparse over your code. Sparse
gives, for example:

drivers/i2c/busses/i2c-ibm_iic.c:418:24: warning: incorrect type in argument 1 (different address spaces)
drivers/i2c/busses/i2c-ibm_iic.c:418:24:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
drivers/i2c/busses/i2c-ibm_iic.c:418:24:    got unsigned char *<noident>

(This probably due to patch 1 or 2, I'd guess)

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help