[U-Boot] About the volatile data type in include/net.h

Macpaul Lin macpaul at gmail.com
Tue Nov 22 04:06:37 CET 2011


HI all,

I have found there are some variables declared as volatile in include/net.h.
Some of them are used as in send and receive functions.
Since some of them seems won't be update by hardware, like sending functions.
Should we check and clean them up?

For example, the send function in eth_device has a volatile type
points to buffer.

struct eth_device {
        char name[NAMESIZE];
        unsigned char enetaddr[6];
        int iobase;
        int state;

        int  (*init) (struct eth_device*, bd_t*);
        int  (*send) (struct eth_device*, volatile void* packet, int length);
        int  (*recv) (struct eth_device*);
        void (*halt) (struct eth_device*);
#ifdef CONFIG_MCAST_TFTP
        int (*mcast) (struct eth_device*, u32 ip, u8 set);
#endif
        int  (*write_hwaddr) (struct eth_device*);
        struct eth_device *next;
        void *priv;
};

-- 
Best regards,
Macpaul Lin


More information about the U-Boot mailing list