lkml.org 
[lkml]   [2014]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH RT 2/2] rtmutex: Remove duplicate rt_mutex_init()
* Steven Rostedt | 2014-04-08 22:47:02 [-0400]:

>From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
>
>The rt_mutex_init() macro is the same whether or not
>CONFIG_DEBUG_RT_MUTEX is set. Remove the duplicate.
>
>Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

This does not apply cleanly on v3.14-rt

>--- a/include/linux/rtmutex.h
>+++ b/include/linux/rtmutex.h
>@@ -62,25 +62,19 @@ struct hrtimer_sleeper;
> # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
> , .name = #mutexname, .file = __FILE__, .line = __LINE__
>
>-# define rt_mutex_init(mutex) \
>- do { \
>- raw_spin_lock_init(&(mutex)->wait_lock); \
>- __rt_mutex_init(mutex, #mutex); \
>- } while (0)
>-

The macro is the same in CONFIG_DEBUG_RT_MUTEXES and the else path.
Shouldn't you remove both and define it before the ifdef? There are some
users of this:
|drivers/i2c/i2c-core.c: rt_mutex_init(&adap->bus_lock);
|drivers/media/usb/em28xx/em28xx-cards.c: rt_mutex_init(&dev->i2c_bus_lock);

Sebastian


\
 
 \ /
  Last update: 2014-05-02 11:41    [W:0.108 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site