From mboxrd@z Thu Jan 1 00:00:00 1970 From: harryxiyou@gmail.com (harryxiyou) Date: Thu, 31 May 2012 00:50:02 +0800 Subject: [RFC]confusions about 'struct' define Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi guys, When I read the linux/device.h file for some device driver usage, i find some confusions like following. $ head -60 device.h [...] struct device; struct device_private; struct device_driver; struct driver_private; struct module; struct class; struct subsys_private; struct bus_type; struct device_node; struct iommu_ops; struct bus_attribute { struct attribute attr; ssize_t (*show)(struct bus_type *bus, char *buf); ssize_t (*store)(struct bus_type *bus, const char *buf, size_t count); }; [...] I have never seen struct define like "struct device; struct device_private; struct device_driver; [...] struct device_node; struct iommu_ops;" The common define is like this "struct a{ int a; int b; [...] }" Is this just struct declaration or some extension about gcc? Cloud anyone give me some explanations? Thanks in advance ;-) Note: my kernel version is 3.0 around. -- Thanks Harry Wei