Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] hdpvr: fix sparse warnings

drivers/media/usb/hdpvr/hdpvr-core.c:110:54: warning: incorrect type in argument 1 (different base types)
drivers/media/usb/hdpvr/hdpvr-core.c:112:39: warning: invalid assignment: +=
drivers/media/usb/hdpvr/hdpvr-core.c:304:26: warning: Using plain integer as NULL pointer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
c8e479c4 15807765

+5 -6
+5 -6
drivers/media/usb/hdpvr/hdpvr-core.c
··· 78 78 79 79 static void challenge(u8 *bytes) 80 80 { 81 - u64 *i64P, tmp64; 81 + __le64 *i64P; 82 + u64 tmp64; 82 83 uint i, idx; 83 84 84 85 for (idx = 0; idx < 32; ++idx) { ··· 107 106 for (i = 0; i < 3; i++) 108 107 bytes[1] *= bytes[6] + 1; 109 108 for (i = 0; i < 3; i++) { 110 - i64P = (u64 *)bytes; 109 + i64P = (__le64 *)bytes; 111 110 tmp64 = le64_to_cpup(i64P); 112 - tmp64 <<= bytes[7] & 0x0f; 113 - *i64P += cpu_to_le64(tmp64); 111 + tmp64 = tmp64 + (tmp64 << (bytes[7] & 0x0f)); 112 + *i64P = cpu_to_le64(tmp64); 114 113 } 115 114 break; 116 115 } ··· 301 300 dev_err(&interface->dev, "Out of memory\n"); 302 301 goto error; 303 302 } 304 - 305 - dev->workqueue = 0; 306 303 307 304 /* init video transfer queues first of all */ 308 305 /* to prevent oops in hdpvr_delete() on error paths */