diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:14:54 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:14:54 -0800 |
| commit | 6fbaac38b85e4bd3936b882392e3a9b45e8acb46 (patch) | |
| tree | a3861b5a834f5628fe6dc50a2733084b56217b39 /include/linux | |
| parent | 6f267f9cc2ea3c375b3e70e336f4feb7da365fe3 (diff) | |
v2.4.7 -> v2.4.7.1
- Anton Altaparmakov: NTFS error checking
- Johannes Erdfelt: USB updates
- OGAWA Hirofumi: FAT update
- Alan Cox: driver + s390 update merge
- Richard Henderson: fix alpha sigsuspend error return value
- Marcelo Tosatti: per-zone VM shortage
- Daniel Phillips: generic use-once optimization instead of drop-behind
- Bjorn Wesen: Cris architecture update
- Anton Altaparmakov: support for Windows Dynamic Disks
- James Washer: LDT loading SMP bug fix
Diffstat (limited to 'include/linux')
41 files changed, 215 insertions, 208 deletions
diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h index f75dccef48bf..814b4519ff21 100644 --- a/include/linux/byteorder/swab.h +++ b/include/linux/byteorder/swab.h @@ -128,34 +128,34 @@ #endif /* OPTIMIZE */ -extern __inline__ __const__ __u16 __fswab16(__u16 x) +static __inline__ __const__ __u16 __fswab16(__u16 x) { return __arch__swab16(x); } -extern __inline__ __u16 __swab16p(__u16 *x) +static __inline__ __u16 __swab16p(__u16 *x) { return __arch__swab16p(x); } -extern __inline__ void __swab16s(__u16 *addr) +static __inline__ void __swab16s(__u16 *addr) { __arch__swab16s(addr); } -extern __inline__ __const__ __u32 __fswab32(__u32 x) +static __inline__ __const__ __u32 __fswab32(__u32 x) { return __arch__swab32(x); } -extern __inline__ __u32 __swab32p(__u32 *x) +static __inline__ __u32 __swab32p(__u32 *x) { return __arch__swab32p(x); } -extern __inline__ void __swab32s(__u32 *addr) +static __inline__ void __swab32s(__u32 *addr) { __arch__swab32s(addr); } #ifdef __BYTEORDER_HAS_U64__ -extern __inline__ __const__ __u64 __fswab64(__u64 x) +static __inline__ __const__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; @@ -165,11 +165,11 @@ extern __inline__ __const__ __u64 __fswab64(__u64 x) return __arch__swab64(x); # endif } -extern __inline__ __u64 __swab64p(__u64 *x) +static __inline__ __u64 __swab64p(__u64 *x) { return __arch__swab64p(x); } -extern __inline__ void __swab64s(__u64 *addr) +static __inline__ void __swab64s(__u64 *addr) { __arch__swab64s(addr); } diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index 3ce8382190f1..d28d9a804d3b 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h @@ -92,29 +92,29 @@ #endif /* OPTIMIZE */ -extern __inline__ __const__ __u32 __fswahw32(__u32 x) +static __inline__ __const__ __u32 __fswahw32(__u32 x) { return __arch__swahw32(x); } -extern __inline__ __u32 __swahw32p(__u32 *x) +static __inline__ __u32 __swahw32p(__u32 *x) { return __arch__swahw32p(x); } -extern __inline__ void __swahw32s(__u32 *addr) +static __inline__ void __swahw32s(__u32 *addr) { __arch__swahw32s(addr); } -extern __inline__ __const__ __u32 __fswahb32(__u32 x) +static __inline__ __const__ __u32 __fswahb32(__u32 x) { return __arch__swahb32(x); } -extern __inline__ __u32 __swahb32p(__u32 *x) +static __inline__ __u32 __swahb32p(__u32 *x) { return __arch__swahb32p(x); } -extern __inline__ void __swahb32s(__u32 *addr) +static __inline__ void __swahb32s(__u32 *addr) { __arch__swahb32s(addr); } diff --git a/include/linux/fs.h b/include/linux/fs.h index 4958aacbab20..a716192ba716 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -997,7 +997,7 @@ static inline int locks_verify_truncate(struct inode *inode, return 0; } -extern inline int get_lease(struct inode *inode, unsigned int mode) +static inline int get_lease(struct inode *inode, unsigned int mode) { if (inode->i_flock && (inode->i_flock->fl_flags & FL_LEASE)) return __get_lease(inode, mode); diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index b9cc125a436c..3ac12961d802 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h @@ -210,43 +210,43 @@ void unregister_hdlc_device(hdlc_device *hdlc); void hdlc_netif_rx(hdlc_device *hdlc, struct sk_buff *skb); -extern __inline__ struct net_device* hdlc_to_dev(hdlc_device *hdlc) +static __inline__ struct net_device* hdlc_to_dev(hdlc_device *hdlc) { return &hdlc->netdev; } -extern __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) +static __inline__ hdlc_device* dev_to_hdlc(struct net_device *dev) { return (hdlc_device*)dev; } -extern __inline__ struct net_device* pvc_to_dev(pvc_device *pvc) +static __inline__ struct net_device* pvc_to_dev(pvc_device *pvc) { return &pvc->netdev; } -extern __inline__ pvc_device* dev_to_pvc(struct net_device *dev) +static __inline__ pvc_device* dev_to_pvc(struct net_device *dev) { return (pvc_device*)dev; } -extern __inline__ const char *hdlc_to_name(hdlc_device *hdlc) +static __inline__ const char *hdlc_to_name(hdlc_device *hdlc) { return hdlc_to_dev(hdlc)->name; } -extern __inline__ const char *pvc_to_name(pvc_device *pvc) +static __inline__ const char *pvc_to_name(pvc_device *pvc) { return pvc_to_dev(pvc)->name; } -extern __inline__ u16 status_to_dlci(hdlc_device *hdlc, u8 *status, u8 *state) +static __inline__ u16 status_to_dlci(hdlc_device *hdlc, u8 *status, u8 *state) { *state &= ~(PVC_STATE_ACTIVE | PVC_STATE_NEW); if (status[2] & 0x08) @@ -258,7 +258,7 @@ extern __inline__ u16 status_to_dlci(hdlc_device *hdlc, u8 *status, u8 *state) } -extern __inline__ void dlci_to_status(hdlc_device *hdlc, u16 dlci, u8 *status, +static __inline__ void dlci_to_status(hdlc_device *hdlc, u16 dlci, u8 *status, u8 state) { status[0] = (dlci>>4) & 0x3F; @@ -273,21 +273,21 @@ extern __inline__ void dlci_to_status(hdlc_device *hdlc, u16 dlci, u8 *status, -extern __inline__ u16 netdev_dlci(struct net_device *dev) +static __inline__ u16 netdev_dlci(struct net_device *dev) { return ntohs(*(u16*)dev->dev_addr); } -extern __inline__ u16 q922_to_dlci(u8 *hdr) +static __inline__ u16 q922_to_dlci(u8 *hdr) { return ((hdr[0] & 0xFC)<<2) | ((hdr[1] & 0xF0)>>4); } -extern __inline__ void dlci_to_q922(u8 *hdr, u16 dlci) +static __inline__ void dlci_to_q922(u8 *hdr, u16 dlci) { hdr[0] = (dlci>>2) & 0xFC; hdr[1] = ((dlci<<4) & 0xF0) | 0x01; @@ -295,14 +295,14 @@ extern __inline__ void dlci_to_q922(u8 *hdr, u16 dlci) -extern __inline__ int mode_is(hdlc_device *hdlc, int mask) +static __inline__ int mode_is(hdlc_device *hdlc, int mask) { return (hdlc->mode & mask) == mask; } -extern __inline__ pvc_device* find_pvc(hdlc_device *hdlc, u16 dlci) +static __inline__ pvc_device* find_pvc(hdlc_device *hdlc, u16 dlci) { pvc_device *pvc=hdlc->first_pvc; @@ -317,7 +317,7 @@ extern __inline__ pvc_device* find_pvc(hdlc_device *hdlc, u16 dlci) -extern __inline__ void debug_frame(const struct sk_buff *skb) +static __inline__ void debug_frame(const struct sk_buff *skb) { int i; diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index 4d9ef78e06e4..9c2d23ecb602 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h @@ -49,7 +49,7 @@ struct i2c_rdwr_ioctl_data { #include <sys/ioctl.h> -extern inline __s32 i2c_smbus_access(int file, char read_write, __u8 command, +static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command, int size, union i2c_smbus_data *data) { struct i2c_smbus_ioctl_data args; @@ -62,12 +62,12 @@ extern inline __s32 i2c_smbus_access(int file, char read_write, __u8 command, } -extern inline __s32 i2c_smbus_write_quick(int file, __u8 value) +static inline __s32 i2c_smbus_write_quick(int file, __u8 value) { return i2c_smbus_access(file,value,0,I2C_SMBUS_QUICK,NULL); } -extern inline __s32 i2c_smbus_read_byte(int file) +static inline __s32 i2c_smbus_read_byte(int file) { union i2c_smbus_data data; if (i2c_smbus_access(file,I2C_SMBUS_READ,0,I2C_SMBUS_BYTE,&data)) @@ -76,13 +76,13 @@ extern inline __s32 i2c_smbus_read_byte(int file) return 0x0FF & data.byte; } -extern inline __s32 i2c_smbus_write_byte(int file, __u8 value) +static inline __s32 i2c_smbus_write_byte(int file, __u8 value) { return i2c_smbus_access(file,I2C_SMBUS_WRITE,value, I2C_SMBUS_BYTE,NULL); } -extern inline __s32 i2c_smbus_read_byte_data(int file, __u8 command) +static inline __s32 i2c_smbus_read_byte_data(int file, __u8 command) { union i2c_smbus_data data; if (i2c_smbus_access(file,I2C_SMBUS_READ,command, @@ -92,7 +92,7 @@ extern inline __s32 i2c_smbus_read_byte_data(int file, __u8 command) return 0x0FF & data.byte; } -extern inline __s32 i2c_smbus_write_byte_data(int file, __u8 command, +static inline __s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value) { union i2c_smbus_data data; @@ -101,7 +101,7 @@ extern inline __s32 i2c_smbus_write_byte_data(int file, __u8 command, I2C_SMBUS_BYTE_DATA, &data); } -extern inline __s32 i2c_smbus_read_word_data(int file, __u8 command) +static inline __s32 i2c_smbus_read_word_data(int file, __u8 command) { union i2c_smbus_data data; if (i2c_smbus_access(file,I2C_SMBUS_READ,command, @@ -111,7 +111,7 @@ extern inline __s32 i2c_smbus_read_word_data(int file, __u8 command) return 0x0FFFF & data.word; } -extern inline __s32 i2c_smbus_write_word_data(int file, __u8 command, +static inline __s32 i2c_smbus_write_word_data(int file, __u8 command, __u16 value) { union i2c_smbus_data data; @@ -120,7 +120,7 @@ extern inline __s32 i2c_smbus_write_word_data(int file, __u8 command, I2C_SMBUS_WORD_DATA, &data); } -extern inline __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value) +static inline __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value) { union i2c_smbus_data data; data.word = value; @@ -133,7 +133,7 @@ extern inline __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value) /* Returns the number of read bytes */ -extern inline __s32 i2c_smbus_read_block_data(int file, __u8 command, +static inline __s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values) { union i2c_smbus_data data; @@ -148,7 +148,7 @@ extern inline __s32 i2c_smbus_read_block_data(int file, __u8 command, } } -extern inline __s32 i2c_smbus_write_block_data(int file, __u8 command, +static inline __s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length, __u8 *values) { union i2c_smbus_data data; @@ -162,7 +162,7 @@ extern inline __s32 i2c_smbus_write_block_data(int file, __u8 command, I2C_SMBUS_BLOCK_DATA, &data); } -extern inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, +static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, __u8 length, __u8 *values) { union i2c_smbus_data data; diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 0496c344eaca..cebfa0df8717 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h @@ -240,47 +240,47 @@ struct i2o_sys_tbl /* * Messenger inlines */ -extern inline u32 I2O_POST_READ32(struct i2o_controller *c) +static inline u32 I2O_POST_READ32(struct i2o_controller *c) { return *c->post_port; } -extern inline void I2O_POST_WRITE32(struct i2o_controller *c, u32 Val) +static inline void I2O_POST_WRITE32(struct i2o_controller *c, u32 Val) { *c->post_port = Val; } -extern inline u32 I2O_REPLY_READ32(struct i2o_controller *c) +static inline u32 I2O_REPLY_READ32(struct i2o_controller *c) { return *c->reply_port; } -extern inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 Val) +static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 Val) { *c->reply_port= Val; } -extern inline u32 I2O_IRQ_READ32(struct i2o_controller *c) +static inline u32 I2O_IRQ_READ32(struct i2o_controller *c) { return *c->irq_mask; } -extern inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 Val) +static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 Val) { *c->irq_mask = Val; } -extern inline void i2o_post_message(struct i2o_controller *c, u32 m) +static inline void i2o_post_message(struct i2o_controller *c, u32 m) { /* The second line isnt spurious - thats forcing PCI posting */ I2O_POST_WRITE32(c,m); (void) I2O_IRQ_READ32(c); } -extern inline void i2o_flush_reply(struct i2o_controller *c, u32 m) +static inline void i2o_flush_reply(struct i2o_controller *c, u32 m) { I2O_REPLY_WRITE32(c,m); } diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ded38f67b36f..47ee810f813c 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -85,7 +85,7 @@ extern u32 inet_select_addr(const struct net_device *dev, u32 dst, int scope); extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask); extern void inet_forward_change(void); -extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) +static __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) { return !((addr^ifa->ifa_address)&ifa->ifa_mask); } @@ -94,7 +94,7 @@ extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) * Check if a mask is acceptable. */ -extern __inline__ int bad_mask(u32 mask, u32 addr) +static __inline__ int bad_mask(u32 mask, u32 addr) { if (addr & (mask = ~mask)) return 1; @@ -116,7 +116,7 @@ extern __inline__ int bad_mask(u32 mask, u32 addr) extern rwlock_t inetdev_lock; -extern __inline__ struct in_device * +static __inline__ struct in_device * in_dev_get(const struct net_device *dev) { struct in_device *in_dev; @@ -129,7 +129,7 @@ in_dev_get(const struct net_device *dev) return in_dev; } -extern __inline__ struct in_device * +static __inline__ struct in_device * __in_dev_get(const struct net_device *dev) { return (struct in_device*)dev->ip_ptr; @@ -137,7 +137,7 @@ __in_dev_get(const struct net_device *dev) extern void in_dev_finish_destroy(struct in_device *idev); -extern __inline__ void +static __inline__ void in_dev_put(struct in_device *idev) { if (atomic_dec_and_test(&idev->refcnt)) @@ -149,14 +149,14 @@ in_dev_put(struct in_device *idev) #endif /* __KERNEL__ */ -extern __inline__ __u32 inet_make_mask(int logmask) +static __inline__ __u32 inet_make_mask(int logmask) { if (logmask) return htonl(~((1<<(32-logmask))-1)); return 0; } -extern __inline__ int inet_mask_len(__u32 mask) +static __inline__ int inet_mask_len(__u32 mask) { if (!(mask = ntohl(mask))) return 0; diff --git a/include/linux/init.h b/include/linux/init.h index dbc375bd5150..f0644ca302e8 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -132,11 +132,11 @@ typedef int (*__init_module_func_t)(void); typedef void (*__cleanup_module_func_t)(void); #define module_init(x) \ int init_module(void) __attribute__((alias(#x))); \ - extern inline __init_module_func_t __init_module_inline(void) \ + static inline __init_module_func_t __init_module_inline(void) \ { return x; } #define module_exit(x) \ void cleanup_module(void) __attribute__((alias(#x))); \ - extern inline __cleanup_module_func_t __cleanup_module_inline(void) \ + static inline __cleanup_module_func_t __cleanup_module_inline(void) \ { return x; } #define __setup(str,func) /* nothing */ diff --git a/include/linux/ipsec.h b/include/linux/ipsec.h index b9d7bcc63820..2ccf61d088dd 100644 --- a/include/linux/ipsec.h +++ b/include/linux/ipsec.h @@ -49,7 +49,7 @@ */ #ifdef CONFIG_NET_SECURITY -extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb) +static __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb) { return ((sk->authentication < IPSEC_LEVEL_REQUIRE) || (skb->security & RCV_AUTH)) && @@ -59,7 +59,7 @@ extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb) #else -extern __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb) +static __inline__ int ipsec_sk_policy(struct sock *sk, struct sk_buff *skb) { return 1; } diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index f44001df9c58..f42165a80799 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -217,37 +217,37 @@ extern struct list_head isapnp_devices; #else /* !CONFIG_ISAPNP */ /* lowlevel configuration */ -extern inline int isapnp_present(void) { return 0; } -extern inline int isapnp_cfg_begin(int csn, int device) { return -ENODEV; } -extern inline int isapnp_cfg_end(void) { return -ENODEV; } -extern inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; } -extern inline unsigned short isapnp_read_word(unsigned char idx) { return 0xffff; } -extern inline unsigned int isapnp_read_dword(unsigned char idx) { return 0xffffffff; } -extern inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; } -extern inline void isapnp_write_word(unsigned char idx, unsigned short val) { ; } -extern inline void isapnp_write_dword(unsigned char idx, unsigned int val) { ; } -extern inline void isapnp_wake(unsigned char csn) { ; } -extern inline void isapnp_device(unsigned char device) { ; } -extern inline void isapnp_activate(unsigned char device) { ; } -extern inline void isapnp_deactivate(unsigned char device) { ; } +static inline int isapnp_present(void) { return 0; } +static inline int isapnp_cfg_begin(int csn, int device) { return -ENODEV; } +static inline int isapnp_cfg_end(void) { return -ENODEV; } +static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; } +static inline unsigned short isapnp_read_word(unsigned char idx) { return 0xffff; } +static inline unsigned int isapnp_read_dword(unsigned char idx) { return 0xffffffff; } +static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; } +static inline void isapnp_write_word(unsigned char idx, unsigned short val) { ; } +static inline void isapnp_write_dword(unsigned char idx, unsigned int val) { ; } +static inline void isapnp_wake(unsigned char csn) { ; } +static inline void isapnp_device(unsigned char device) { ; } +static inline void isapnp_activate(unsigned char device) { ; } +static inline void isapnp_deactivate(unsigned char device) { ; } /* manager */ -extern inline struct pci_bus *isapnp_find_card(unsigned short vendor, +static inline struct pci_bus *isapnp_find_card(unsigned short vendor, unsigned short device, struct pci_bus *from) { return NULL; } -extern inline struct pci_dev *isapnp_find_dev(struct pci_bus *card, +static inline struct pci_dev *isapnp_find_dev(struct pci_bus *card, unsigned short vendor, unsigned short function, struct pci_dev *from) { return NULL; } -extern inline int isapnp_probe_cards(const struct isapnp_card_id *ids, +static inline int isapnp_probe_cards(const struct isapnp_card_id *ids, int (*probe)(struct pci_bus *card, const struct isapnp_card_id *id)) { return -ENODEV; } -extern inline int isapnp_probe_devs(const struct isapnp_device_id *ids, +static inline int isapnp_probe_devs(const struct isapnp_device_id *ids, int (*probe)(struct pci_dev *dev, const struct isapnp_device_id *id)) { return -ENODEV; } -extern inline void isapnp_resource_change(struct resource *resource, +static inline void isapnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { ; } -extern inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; } +static inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; } #endif /* CONFIG_ISAPNP */ diff --git a/include/linux/isicom.h b/include/linux/isicom.h index 670d72f4eb66..6b0fc14f83e5 100644 --- a/include/linux/isicom.h +++ b/include/linux/isicom.h @@ -169,7 +169,7 @@ struct isi_port { * ISI Card specific ops ... */ -extern inline void raise_dtr(struct isi_port * port) +static inline void raise_dtr(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -189,7 +189,7 @@ extern inline void raise_dtr(struct isi_port * port) port->status |= ISI_DTR; } -extern inline void drop_dtr(struct isi_port * port) +static inline void drop_dtr(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -208,7 +208,7 @@ extern inline void drop_dtr(struct isi_port * port) InterruptTheCard(base); port->status &= ~ISI_DTR; } -extern inline void raise_rts(struct isi_port * port) +static inline void raise_rts(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -227,7 +227,7 @@ extern inline void raise_rts(struct isi_port * port) InterruptTheCard(base); port->status |= ISI_RTS; } -extern inline void drop_rts(struct isi_port * port) +static inline void drop_rts(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -246,7 +246,7 @@ extern inline void drop_rts(struct isi_port * port) InterruptTheCard(base); port->status &= ~ISI_RTS; } -extern inline void raise_dtr_rts(struct isi_port * port) +static inline void raise_dtr_rts(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -265,7 +265,7 @@ extern inline void raise_dtr_rts(struct isi_port * port) InterruptTheCard(base); port->status |= (ISI_DTR | ISI_RTS); } -extern inline void drop_dtr_rts(struct isi_port * port) +static inline void drop_dtr_rts(struct isi_port * port) { struct isi_board * card = port->card; unsigned short base = card->base; @@ -285,7 +285,7 @@ extern inline void drop_dtr_rts(struct isi_port * port) port->status &= ~(ISI_RTS | ISI_DTR); } -extern inline void kill_queue(struct isi_port * port, short queue) +static inline void kill_queue(struct isi_port * port, short queue) { struct isi_board * card = port->card; unsigned short base = card->base; diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index ef922b03977a..cc442a6b865b 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h @@ -75,69 +75,69 @@ extern int do_poke_blanked_console; extern void (*kbd_ledfunc)(unsigned int led); -extern inline void show_console(void) +static inline void show_console(void) { do_poke_blanked_console = 1; tasklet_schedule(&console_tasklet); } -extern inline void set_console(int nr) +static inline void set_console(int nr) { want_console = nr; tasklet_schedule(&console_tasklet); } -extern inline void set_leds(void) +static inline void set_leds(void) { tasklet_schedule(&keyboard_tasklet); } -extern inline int vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline int vc_kbd_mode(struct kbd_struct * kbd, int flag) { return ((kbd->modeflags >> flag) & 1); } -extern inline int vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline int vc_kbd_led(struct kbd_struct * kbd, int flag) { return ((kbd->ledflagstate >> flag) & 1); } -extern inline void set_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void set_vc_kbd_mode(struct kbd_struct * kbd, int flag) { kbd->modeflags |= 1 << flag; } -extern inline void set_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void set_vc_kbd_led(struct kbd_struct * kbd, int flag) { kbd->ledflagstate |= 1 << flag; } -extern inline void clr_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void clr_vc_kbd_mode(struct kbd_struct * kbd, int flag) { kbd->modeflags &= ~(1 << flag); } -extern inline void clr_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void clr_vc_kbd_led(struct kbd_struct * kbd, int flag) { kbd->ledflagstate &= ~(1 << flag); } -extern inline void chg_vc_kbd_lock(struct kbd_struct * kbd, int flag) +static inline void chg_vc_kbd_lock(struct kbd_struct * kbd, int flag) { kbd->lockstate ^= 1 << flag; } -extern inline void chg_vc_kbd_slock(struct kbd_struct * kbd, int flag) +static inline void chg_vc_kbd_slock(struct kbd_struct * kbd, int flag) { kbd->slockstate ^= 1 << flag; } -extern inline void chg_vc_kbd_mode(struct kbd_struct * kbd, int flag) +static inline void chg_vc_kbd_mode(struct kbd_struct * kbd, int flag) { kbd->modeflags ^= 1 << flag; } -extern inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) +static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) { kbd->ledflagstate ^= 1 << flag; } @@ -161,7 +161,7 @@ extern unsigned int keymap_count; extern task_queue con_task_queue; -extern inline void con_schedule_flip(struct tty_struct *t) +static inline void con_schedule_flip(struct tty_struct *t) { queue_task(&t->flip.tqueue, &con_task_queue); tasklet_schedule(&console_tasklet); diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 179963c779d2..d685da827ef2 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -41,7 +41,7 @@ extern struct kernel_stat kstat; /* * Number of interrupts per specific IRQ source, since bootup */ -extern inline int kstat_irqs (int irq) +static inline int kstat_irqs (int irq) { int i, sum=0; diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 694046eaa215..5df76c9c4321 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -173,7 +173,7 @@ void nlm_release_file(struct nlm_file *); void nlmsvc_mark_resources(void); void nlmsvc_free_host_resources(struct nlm_host *); -extern __inline__ struct inode * +static __inline__ struct inode * nlmsvc_file_inode(struct nlm_file *file) { return file->f_file.f_dentry->d_inode; @@ -182,7 +182,7 @@ nlmsvc_file_inode(struct nlm_file *file) /* * Compare two host addresses (needs modifying for ipv6) */ -extern __inline__ int +static __inline__ int nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) { return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; @@ -192,7 +192,7 @@ nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) * Compare two NLM locks. * When the second lock is of type F_UNLCK, this acts like a wildcard. */ -extern __inline__ int +static __inline__ int nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) { return fl1->fl_pid == fl2->fl_pid diff --git a/include/linux/locks.h b/include/linux/locks.h index 1c3fa10b9270..ef48a874ab14 100644 --- a/include/linux/locks.h +++ b/include/linux/locks.h @@ -14,13 +14,13 @@ */ extern void __wait_on_buffer(struct buffer_head *); -extern inline void wait_on_buffer(struct buffer_head * bh) +static inline void wait_on_buffer(struct buffer_head * bh) { if (test_bit(BH_Lock, &bh->b_state)) __wait_on_buffer(bh); } -extern inline void lock_buffer(struct buffer_head * bh) +static inline void lock_buffer(struct buffer_head * bh) { while (test_and_set_bit(BH_Lock, &bh->b_state)) __wait_on_buffer(bh); @@ -34,12 +34,12 @@ extern void unlock_buffer(struct buffer_head *bh); * nfs may need it). */ -extern inline void lock_super(struct super_block * sb) +static inline void lock_super(struct super_block * sb) { down(&sb->s_lock); } -extern inline void unlock_super(struct super_block * sb) +static inline void unlock_super(struct super_block * sb) { up(&sb->s_lock); } diff --git a/include/linux/loop.h b/include/linux/loop.h index 983cb6a3d805..37eefbb13f9b 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h @@ -62,7 +62,7 @@ typedef int (* transfer_proc_t)(struct loop_device *, int cmd, char *raw_buf, char *loop_buf, int size, int real_block); -extern inline int lo_do_transfer(struct loop_device *lo, int cmd, char *rbuf, +static inline int lo_do_transfer(struct loop_device *lo, int cmd, char *rbuf, char *lbuf, int size, int rblock) { if (!lo->transfer) diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h index 938b43d77fa3..8b6dc4a8bf57 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h @@ -82,14 +82,14 @@ enum ip_conntrack_dir IP_CT_DIR_MAX }; -extern inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->src.ip == t2->src.ip && t1->src.u.all == t2->src.u.all; } -extern inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return t1->dst.ip == t2->dst.ip @@ -97,13 +97,13 @@ extern inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1, && t1->dst.protonum == t2->dst.protonum; } -extern inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, +static inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1, const struct ip_conntrack_tuple *t2) { return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2); } -extern inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, +static inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t, const struct ip_conntrack_tuple *tuple, const struct ip_conntrack_tuple *mask) { diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 66e1702ce955..88ecbad9dd6b 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h @@ -289,7 +289,7 @@ struct ipt_get_entries #define IPT_ERROR_TARGET "ERROR" /* Helper functions */ -extern __inline__ struct ipt_entry_target * +static __inline__ struct ipt_entry_target * ipt_get_target(struct ipt_entry *e) { return (void *)e + e->target_offset; diff --git a/include/linux/netfilter_ipv4/listhelp.h b/include/linux/netfilter_ipv4/listhelp.h index e64a0eeb8642..3f82ad2bdeb2 100644 --- a/include/linux/netfilter_ipv4/listhelp.h +++ b/include/linux/netfilter_ipv4/listhelp.h @@ -39,11 +39,11 @@ (type)__i; \ }) -extern inline int +static inline int __list_cmp_same(const void *p1, const void *p2) { return p1 == p2; } /* Is this entry in the list? */ -extern inline int +static inline int list_inlist(struct list_head *head, const void *entry) { return LIST_FIND(head, __list_cmp_same, void *, entry) != NULL; @@ -64,7 +64,7 @@ do { \ #endif /* Append. */ -extern inline void +static inline void list_append(struct list_head *head, void *new) { ASSERT_WRITE_LOCK(head); @@ -72,7 +72,7 @@ list_append(struct list_head *head, void *new) } /* Prepend. */ -extern inline void +static inline void list_prepend(struct list_head *head, void *new) { ASSERT_WRITE_LOCK(head); @@ -92,13 +92,13 @@ do { \ /* If the field after the list_head is a nul-terminated string, you can use these functions. */ -extern inline int __list_cmp_name(const void *i, const char *name) +static inline int __list_cmp_name(const void *i, const char *name) { return strcmp(name, i+sizeof(struct list_head)) == 0; } /* Returns false if same name already in list, otherwise does insert. */ -extern inline int +static inline int list_named_insert(struct list_head *head, void *new) { if (LIST_FIND(head, __list_cmp_name, void *, diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 0716ae947661..76fba12faa87 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h @@ -295,7 +295,7 @@ struct ip6t_get_entries #define IP6T_ERROR_TARGET "ERROR" /* Helper functions */ -extern __inline__ struct ip6t_entry_target * +static __inline__ struct ip6t_entry_target * ip6t_get_target(struct ip6t_entry *e) { return (void *)e + e->target_offset; diff --git a/include/linux/netlink.h b/include/linux/netlink.h index ce7f93b9e9d0..3bc55e03d1e3 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -127,7 +127,7 @@ struct netlink_callback long args[4]; }; -extern __inline__ struct nlmsghdr * +static __inline__ struct nlmsghdr * __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len) { struct nlmsghdr *nlh; diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 2149cff1db25..11ffdacdadf8 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -120,22 +120,22 @@ struct knfsd_fh { /* * Conversion macros for the filehandle fields. */ -extern inline __u32 kdev_t_to_u32(kdev_t dev) +static inline __u32 kdev_t_to_u32(kdev_t dev) { return (__u32) dev; } -extern inline kdev_t u32_to_kdev_t(__u32 udev) +static inline kdev_t u32_to_kdev_t(__u32 udev) { return (kdev_t) udev; } -extern inline __u32 ino_t_to_u32(ino_t ino) +static inline __u32 ino_t_to_u32(ino_t ino) { return (__u32) ino; } -extern inline ino_t u32_to_ino_t(__u32 uino) +static inline ino_t u32_to_ino_t(__u32 uino) { return (ino_t) uino; } diff --git a/include/linux/nubus.h b/include/linux/nubus.h index adf59d870aa7..0e0ef4f73d6d 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h @@ -314,7 +314,7 @@ void nubus_get_rsrc_str(void* dest, int maxlen); /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */ -extern inline void *nubus_slot_addr(int slot) +static inline void *nubus_slot_addr(int slot) { return (void *)(0xF0000000|(slot<<24)); } diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0febcc2a1899..47845c644dba 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -60,7 +60,7 @@ extern void page_cache_init(unsigned long); * For the time being it will work for struct address_space too (most of * them sitting inside the inodes). We might want to change it later. */ -extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigned long index) +static inline unsigned long _page_hashfn(struct address_space * mapping, unsigned long index) { #define i (((unsigned long) mapping)/(sizeof(struct inode) & ~ (sizeof(struct inode) - 1))) #define s(x) ((x)+((x)>>PAGE_HASH_BITS)) @@ -91,7 +91,7 @@ extern void add_to_page_cache_locked(struct page * page, struct address_space *m extern void ___wait_on_page(struct page *); -extern inline void wait_on_page(struct page * page) +static inline void wait_on_page(struct page * page) { if (PageLocked(page)) ___wait_on_page(page); diff --git a/include/linux/parport.h b/include/linux/parport.h index 8d148b6db6e9..f0659c771ff3 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -415,7 +415,7 @@ extern void parport_release(struct pardevice *dev); * timeslice is half a second, but it can be adjusted via the /proc * interface. **/ -extern __inline__ int parport_yield(struct pardevice *dev) +static __inline__ int parport_yield(struct pardevice *dev) { unsigned long int timeslip = (jiffies - dev->time); if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) @@ -433,7 +433,7 @@ extern __inline__ int parport_yield(struct pardevice *dev) * parport_claim_or_block(), and the return value is the same as for * parport_claim_or_block(). **/ -extern __inline__ int parport_yield_blocking(struct pardevice *dev) +static __inline__ int parport_yield_blocking(struct pardevice *dev) { unsigned long int timeslip = (jiffies - dev->time); if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) @@ -518,7 +518,7 @@ extern int parport_find_device (const char *mfg, const char *mdl, int from); extern int parport_find_class (parport_device_class cls, int from); /* Lowlevel drivers _can_ call this support function to handle irqs. */ -extern __inline__ void parport_generic_irq(int irq, struct parport *port, +static __inline__ void parport_generic_irq(int irq, struct parport *port, struct pt_regs *regs) { parport_ieee1284_interrupt (irq, port, regs); diff --git a/include/linux/parport_pc.h b/include/linux/parport_pc.h index 9e2f6468c63c..fb48227816b9 100644 --- a/include/linux/parport_pc.h +++ b/include/linux/parport_pc.h @@ -41,7 +41,7 @@ struct parport_pc_private { struct pci_dev *dev; }; -extern __inline__ void parport_pc_write_data(struct parport *p, unsigned char d) +static __inline__ void parport_pc_write_data(struct parport *p, unsigned char d) { #ifdef DEBUG_PARPORT printk (KERN_DEBUG "parport_pc_write_data(%p,0x%02x)\n", p, d); @@ -49,7 +49,7 @@ extern __inline__ void parport_pc_write_data(struct parport *p, unsigned char d) outb(d, DATA(p)); } -extern __inline__ unsigned char parport_pc_read_data(struct parport *p) +static __inline__ unsigned char parport_pc_read_data(struct parport *p) { unsigned char val = inb (DATA (p)); #ifdef DEBUG_PARPORT @@ -60,7 +60,7 @@ extern __inline__ unsigned char parport_pc_read_data(struct parport *p) } #ifdef DEBUG_PARPORT -extern __inline__ void dump_parport_state (char *str, struct parport *p) +static __inline__ void dump_parport_state (char *str, struct parport *p) { /* here's hoping that reading these ports won't side-effect anything underneath */ unsigned char ecr = inb (ECONTROL (p)); @@ -124,17 +124,17 @@ static __inline__ unsigned char __parport_pc_frob_control (struct parport *p, return ctr; } -extern __inline__ void parport_pc_data_reverse (struct parport *p) +static __inline__ void parport_pc_data_reverse (struct parport *p) { __parport_pc_frob_control (p, 0x20, 0x20); } -extern __inline__ void parport_pc_data_forward (struct parport *p) +static __inline__ void parport_pc_data_forward (struct parport *p) { __parport_pc_frob_control (p, 0x20, 0x00); } -extern __inline__ void parport_pc_write_control (struct parport *p, +static __inline__ void parport_pc_write_control (struct parport *p, unsigned char d) { const unsigned char wm = (PARPORT_CONTROL_STROBE | @@ -152,7 +152,7 @@ extern __inline__ void parport_pc_write_control (struct parport *p, __parport_pc_frob_control (p, wm, d & wm); } -extern __inline__ unsigned char parport_pc_read_control(struct parport *p) +static __inline__ unsigned char parport_pc_read_control(struct parport *p) { const unsigned char rm = (PARPORT_CONTROL_STROBE | PARPORT_CONTROL_AUTOFD | @@ -162,7 +162,7 @@ extern __inline__ unsigned char parport_pc_read_control(struct parport *p) return priv->ctr & rm; /* Use soft copy */ } -extern __inline__ unsigned char parport_pc_frob_control (struct parport *p, +static __inline__ unsigned char parport_pc_frob_control (struct parport *p, unsigned char mask, unsigned char val) { @@ -189,18 +189,18 @@ extern __inline__ unsigned char parport_pc_frob_control (struct parport *p, return __parport_pc_frob_control (p, mask, val); } -extern __inline__ unsigned char parport_pc_read_status(struct parport *p) +static __inline__ unsigned char parport_pc_read_status(struct parport *p) { return inb(STATUS(p)); } -extern __inline__ void parport_pc_disable_irq(struct parport *p) +static __inline__ void parport_pc_disable_irq(struct parport *p) { __parport_pc_frob_control (p, 0x10, 0x00); } -extern __inline__ void parport_pc_enable_irq(struct parport *p) +static __inline__ void parport_pc_enable_irq(struct parport *p) { __parport_pc_frob_control (p, 0x10, 0x10); } diff --git a/include/linux/pm.h b/include/linux/pm.h index 42d28f3cb793..8cefa88e6183 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -147,41 +147,41 @@ int pm_send_all(pm_request_t rqst, void *data); */ struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from); -extern inline void pm_access(struct pm_dev *dev) {} -extern inline void pm_dev_idle(struct pm_dev *dev) {} +static inline void pm_access(struct pm_dev *dev) {} +static inline void pm_dev_idle(struct pm_dev *dev) {} #else /* CONFIG_PM */ #define PM_IS_ACTIVE() 0 -extern inline struct pm_dev *pm_register(pm_dev_t type, +static inline struct pm_dev *pm_register(pm_dev_t type, unsigned long id, pm_callback callback) { return 0; } -extern inline void pm_unregister(struct pm_dev *dev) {} +static inline void pm_unregister(struct pm_dev *dev) {} -extern inline void pm_unregister_all(pm_callback callback) {} +static inline void pm_unregister_all(pm_callback callback) {} -extern inline int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data) +static inline int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data) { return 0; } -extern inline int pm_send_all(pm_request_t rqst, void *data) +static inline int pm_send_all(pm_request_t rqst, void *data) { return 0; } -extern inline struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from) +static inline struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from) { return 0; } -extern inline void pm_access(struct pm_dev *dev) {} -extern inline void pm_dev_idle(struct pm_dev *dev) {} +static inline void pm_access(struct pm_dev *dev) {} +static inline void pm_dev_idle(struct pm_dev *dev) {} #endif /* CONFIG_PM */ diff --git a/include/linux/poll.h b/include/linux/poll.h index 24138dbd2514..796aac51388a 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -19,7 +19,7 @@ typedef struct poll_table_struct { extern void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p); -extern inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) +static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) { if (p && wait_address) __pollwait(filp, wait_address, p); diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index dff8588a2bfe..308a21c004b6 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -35,13 +35,13 @@ extern int dquot_transfer(struct dentry *dentry, struct iattr *iattr); /* * Operations supported for diskquotas. */ -extern __inline__ void DQUOT_INIT(struct inode *inode) +static __inline__ void DQUOT_INIT(struct inode *inode) { if (inode->i_sb && inode->i_sb->dq_op) inode->i_sb->dq_op->initialize(inode, -1); } -extern __inline__ void DQUOT_DROP(struct inode *inode) +static __inline__ void DQUOT_DROP(struct inode *inode) { if (IS_QUOTAINIT(inode)) { if (inode->i_sb && inode->i_sb->dq_op) @@ -49,7 +49,7 @@ extern __inline__ void DQUOT_DROP(struct inode *inode) } } -extern __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr) +static __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr) { if (sb->dq_op) { if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize), 1) == NO_QUOTA) @@ -58,7 +58,7 @@ extern __inline__ int DQUOT_PREALLOC_BLOCK(struct super_block *sb, const struct return 0; } -extern __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr) +static __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct inode *inode, int nr) { if (sb->dq_op) { if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize), 0) == NO_QUOTA) @@ -67,7 +67,7 @@ extern __inline__ int DQUOT_ALLOC_BLOCK(struct super_block *sb, const struct ino return 0; } -extern __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *inode) +static __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *inode) { if (sb->dq_op) { sb->dq_op->initialize (inode, -1); @@ -78,19 +78,19 @@ extern __inline__ int DQUOT_ALLOC_INODE(struct super_block *sb, struct inode *in return 0; } -extern __inline__ void DQUOT_FREE_BLOCK(struct super_block *sb, const struct inode *inode, int nr) +static __inline__ void DQUOT_FREE_BLOCK(struct super_block *sb, const struct inode *inode, int nr) { if (sb->dq_op) sb->dq_op->free_block(inode, fs_to_dq_blocks(nr, sb->s_blocksize)); } -extern __inline__ void DQUOT_FREE_INODE(struct super_block *sb, struct inode *inode) +static __inline__ void DQUOT_FREE_INODE(struct super_block *sb, struct inode *inode) { if (sb->dq_op) sb->dq_op->free_inode(inode, 1); } -extern __inline__ int DQUOT_TRANSFER(struct dentry *dentry, struct iattr *iattr) +static __inline__ int DQUOT_TRANSFER(struct dentry *dentry, struct iattr *iattr) { int error = -EDQUOT; diff --git a/include/linux/raid/md_compatible.h b/include/linux/raid/md_compatible.h index 35e60bd1ab46..f693fcf58e02 100644 --- a/include/linux/raid/md_compatible.h +++ b/include/linux/raid/md_compatible.h @@ -29,7 +29,7 @@ #ifdef __i386__ /* 001 */ -extern __inline__ int md_cpu_has_mmx(void) +static __inline__ int md_cpu_has_mmx(void) { return test_bit(X86_FEATURE_MMX, &boot_cpu_data.x86_capability); } @@ -51,7 +51,7 @@ extern __inline__ int md_cpu_has_mmx(void) #define md_put_user put_user /* 007 */ -extern inline int md_capable_admin(void) +static inline int md_capable_admin(void) { return capable(CAP_SYS_ADMIN); } @@ -60,7 +60,7 @@ extern inline int md_capable_admin(void) #define MD_FILE_TO_INODE(file) ((file)->f_dentry->d_inode) /* 009 */ -extern inline void md_flush_signals (void) +static inline void md_flush_signals (void) { spin_lock(¤t->sigmask_lock); flush_signals(current); @@ -68,7 +68,7 @@ extern inline void md_flush_signals (void) } /* 010 */ -extern inline void md_init_signals (void) +static inline void md_init_signals (void) { current->exit_signal = SIGCHLD; siginitsetinv(¤t->blocked, sigmask(SIGKILL)); diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index f04b145825c4..8b6c3d7c0060 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -39,7 +39,7 @@ static inline int pers_to_level (int pers) return MD_RESERVED; } -extern inline int level_to_pers (int level) +static inline int level_to_pers (int level) { switch (level) { case -3: return HSM; diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 2bd224e60dd6..bcb9a1752d0c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -118,7 +118,7 @@ #define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" -extern inline int is_reiserfs_magic_string (struct reiserfs_super_block * rs) +static inline int is_reiserfs_magic_string (struct reiserfs_super_block * rs) { return (!strncmp (rs->s_magic, REISERFS_SUPER_MAGIC_STRING, strlen ( REISERFS_SUPER_MAGIC_STRING)) || @@ -434,7 +434,7 @@ struct item_head // // here are conversion routines // -extern inline int uniqueness2type (__u32 uniqueness) +static inline int uniqueness2type (__u32 uniqueness) { switch (uniqueness) { case V1_SD_UNIQUENESS: return TYPE_STAT_DATA; @@ -451,7 +451,7 @@ extern inline int uniqueness2type (__u32 uniqueness) return TYPE_ANY; } -extern inline __u32 type2uniqueness (int type) +static inline __u32 type2uniqueness (int type) { switch (type) { case TYPE_STAT_DATA: return V1_SD_UNIQUENESS; @@ -472,46 +472,46 @@ extern inline __u32 type2uniqueness (int type) // there is no way to get version of object from key, so, provide // version to these defines // -extern inline loff_t le_key_k_offset (int version, struct key * key) +static inline loff_t le_key_k_offset (int version, struct key * key) { return (version == ITEM_VERSION_1) ? key->u.k_offset_v1.k_offset : le64_to_cpu (key->u.k_offset_v2.k_offset); } -extern inline loff_t le_ih_k_offset (struct item_head * ih) +static inline loff_t le_ih_k_offset (struct item_head * ih) { return le_key_k_offset (ih_version (ih), &(ih->ih_key)); } -extern inline loff_t le_key_k_type (int version, struct key * key) +static inline loff_t le_key_k_type (int version, struct key * key) { return (version == ITEM_VERSION_1) ? uniqueness2type (key->u.k_offset_v1.k_uniqueness) : le16_to_cpu (key->u.k_offset_v2.k_type); } -extern inline loff_t le_ih_k_type (struct item_head * ih) +static inline loff_t le_ih_k_type (struct item_head * ih) { return le_key_k_type (ih_version (ih), &(ih->ih_key)); } -extern inline void set_le_key_k_offset (int version, struct key * key, loff_t offset) +static inline void set_le_key_k_offset (int version, struct key * key, loff_t offset) { (version == ITEM_VERSION_1) ? (key->u.k_offset_v1.k_offset = offset) : (key->u.k_offset_v2.k_offset = cpu_to_le64 (offset)); } -extern inline void set_le_ih_k_offset (struct item_head * ih, loff_t offset) +static inline void set_le_ih_k_offset (struct item_head * ih, loff_t offset) { set_le_key_k_offset (ih_version (ih), &(ih->ih_key), offset); } -extern inline void set_le_key_k_type (int version, struct key * key, int type) +static inline void set_le_key_k_type (int version, struct key * key, int type) { (version == ITEM_VERSION_1) ? (key->u.k_offset_v1.k_uniqueness = type2uniqueness (type)) : (key->u.k_offset_v2.k_type = cpu_to_le16 (type)); } -extern inline void set_le_ih_k_type (struct item_head * ih, int type) +static inline void set_le_ih_k_type (struct item_head * ih, int type) { set_le_key_k_type (ih_version (ih), &(ih->ih_key), type); } @@ -535,32 +535,32 @@ extern inline void set_le_ih_k_type (struct item_head * ih, int type) // // key is pointer to cpu key, result is cpu // -extern inline loff_t cpu_key_k_offset (struct cpu_key * key) +static inline loff_t cpu_key_k_offset (struct cpu_key * key) { return (key->version == ITEM_VERSION_1) ? key->on_disk_key.u.k_offset_v1.k_offset : key->on_disk_key.u.k_offset_v2.k_offset; } -extern inline loff_t cpu_key_k_type (struct cpu_key * key) +static inline loff_t cpu_key_k_type (struct cpu_key * key) { return (key->version == ITEM_VERSION_1) ? uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) : key->on_disk_key.u.k_offset_v2.k_type; } -extern inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) +static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) { (key->version == ITEM_VERSION_1) ? (key->on_disk_key.u.k_offset_v1.k_offset = offset) : (key->on_disk_key.u.k_offset_v2.k_offset = offset); } -extern inline void set_cpu_key_k_type (struct cpu_key * key, int type) +static inline void set_cpu_key_k_type (struct cpu_key * key, int type) { (key->version == ITEM_VERSION_1) ? (key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)) : (key->on_disk_key.u.k_offset_v2.k_type = type); } -extern inline void cpu_key_k_offset_dec (struct cpu_key * key) +static inline void cpu_key_k_offset_dec (struct cpu_key * key) { if (key->version == ITEM_VERSION_1) key->on_disk_key.u.k_offset_v1.k_offset --; @@ -828,7 +828,7 @@ struct reiserfs_de_head /* compose directory item containing "." and ".." entries (entries are not aligned to 4 byte boundary) */ -extern inline void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid, +static inline void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid, __u32 par_dirid, __u32 par_objid) { struct reiserfs_de_head * deh; @@ -859,7 +859,7 @@ extern inline void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid } /* compose directory item containing "." and ".." entries */ -extern inline void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, +static inline void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, __u32 par_dirid, __u32 par_objid) { struct reiserfs_de_head * deh; @@ -905,7 +905,7 @@ extern inline void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, #define I_DEH_N_ENTRY_LENGTH(ih,deh,i) \ ((i) ? (((deh)-1)->deh_location - (deh)->deh_location) : ((ih)->ih_item_len) - (deh)->deh_location) */ -extern inline int entry_length (struct buffer_head * bh, struct item_head * ih, +static inline int entry_length (struct buffer_head * bh, struct item_head * ih, int pos_in_item) { struct reiserfs_de_head * deh; @@ -1137,7 +1137,7 @@ struct path var = {ILLEGAL_PATH_ELEMENT_OFFSET, } // reiserfs version 2 has max offset 60 bits. Version 1 - 32 bit offset #define U32_MAX (~(__u32)0) -extern inline loff_t max_reiserfs_offset (struct inode * inode) +static inline loff_t max_reiserfs_offset (struct inode * inode) { if (inode_items_version (inode) == ITEM_VERSION_1) return (loff_t)U32_MAX; @@ -1673,7 +1673,7 @@ extern inline int comp_short_le_keys (struct key *, struct key *); // // get key version from on disk key - kludge // -extern inline int le_key_version (struct key * key) +static inline int le_key_version (struct key * key) { int type; @@ -1686,7 +1686,7 @@ extern inline int le_key_version (struct key * key) } -extern inline void copy_key (void * to, void * from) +static inline void copy_key (void * to, void * from) { memcpy (to, from, KEY_SIZE); } @@ -1963,7 +1963,7 @@ char *reiserfs_get_version_string(void) ; #ifdef __i386__ -extern __inline__ int +static __inline__ int find_first_nonzero_bit(void * addr, unsigned size) { int res; int __d0; @@ -1992,7 +1992,7 @@ find_first_nonzero_bit(void * addr, unsigned size) { #else /* __i386__ */ -extern __inline__ int find_next_nonzero_bit(void * addr, unsigned size, unsigned offset) +static __inline__ int find_next_nonzero_bit(void * addr, unsigned size, unsigned offset) { unsigned int * p = ((unsigned int *) addr) + (offset >> 5); unsigned int result = offset & ~31UL; @@ -2040,10 +2040,10 @@ found_middle: absolutely safe */ #define SPARE_SPACE 500 -extern inline unsigned long reiserfs_get_journal_block(struct super_block *s) { +static inline unsigned long reiserfs_get_journal_block(struct super_block *s) { return le32_to_cpu(SB_DISK_SUPER_BLOCK(s)->s_journal_block) ; } -extern inline unsigned long reiserfs_get_journal_orig_size(struct super_block *s) { +static inline unsigned long reiserfs_get_journal_orig_size(struct super_block *s) { return le32_to_cpu(SB_DISK_SUPER_BLOCK(s)->s_orig_journal_size) ; } diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 0c7cab0de05c..dd55198d9397 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -538,7 +538,7 @@ enum #include <linux/config.h> -extern __inline__ int rtattr_strcmp(struct rtattr *rta, char *str) +static __inline__ int rtattr_strcmp(struct rtattr *rta, char *str) { int len = strlen(str) + 1; return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 3f8d354bd0f8..37feb6f6ef53 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -130,7 +130,7 @@ int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags) } -extern __inline__ void +static __inline__ void rpc_set_timeout(struct rpc_clnt *clnt, unsigned int retr, unsigned long incr) { xprt_set_timeout(&clnt->cl_timeout, retr, incr); diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index e106bf92ce96..eee6756b842a 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -180,13 +180,13 @@ void rpciod_wake_up(void); void rpc_show_tasks(void); #endif -extern __inline__ void * +static __inline__ void * rpc_malloc(struct rpc_task *task, unsigned int size) { return rpc_allocate(task->tk_flags, size); } -extern __inline__ void +static __inline__ void rpc_exit(struct rpc_task *task, int status) { task->tk_status = status; @@ -194,7 +194,7 @@ rpc_exit(struct rpc_task *task, int status) } #ifdef RPC_DEBUG -extern __inline__ char * +static __inline__ char * rpc_qname(struct rpc_wait_queue *q) { return q->name? q->name : "unknown"; diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 24da571cb52d..13c7989d67d7 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h @@ -59,13 +59,13 @@ void svc_proc_zero(struct svc_program *); #else -extern inline void svc_proc_unregister(const char *p) {} -extern inline struct proc_dir_entry*svc_proc_register(struct svc_stat *s) +static inline void svc_proc_unregister(const char *p) {} +static inline struct proc_dir_entry*svc_proc_register(struct svc_stat *s) { return NULL; } -extern inline int svc_proc_read(char *a, char **b, off_t c, int d, int *e, void *f) +static inline int svc_proc_read(char *a, char **b, off_t c, int d, int *e, void *f) { return 0; } diff --git a/include/linux/sunrpc/types.h b/include/linux/sunrpc/types.h index 467445e06db9..232ac45c725e 100644 --- a/include/linux/sunrpc/types.h +++ b/include/linux/sunrpc/types.h @@ -21,7 +21,7 @@ struct rpc_listitem { struct rpc_listitem * next; }; -extern __inline__ void +static __inline__ void __rpc_append_list(struct rpc_listitem **q, struct rpc_listitem *item) { struct rpc_listitem *next, *prev; @@ -37,14 +37,14 @@ __rpc_append_list(struct rpc_listitem **q, struct rpc_listitem *item) } } -extern __inline__ void +static __inline__ void __rpc_insert_list(struct rpc_listitem **q, struct rpc_listitem *item) { __rpc_append_list(q, item); *q = item; } -extern __inline__ void +static __inline__ void __rpc_remove_list(struct rpc_listitem **q, struct rpc_listitem *item) { struct rpc_listitem *prev = item->prev, diff --git a/include/linux/swap.h b/include/linux/swap.h index 3f4a3c3c3356..26aa7d757d52 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -121,10 +121,16 @@ extern wait_queue_head_t kswapd_wait; extern wait_queue_head_t kreclaimd_wait; extern int page_launder(int, int); extern int free_shortage(void); +extern int total_free_shortage(void); extern int inactive_shortage(void); +extern int total_inactive_shortage(void); extern void wakeup_kswapd(void); extern int try_to_free_pages(unsigned int gfp_mask); +extern unsigned int zone_free_shortage(zone_t *zone); +extern unsigned int zone_inactive_shortage(zone_t *zone); +extern unsigned int zone_inactive_plenty(zone_t *zone); + /* linux/mm/page_io.c */ extern void rw_swap_page(int, struct page *); extern void rw_swap_page_nolock(int, swp_entry_t, char *); diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h index 00d314fb918e..b88f13aff2a6 100644 --- a/include/linux/sysv_fs.h +++ b/include/linux/sysv_fs.h @@ -271,14 +271,14 @@ struct sysv_inode { */ #define COH_KLUDGE_SYMLINK_MODE (S_IFREG | S_ISVTX) #define COH_KLUDGE_NOT_SYMLINK (S_IFREG | S_ISVTX | S_IRUSR) /* force read access */ -extern inline mode_t from_coh_imode(unsigned short mode) +static inline mode_t from_coh_imode(unsigned short mode) { if (mode == COH_KLUDGE_SYMLINK_MODE) return (S_IFLNK | 0777); else return mode; } -extern inline unsigned short to_coh_imode(mode_t mode) +static inline unsigned short to_coh_imode(mode_t mode) { if (S_ISLNK(mode)) return COH_KLUDGE_SYMLINK_MODE; diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 948e54550d95..51a74dff1541 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -4,7 +4,7 @@ #ifdef INCLUDE_INLINE_FUNCS #define _INLINE_ extern #else -#define _INLINE_ extern __inline__ +#define _INLINE_ static __inline__ #endif _INLINE_ void tty_insert_flip_char(struct tty_struct *tty, diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 6dbe38adfa92..007639810d75 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -376,6 +376,7 @@ struct video_code #define VID_HARDWARE_SE401 30 /* SE401 USB webcams */ #define VID_HARDWARE_PWC 31 /* Philips webcams */ #define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */ +#define VID_HARDWARE_CPIA2 33 /* * Initialiser list |
