Re: [PATCH] tpm: fix tpm_acpi sparse warning on different addressspaces

From: Dan Carpenter
Date: Thu Aug 30 2012 - 13:46:06 EST


On Thu, Aug 30, 2012 at 09:38:41AM -0500, Kent Yoder wrote:
> acpi_os_map_memory expects its return value to be in the __iomem address
> space. Cast it back later when used in a memcpy to avoid the same sparse
> warning there.
>
> Signed-off-by: Kent Yoder <key@xxxxxxxxxxxxxxxxxx>

I can't download linux-next right now but I don't think this is the
correct fix. I don't think you can memcpy() directly from __iomem.
The static checker is warning about a valid bug which should be
addressed instead of just casted away and silenced.

regards,
dan carpenter


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