public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Sven-Thorsten Dietrich <sdietrich@mvista.com>
Cc: dwalker@mvista.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch] IPV4 spinlock_casting
Date: Mon, 8 Aug 2005 11:06:59 +0200	[thread overview]
Message-ID: <20050808090659.GA11879@elte.hu> (raw)
In-Reply-To: <20050808090457.GA11771@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> > Fix a compile error in net/ipv4/route.c when RT patch is applied:
> 
> > Index: linux-2.6.13-rc4-RT-V0.7.52-14/net/ipv4/route.c
> 
> are you sure you are seeing this with the -52-14 patch? If yes then 
> please send me your .config.
> 
> the build error showed a more fundamental bug, which had to be solved 
> differently. The problem was the code in route.c, the problem was this:
> 
>  # define rt_hash_lock_addr(slot) NULL
>  # define rt_hash_lock_init()
> 
> where NULL has no type. The solution for the build problem would have 
> been to cast the NULL to spinlock_t *, but we need this spinlock so 
> the correct solution was to add a || defined(PREEMPT_RT) to the #if 
> defined(CONFIG_SMP) line above. Solving the build problem alone only 
> fixes the symptom, not the bug.

it just occured to me that !PREEMPT_RT builds would be affected by the
#else branch, so i committed the build fix below into -52-15.

	Ingo

Index: linux/net/ipv4/route.c
===================================================================
--- linux.orig/net/ipv4/route.c
+++ linux/net/ipv4/route.c
@@ -231,7 +231,7 @@ static spinlock_t	*rt_hash_locks;
 			spin_lock_init(&rt_hash_locks[i]); \
 		}
 #else
-# define rt_hash_lock_addr(slot) NULL
+# define rt_hash_lock_addr(slot) ((spinlock_t *)NULL)
 # define rt_hash_lock_init()
 #endif
 

  reply	other threads:[~2005-08-08  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-08  2:04 [patch] IPV4 spinlock_casting Sven-Thorsten Dietrich
2005-08-08  9:04 ` Ingo Molnar
2005-08-08  9:06   ` Ingo Molnar [this message]
2005-08-08 19:54     ` Sven-Thorsten Dietrich

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=20050808090659.GA11879@elte.hu \
    --to=mingo@elte.hu \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdietrich@mvista.com \
    /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