• David Brownell's avatar
    more davinci_emac sparse fixes · acca4aaa
    David Brownell authored
    Update more of the RX and TX buffer descriptor (BD) handling to
    properly distinguish between __iomem pointers and normal data
    memory address space, getting rid of 32 "cast removes address
    space of expression" messages.
    
    This patch doesn't resolve all the issues sparse reports.  In fact
    there are now 48 new "dereference of noderef expression" messages.
    They mean that a patch is needed to convert BD member accessors to
    use readl/writel calls.
    
    Plus, there are several related issues that sparse won't warn about.
    The initial i/o space addresses -- SRAM used for BDs, and controller
    registers -- should come from ioremap.  Reverse mappings shouldn't
    usually be needed, and if they are they should avoid io_v2p() and
    virt_to_phys() calls.  And the need to use casts so often is wrong,
    especially with __force annotations.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
    acca4aaa
davinci_emac.c 84.5 KB