Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Frank Haverkamp
Hi Dan, Am Dienstag, den 07.01.2014, 15:45 +0300 schrieb Dan Carpenter: > Oops sorry... I'm also still catching up from the holidays. I think I > was even CC'd on your earlier fix. No problem. Let me send my latest set of patches for our GenWQE driver which includes the ioctl return code fix

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Dan Carpenter
Oops sorry... I'm also still catching up from the holidays. I think I was even CC'd on your earlier fix. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Frank Haverkamp
Hi Dan, Am Dienstag, den 07.01.2014, 09:41 +0300 schrieb Dan Carpenter: > Could you also fix this Smatch warning? > drivers/misc/genwqe/card_dev.c:658 do_flash_update() warn: maybe return > -EFAULT instead of the bytes remaining? I thought i fixed this already in my posting: [PATCH] GenWQE:

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Frank Haverkamp
Hi Dan, Am Dienstag, den 07.01.2014, 09:41 +0300 schrieb Dan Carpenter: Could you also fix this Smatch warning? drivers/misc/genwqe/card_dev.c:658 do_flash_update() warn: maybe return -EFAULT instead of the bytes remaining? I thought i fixed this already in my posting: [PATCH] GenWQE:

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Dan Carpenter
Oops sorry... I'm also still catching up from the holidays. I think I was even CC'd on your earlier fix. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-07 Thread Frank Haverkamp
Hi Dan, Am Dienstag, den 07.01.2014, 15:45 +0300 schrieb Dan Carpenter: Oops sorry... I'm also still catching up from the holidays. I think I was even CC'd on your earlier fix. No problem. Let me send my latest set of patches for our GenWQE driver which includes the ioctl return code fix and

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-06 Thread Dan Carpenter
Could you also fix this Smatch warning? drivers/misc/genwqe/card_dev.c:658 do_flash_update() warn: maybe return -EFAULT instead of the bytes remaining? Also we shouldn't be doing dev_err() on copy_to/from_user() problems. The user can trigger those and flood dmesg. It is a DoS (annoying).

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2014-01-06 Thread Dan Carpenter
Could you also fix this Smatch warning? drivers/misc/genwqe/card_dev.c:658 do_flash_update() warn: maybe return -EFAULT instead of the bytes remaining? Also we shouldn't be doing dev_err() on copy_to/from_user() problems. The user can trigger those and flood dmesg. It is a DoS (annoying).

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Frank Haverkamp
Hi Greg, Am Freitag, den 20.12.2013, 16:26 +0100 schrieb Frank Haverkamp: > +++ b/drivers/misc/genwqe/card_utils.c > @@ -59,7 +59,7 @@ int __genwqe_writeq(struct genwqe_dev *c > if (cd->mmio == NULL) > return -EIO; > > - __raw_writeq(cpu_to_be64((val)), (cd->mmio +

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Greg KH
On Fri, Dec 20, 2013 at 04:26:10PM +0100, Frank Haverkamp wrote: > Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for > endian issues. Sparse found a couple of those. Most of them were caused > by not correctly handling __be64/32 and __u64/32. Those I was able to > fix with

[PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Frank Haverkamp
Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for endian issues. Sparse found a couple of those. Most of them were caused by not correctly handling __be64/32 and __u64/32. Those I was able to fix with appropriate castings. One more serious issue was the ATS entry in struct

[PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Frank Haverkamp
Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for endian issues. Sparse found a couple of those. Most of them were caused by not correctly handling __be64/32 and __u64/32. Those I was able to fix with appropriate castings. One more serious issue was the ATS entry in struct

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Greg KH
On Fri, Dec 20, 2013 at 04:26:10PM +0100, Frank Haverkamp wrote: Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for endian issues. Sparse found a couple of those. Most of them were caused by not correctly handling __be64/32 and __u64/32. Those I was able to fix with

Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

2013-12-20 Thread Frank Haverkamp
Hi Greg, Am Freitag, den 20.12.2013, 16:26 +0100 schrieb Frank Haverkamp: +++ b/drivers/misc/genwqe/card_utils.c @@ -59,7 +59,7 @@ int __genwqe_writeq(struct genwqe_dev *c if (cd-mmio == NULL) return -EIO; - __raw_writeq(cpu_to_be64((val)), (cd-mmio +