From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757212AbcLALrZ (ORCPT ); Thu, 1 Dec 2016 06:47:25 -0500 Received: from mail-wj0-f196.google.com ([209.85.210.196]:33420 "EHLO mail-wj0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406AbcLALrW (ORCPT ); Thu, 1 Dec 2016 06:47:22 -0500 From: Chris Wilson To: linux-kernel@vger.kernel.org Cc: Chris Wilson , Maarten Lankhorst , Peter Zijlstra , Ingo Molnar Subject: [PATCH v2 1/8] locking: Fix compilation of __WW_MUTEX_INITIALIZER Date: Thu, 1 Dec 2016 11:47:04 +0000 Message-Id: <20161201114711.28697-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161201114711.28697-1-chris@chris-wilson.co.uk> References: <20161201114711.28697-1-chris@chris-wilson.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>From conflicting macro parameters, passing the wrong name to __MUTEX_INITIALIZER and a stray '\', #define __WW_MUTEX_INITIALIZER was very unhappy. One unnecessary change was to choose to pass &ww_class instead of implicitly taking the address of the class within the macro. Fixes: 1b375dc30710 ("mutex: Move ww_mutex definitions to ww_mutex.h") Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Peter Zijlstra Cc: Ingo Molnar --- include/linux/ww_mutex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/ww_mutex.h b/include/linux/ww_mutex.h index 2bb5deb0012e..941df8c8b90e 100644 --- a/include/linux/ww_mutex.h +++ b/include/linux/ww_mutex.h @@ -51,10 +51,10 @@ struct ww_mutex { }; #ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __WW_CLASS_MUTEX_INITIALIZER(lockname, ww_class) \ - , .ww_class = &ww_class +# define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) \ + , .ww_class = class #else -# define __WW_CLASS_MUTEX_INITIALIZER(lockname, ww_class) +# define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) #endif #define __WW_CLASS_INITIALIZER(ww_class) \ @@ -63,7 +63,7 @@ struct ww_mutex { , .mutex_name = #ww_class "_mutex" } #define __WW_MUTEX_INITIALIZER(lockname, class) \ - { .base = { \__MUTEX_INITIALIZER(lockname) } \ + { .base = __MUTEX_INITIALIZER(lockname.base) \ __WW_CLASS_MUTEX_INITIALIZER(lockname, class) } #define DEFINE_WW_CLASS(classname) \ -- 2.10.2