From: dhowells@redhat.com
To: torvalds@osdl.org, akpm@osdl.org, davidm@snapgear.com
Cc: linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org
Subject: [PATCH 13/14] FRV: Convert extern inline -> static inline
Date: Mon, 1 Nov 2004 19:30:22 GMT [thread overview]
Message-ID: <200411011930.iA1JUM1S023248@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <76b4a884-2c3c-11d9-91a1-0002b3163499@redhat.com>
The attached patch converts a bunch of extern inline functions to be static
inline to permit the kernel to be compiled with -O0 for easier debugging.
Signed-Off-By: dhowells@redhat.com
---
diffstat frv-inline-2610rc1bk10.diff
bio.h | 8 ++++----
blkdev.h | 2 +-
byteorder/generic.h | 2 +-
quotaops.h | 36 ++++++++++++++++++------------------
sysrq.h | 4 ++--
5 files changed, 26 insertions(+), 26 deletions(-)
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/bio.h linux-2.6.10-rc1-bk10-frv/include/linux/bio.h
--- /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/bio.h 2004-10-19 10:42:16.000000000 +0100
+++ linux-2.6.10-rc1-bk10-frv/include/linux/bio.h 2004-11-01 11:47:05.089638733 +0000
@@ -280,9 +280,9 @@
* bvec_kmap_irq and bvec_kunmap_irq!!
*
* This function MUST be inlined - it plays with the CPU interrupt flags.
- * Hence the `extern inline'.
+ * Hence the `static inline'.
*/
-extern inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
+static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
{
unsigned long addr;
@@ -298,7 +298,7 @@
return (char *) addr + bvec->bv_offset;
}
-extern inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
+static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
{
unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
@@ -311,7 +311,7 @@
#define bvec_kunmap_irq(buf, flags) do { *(flags) = 0; } while (0)
#endif
-extern inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
+static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
unsigned long *flags)
{
return bvec_kmap_irq(bio_iovec_idx(bio, idx), flags);
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/blkdev.h linux-2.6.10-rc1-bk10-frv/include/linux/blkdev.h
--- /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/blkdev.h 2004-11-01 11:45:33.000000000 +0000
+++ linux-2.6.10-rc1-bk10-frv/include/linux/blkdev.h 2004-11-01 11:47:05.097638067 +0000
@@ -685,7 +685,7 @@
return bits;
}
-extern inline unsigned int block_size(struct block_device *bdev)
+static inline unsigned int block_size(struct block_device *bdev)
{
return bdev->bd_block_size;
}
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/byteorder/generic.h linux-2.6.10-rc1-bk10-frv/include/linux/byteorder/generic.h
--- /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/byteorder/generic.h 2004-10-19 10:42:16.000000000 +0100
+++ linux-2.6.10-rc1-bk10-frv/include/linux/byteorder/generic.h 2004-11-01 11:47:05.099637901 +0000
@@ -152,7 +152,7 @@
extern __u16 ntohs(__be16);
extern __be16 htons(__u16);
-#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__)
+#if defined(__GNUC__) && (__GNUC__ >= 2) // && defined(__OPTIMIZE__)
#define ___htonl(x) __cpu_to_be32(x)
#define ___htons(x) __cpu_to_be16(x)
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/quotaops.h linux-2.6.10-rc1-bk10-frv/include/linux/quotaops.h
--- /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/quotaops.h 2004-09-16 12:06:22.000000000 +0100
+++ linux-2.6.10-rc1-bk10-frv/include/linux/quotaops.h 2004-11-01 11:47:05.127635570 +0000
@@ -59,7 +59,7 @@
/* It is better to call this function outside of any transaction as it might
* need a lot of space in journal for dquot structure allocation. */
-static __inline__ void DQUOT_INIT(struct inode *inode)
+static inline void DQUOT_INIT(struct inode *inode)
{
BUG_ON(!inode->i_sb);
if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode))
@@ -67,7 +67,7 @@
}
/* The same as with DQUOT_INIT */
-static __inline__ void DQUOT_DROP(struct inode *inode)
+static inline void DQUOT_DROP(struct inode *inode)
{
/* Here we can get arbitrary inode from clear_inode() so we have
* to be careful. OTOH we don't need locking as quota operations
@@ -90,7 +90,7 @@
/* The following allocation/freeing/transfer functions *must* be called inside
* a transaction (deadlocks possible otherwise) */
-static __inline__ int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
if (sb_any_quota_enabled(inode->i_sb)) {
/* Used space is updated in alloc_space() */
@@ -102,7 +102,7 @@
return 0;
}
-static __inline__ int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
{
int ret;
if (!(ret = DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr)))
@@ -110,7 +110,7 @@
return ret;
}
-static __inline__ int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
if (sb_any_quota_enabled(inode->i_sb)) {
/* Used space is updated in alloc_space() */
@@ -122,7 +122,7 @@
return 0;
}
-static __inline__ int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
{
int ret;
if (!(ret = DQUOT_ALLOC_SPACE_NODIRTY(inode, nr)))
@@ -130,7 +130,7 @@
return ret;
}
-static __inline__ int DQUOT_ALLOC_INODE(struct inode *inode)
+static inline int DQUOT_ALLOC_INODE(struct inode *inode)
{
if (sb_any_quota_enabled(inode->i_sb)) {
DQUOT_INIT(inode);
@@ -140,7 +140,7 @@
return 0;
}
-static __inline__ void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
if (sb_any_quota_enabled(inode->i_sb))
inode->i_sb->dq_op->free_space(inode, nr);
@@ -148,19 +148,19 @@
inode_sub_bytes(inode, nr);
}
-static __inline__ void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_FREE_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
}
-static __inline__ void DQUOT_FREE_INODE(struct inode *inode)
+static inline void DQUOT_FREE_INODE(struct inode *inode)
{
if (sb_any_quota_enabled(inode->i_sb))
inode->i_sb->dq_op->free_inode(inode, 1);
}
-static __inline__ int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr)
+static inline int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr)
{
if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) {
DQUOT_INIT(inode);
@@ -173,7 +173,7 @@
/* The following two functions cannot be called inside a transaction */
#define DQUOT_SYNC(sb) sync_dquots(sb, -1)
-static __inline__ int DQUOT_OFF(struct super_block *sb)
+static inline int DQUOT_OFF(struct super_block *sb)
{
int ret = -ENOSYS;
@@ -197,38 +197,38 @@
#define DQUOT_SYNC(sb) do { } while(0)
#define DQUOT_OFF(sb) do { } while(0)
#define DQUOT_TRANSFER(inode, iattr) (0)
-extern __inline__ int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
inode_add_bytes(inode, nr);
return 0;
}
-extern __inline__ int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
return 0;
}
-extern __inline__ int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
inode_add_bytes(inode, nr);
return 0;
}
-extern __inline__ int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
+static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_ALLOC_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
return 0;
}
-extern __inline__ void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr)
{
inode_sub_bytes(inode, nr);
}
-extern __inline__ void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
+static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr)
{
DQUOT_FREE_SPACE_NODIRTY(inode, nr);
mark_inode_dirty(inode);
diff -uNr /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/sysrq.h linux-2.6.10-rc1-bk10-frv/include/linux/sysrq.h
--- /warthog/kernels/linux-2.6.10-rc1-bk10/include/linux/sysrq.h 2004-06-18 13:44:05.000000000 +0100
+++ linux-2.6.10-rc1-bk10-frv/include/linux/sysrq.h 2004-11-01 11:47:05.133635071 +0000
@@ -41,7 +41,7 @@
struct sysrq_key_op *__sysrq_get_key_op (int key);
void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p);
-extern __inline__ int
+static inline int
__sysrq_swap_key_ops_nolock(int key, struct sysrq_key_op *insert_op_p,
struct sysrq_key_op *remove_op_p)
{
@@ -55,7 +55,7 @@
return retval;
}
-extern __inline__ int
+static inline int
__sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
struct sysrq_key_op *remove_op_p) {
int retval;
next prev parent reply other threads:[~2004-11-01 19:38 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <76b4a884-2c3c-11d9-91a1-0002b3163499@redhat.com>
2004-11-01 19:30 ` [PATCH 4/14] FRV: Bitops fixes dhowells
2004-11-02 8:19 ` Andrew Morton
2004-11-01 19:30 ` [PATCH 3/14] FRV: Fujitsu FR-V arch documentation dhowells
2004-11-01 19:30 ` [PATCH 5/14] FRV: Fork fixes dhowells
2004-11-01 19:30 ` [PATCH 8/14] FRV: GP-REL data support dhowells
2004-11-02 8:18 ` Andrew Morton
2004-11-02 9:48 ` Christoph Hellwig
2004-11-02 16:34 ` David Howells
2004-11-03 10:42 ` Christoph Hellwig
2004-11-01 19:30 ` [PATCH 11/14] FRV: Add FDPIC ELF binary format driver dhowells
2004-11-02 8:18 ` Andrew Morton
2004-11-02 11:07 ` Andrew Morton
2004-11-02 16:47 ` David Howells
2004-11-02 17:23 ` Andi Kleen
2004-11-01 19:30 ` [PATCH 10/14] FRV: Make calibrate_delay() optional dhowells
2004-11-02 0:06 ` john stultz
2004-11-02 8:17 ` Andrew Morton
2004-11-02 9:36 ` Christoph Hellwig
2004-11-02 11:01 ` David Howells
2004-11-02 16:29 ` David Howells
2004-11-03 10:40 ` Christoph Hellwig
2004-11-01 19:30 ` [PATCH 9/14] FRV: CONFIG_MMU fixes dhowells
2004-11-02 9:43 ` Christoph Hellwig
2004-11-03 15:06 ` David Howells
2004-11-03 15:13 ` Christoph Hellwig
2004-11-03 15:30 ` David Howells
2004-11-01 19:30 ` [PATCH 7/14] FRV: GDB stub dependent additional BUG()'s dhowells
2004-11-02 9:34 ` Christoph Hellwig
2004-11-02 16:09 ` David Howells
2004-11-03 10:39 ` Christoph Hellwig
2004-11-03 13:41 ` David Howells
2004-11-01 19:30 ` [PATCH 6/14] FRV: IDE fixes dhowells
2004-11-01 22:53 ` Alan Cox
2004-11-02 0:13 ` Bartlomiej Zolnierkiewicz
2004-11-02 10:57 ` David Howells
2004-11-01 19:30 ` dhowells [this message]
2004-11-01 19:30 ` [PATCH 12/14] FRV: Generate more useful debug info dhowells
2004-11-02 0:29 ` Andrew Morton
2004-11-02 11:21 ` David Howells
2004-11-03 1:48 ` Linus Torvalds
2004-11-03 1:52 ` Linus Torvalds
2004-11-03 20:40 ` Florian Weimer
2004-11-03 20:42 ` Linus Torvalds
2004-11-03 13:38 ` David Howells
2004-11-03 15:32 ` Linus Torvalds
2004-11-12 14:57 ` Daniel Jacobowitz
2004-11-12 15:15 ` David Howells
2004-11-12 15:20 ` Daniel Jacobowitz
[not found] ` <20040401020550.GG3150@beast>
2004-11-01 19:30 ` [PATCH 14/14] FRV: Better mmap support in uClinux dhowells
2004-11-02 9:54 ` Christoph Hellwig
2004-11-02 16:43 ` David Howells
2004-11-03 10:45 ` Christoph Hellwig
2004-11-08 14:34 ` [PATCH 17/20] " dhowells
2004-11-09 12:57 ` Christoph Hellwig
2004-11-09 13:55 ` David Howells
2004-11-09 14:02 ` Christoph Hellwig
2004-11-19 5:29 ` Matt Mackall
2004-11-19 16:26 ` David Howells
2004-11-19 16:56 ` Matt Mackall
2004-11-19 17:06 ` David Howells
2004-11-19 17:42 ` Linus Torvalds
2004-11-02 0:21 ` [PATCH 1/14] FRV: Fujitsu FR-V CPU arch implementation Andrew Morton
2004-11-02 23:46 ` [uClinux-dev] " Christoph Hellwig
[not found] ` <200411011930.iA1JUKFH023161@warthog.cambridge.redhat.com>
2004-11-02 23:24 ` [uClinux-dev] [PATCH 2/14] FRV: Fujitsu FR-V arch include files Christoph Hellwig
2004-11-03 17:26 ` David Howells
2004-11-03 19:46 ` [uClinux-dev] [PATCH 1/14] FRV: Fujitsu FR-V CPU arch implementation David Howells
2004-11-03 20:32 ` Christoph Hellwig
2004-11-04 11:54 ` David Howells
2004-11-08 14:34 [PATCH 1/20] FRV: Fujitsu FR-V CPU arch maintainer record dhowells
2004-11-08 14:34 ` [PATCH 2/20] FRV: Fujitsu FR-V arch documentation dhowells
2004-11-08 14:34 ` [PATCH 6/20] FRV: Fujitsu FR-V CPU arch implementation part 4 dhowells
2004-11-08 14:34 ` [PATCH 4/20] FRV: Fujitsu FR-V CPU arch implementation part 2 dhowells
2004-11-08 14:34 ` [PATCH 5/20] FRV: Fujitsu FR-V CPU arch implementation part 3 dhowells
2004-11-08 14:34 ` [PATCH 7/20] FRV: Fujitsu FR-V CPU arch implementation part 5 dhowells
2004-11-09 15:09 ` Geert Uytterhoeven
2004-11-08 14:34 ` [PATCH 3/20] FRV: Fujitsu FR-V CPU arch implementation part 1 dhowells
2004-11-08 14:34 ` [PATCH 8/20] FRV: Fujitsu FR-V CPU arch implementation part 6 dhowells
2004-11-08 14:34 ` [PATCH 9/20] FRV: Fujitsu FR-V CPU arch implementation part 7 dhowells
2004-11-08 14:34 ` [PATCH 11/20] FRV: Fujitsu FR-V CPU arch implementation part 9 dhowells
2004-11-08 14:34 ` [PATCH 10/20] FRV: Fujitsu FR-V CPU arch implementation part 8 dhowells
2004-11-08 14:34 ` [PATCH 15/20] FRV: Fujitsu FR-V arch include files dhowells
2004-11-08 14:34 ` [PATCH 16/20] FRV: Make calibrate_delay() optional dhowells
2004-11-08 14:34 ` [PATCH 14/20] FRV: Fujitsu FR-V arch include files dhowells
2004-11-08 14:34 ` [PATCH 13/20] " dhowells
2004-11-08 14:34 ` [PATCH 18/20] FRV: procfs changes for nommu changes dhowells
2004-11-08 14:34 ` [PATCH 20/20] FRV: Add FDPIC ELF binary format driver dhowells
2004-11-08 14:34 ` [PATCH 19/20] FRV: change setup_arg_pages() to take stack pointer dhowells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411011930.iA1JUM1S023248@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=davidm@snapgear.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=uclinux-dev@uclinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).