mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erlend Aasland <erlend-a@ux.his.no>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] __inline__ to inline in list.h
Date: Mon, 1 Sep 2003 14:22:13 +0200	[thread overview]
Message-ID: <20030901122213.GA462@johanna5.ux.his.no> (raw)
In-Reply-To: <20030901104221.GA15886@gaz.sfgoth.com>

Hi,

On 09/01/03 03:42, Mitchell Blank Jr wrote:
> -static __inline__ int hlist_unhashed(struct hlist_node *h) 
> +static __inline__ int hlist_unhashed(const struct hlist_node *h) 

Is there any reason for not converting __inline__ to inline?
If there's not, then just convert them:

diff -urN linux-2.6.0-test4/include/linux/list.h linux-2.6.0-test4-dirty/include/linux/list.h
--- linux-2.6.0-test4/include/linux/list.h	2003-08-23 01:56:34.000000000 +0200
+++ linux-2.6.0-test4-dirty/include/linux/list.h	2003-09-01 12:51:38.000000000 +0200
@@ -86,7 +86,7 @@
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static __inline__ void __list_add_rcu(struct list_head * new,
+static inline void __list_add_rcu(struct list_head * new,
 	struct list_head * prev,
 	struct list_head * next)
 {
@@ -105,7 +105,7 @@
  * Insert a new entry after the specified head.
  * This is good for implementing stacks.
  */
-static __inline__ void list_add_rcu(struct list_head *new, struct list_head *head)
+static inline void list_add_rcu(struct list_head *new, struct list_head *head)
 {
 	__list_add_rcu(new, head, head->next);
 }
@@ -118,7 +118,7 @@
  * Insert a new entry before the specified head.
  * This is useful for implementing queues.
  */
-static __inline__ void list_add_tail_rcu(struct list_head *new, struct list_head *head)
+static inline void list_add_tail_rcu(struct list_head *new, struct list_head *head)
 {
 	__list_add_rcu(new, head->prev, head);
 }
@@ -408,17 +408,17 @@
 #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) 
 #define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)
 
-static __inline__ int hlist_unhashed(struct hlist_node *h) 
+static inline int hlist_unhashed(struct hlist_node *h) 
 { 
 	return !h->pprev;
 } 
 
-static __inline__ int hlist_empty(struct hlist_head *h) 
+static inline int hlist_empty(struct hlist_head *h) 
 { 
 	return !h->first;
 } 
 
-static __inline__ void __hlist_del(struct hlist_node *n) 
+static inline void __hlist_del(struct hlist_node *n) 
 {
 	struct hlist_node *next = n->next;
 	struct hlist_node **pprev = n->pprev;
@@ -427,7 +427,7 @@
 		next->pprev = pprev;
 }  
 
-static __inline__ void hlist_del(struct hlist_node *n)
+static inline void hlist_del(struct hlist_node *n)
 {
 	__hlist_del(n);
 	n->next = LIST_POISON1;
@@ -451,7 +451,7 @@
 	n->pprev = LIST_POISON2;
 }
 
-static __inline__ void hlist_del_init(struct hlist_node *n) 
+static inline void hlist_del_init(struct hlist_node *n) 
 {
 	if (n->pprev)  {
 		__hlist_del(n);
@@ -461,7 +461,7 @@
 
 #define hlist_del_rcu_init hlist_del_init
 
-static __inline__ void hlist_add_head(struct hlist_node *n, struct hlist_head *h) 
+static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) 
 { 
 	struct hlist_node *first = h->first;
 	n->next = first; 
@@ -471,7 +471,7 @@
 	n->pprev = &h->first; 
 } 
 
-static __inline__ void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h) 
+static inline void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h) 
 { 
 	struct hlist_node *first = h->first;
 	n->next = first;
@@ -483,7 +483,7 @@
 } 
 
 /* next must be != NULL */
-static __inline__ void hlist_add_before(struct hlist_node *n, struct hlist_node *next)
+static inline void hlist_add_before(struct hlist_node *n, struct hlist_node *next)
 {
 	n->pprev = next->pprev;
 	n->next = next; 
@@ -491,7 +491,7 @@
 	*(n->pprev) = n;
 }
 
-static __inline__ void hlist_add_after(struct hlist_node *n,
+static inline void hlist_add_after(struct hlist_node *n,
 				       struct hlist_node *next)
 {
 	next->next	= n->next;

      reply	other threads:[~2003-09-01 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-01 10:42 [PATCH] simple const-ification for list.h Mitchell Blank Jr
2003-09-01 12:22 ` Erlend Aasland [this message]

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=20030901122213.GA462@johanna5.ux.his.no \
    --to=erlend-a@ux.his.no \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®