From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbaGVAr3 (ORCPT ); Mon, 21 Jul 2014 20:47:29 -0400 Received: from mail-ig0-f180.google.com ([209.85.213.180]:64036 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbaGVAr2 (ORCPT ); Mon, 21 Jul 2014 20:47:28 -0400 Date: Mon, 21 Jul 2014 17:47:25 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Bart Van Assche cc: Ingo Molnar , Peter Zijlstra , "David S. Miller" , linux-kernel Subject: Re: [PATCH] spin_lock_*(): Always evaluate second argument In-Reply-To: <539ED993.80807@acm.org> Message-ID: References: <539ED993.80807@acm.org> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Jun 2014, Bart Van Assche wrote: > Evaluating a macro argument only if certain configuration options > have been selected is confusing and error-prone. Hence always > evaluate the second argument of spin_lock_nested() and > spin_lock_nest_lock(). > > This patch has the intentional side effect that it avoids that the > following warning is reported for netif_addr_lock_nested() when > building with CONFIG_DEBUG_LOCK_ALLOC=n and with W=1: > > include/linux/netdevice.h: In function 'netif_addr_lock_nested': > include/linux/netdevice.h:2865:6: warning: variable 'subclass' set but not used [-Wunused-but-set-variable] > int subclass = SINGLE_DEPTH_NESTING; > ^ > > Signed-off-by: Bart Van Assche > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: David S. Miller Bart, could you please resend this patch with my acked-by?