Fix zoran_card compilation warning
PATCH 1/1 Fix zoran_card compilation warning
Hi Ronald, all,
Fix the following warning which was introduced in 2.6.15-git8 by commit 7408187d223f63d46a13b6a35b8f96b032c2f623:
CC [M] drivers/media/video/zoran_card.odrivers/media/video/zoran_card.c: In function `zr36057_init':drivers/media/video/zoran_card.c:1053: warning: assignment makes integer from pointer without a cast
--- drivers/media/video/zoran_card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/video/zoran_card.c +3 -3
@@ -995,7 +995,7 @@static int __devinit zr36057_init (struct zoran *zr) { -unsigned long mem; +u32 *mem;void *vdev;unsigned mem_needed;int j;
@@ -1058,10 +1058,10 @@"%s: zr36057_init() - kmalloc (STAT_COM) failed\n" , ZR_DEVNAME(zr));kfree (vdev); -kfree ((void *)mem); +kfree (mem);return -ENOMEM ; } - zr->stat_com = (u32 *) mem; + zr->stat_com = mem;for (j =0 ; j <BUZ_NUM_STAT_COM ; j++) { zr->stat_com[j] =1 ;/* mark as unavailable to zr36057 */ }
Signature · 1 line
Jean Delvare
Hi Linus, all,
Can we get this one merged before 2.6.16-rc1 please? Thanks.
Fix the following warning which was introduced in 2.6.15-git8 by commit 7408187d223f63d46a13b6a35b8f96b032c2f623:
CC [M] drivers/media/video/zoran_card.odrivers/media/video/zoran_card.c: In function `zr36057_init':drivers/media/video/zoran_card.c:1053: warning: assignment makes integer from pointer without a cast
--- drivers/media/video/zoran_card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/video/zoran_card.c +3 -3
@@ -995,7 +995,7 @@static int __devinit zr36057_init (struct zoran *zr) { -unsigned long mem; +u32 *mem;void *vdev;unsigned mem_needed;int j;
@@ -1058,10 +1058,10 @@"%s: zr36057_init() - kmalloc (STAT_COM) failed\n" , ZR_DEVNAME(zr));kfree (vdev); -kfree ((void *)mem); +kfree (mem);return -ENOMEM ; } - zr->stat_com = (u32 *) mem; + zr->stat_com = mem;for (j =0 ; j <BUZ_NUM_STAT_COM ; j++) { zr->stat_com[j] =1 ;/* mark as unavailable to zr36057 */ }
Signature · 1 line
Jean Delvare
Hi Linus/Andrew,
Quoted 24 lines · Jean Delvare
CC [M]
drivers/media/video/zoran_card.odrivers/media/video/zoran_card.c: In function `zr36057_init':drivers/media/video/zoran_card.c:1053: warning: assignment makes integer from pointer without a castSigned-off-by Jean Delvare <[email protected]>--- drivers/media/video/zoran_card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/media/video/zoran_card.c +1
-1@@ -995,7 +995,7 @@static int __devinit zr36057_init (struct zoran *zr) { -unsigned long mem; +u32 *mem;void *vdev;unsigned mem_needed;int j;@@ -1058,10 +1058,10 @@"%s: zr36057_init() - kmalloc (STAT_COM) failed\n" , ZR_DEVNAME(zr));
drivers/media/video/zoran_card.c line 1067
Quoted 10 lines
drivers/media/video/zoran_card.c +2
-2kfree (vdev); -kfree ((void *)mem); +kfree (mem);return -ENOMEM ; } - zr->stat_com = (u32 *) mem; + zr->stat_com = mem;for (j =0 ; j <BUZ_NUM_STAT_COM ; j++) { zr->stat_com[j] =1 ;/* mark as unavailable to zr36057 */ }
I support this change, please apply it. It's something left-over from the time that all computers were 32-bit. Apart from this warning (which nobody really cared about), the driver was already tested to work fine on AMD64 computers in 64-bit mode.
Thank you,
Ronald