lkml.org 
[lkml]   [2006]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectproper way to deal with a sparse warning
Date
I'm getting the following sparse warning:

drivers/net/gianfar_mii.c:165:16: warning: incorrect type in
assignment (different address spaces)
drivers/net/gianfar_mii.c:165:16: expected void *priv
drivers/net/gianfar_mii.c:165:16: got struct gfar_mii [noderef] *
[assigned] regs<asn:2>

This is line 165 of gianfar_mii.c:

new_bus->priv = regs;

new_bus->priv is of type void *. regs is of type struct gfar_mii
__iomem *.

Is it acceptable to do the following:

new_bus->priv = (void __force *)regs;

- kumar

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-19 07:22    [W:0.064 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site