Re: [PATCH] Fix IXP4xx MTD driver no cast warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 September 2005 13:00:18 -0700, Linus Torvalds wrote:
> On Thu, 29 Sep 2005, Deepak Saxena wrote:
> > 
> > drivers/mtd/maps/ixp4xx.c: In function 'ixp4xx_flash_probe':
> > drivers/mtd/maps/ixp4xx.c:199: warning: assignment makes integer from
> > pointer without a cast
> 
> Please don't. The warning is entirely warranted, as far as I can tell.
> 
> Shutting up warnings just because they are warnings is bad practice. 
> Either fix them, or leave them be.
> 
> If you do an "ioremap()", then the result is a "(void __iomem *)". If you 
> assign it to something that is "unsigned long", you _should_ get a 
> warning.

Code is correct, as far as this specific mapping driver is concerned.
But it would make some sense to convert one of the map_priv_[12] in
struct map_info to (void __iomem *).

Jörn

-- 
It does not matter how slowly you go, so long as you do not stop.
-- Confucius
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux