Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1203927ybh; Sun, 19 Jul 2020 11:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvhAaagVHOJ5Yv4/emZQsHs3GvLvbbROBSuv+hRXz6CexEnnBbkZPCNc6WuxiDgbZKe4Xo X-Received: by 2002:a50:e801:: with SMTP id e1mr18009295edn.251.1595184288788; Sun, 19 Jul 2020 11:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595184288; cv=none; d=google.com; s=arc-20160816; b=iQNyWVNA92PKIqK8YaQGiFwSz9KvV3SkXhWk8BDYaJ+uhxtQt3pKshSVhOxivIVuIe FdyizfNJO68WjoMdPccC5lo6Iz/nC0vea95x66xygziZLAaGY4CiN8QRJjDM8ttTmvVN 50IJdquMysCLta2Hl7rZE4mrJdYCBMnhPbAfdFw2Tel6uo5t3vRrjmygg2vyLGhczT6P OnPAF7jGP6xa8H/oifABS1Kioi+CLk1cIGZyod+3npWxupJMP1772eBCOuXpCi+SAhXX HNr3nau/4Op/jPr/TbdEPdXxkVRE7S5i28tUXdQ4bs42PXSqIjtrdb1+VmT2+RWj8YFC ttcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=k1uu7h853oLJDMlQzBr/6NPIRnPNmDjQKy86O9f7Lkw=; b=c8+2/BKMs9CVXzbDmLJJOxByf5dd80vvxs5pSDQtZwZCOfUFSBccQeiup2sUIhthsW 0vqZt9XsSpFcrAQ0j/vE/uYOWInYgOJmqqzrqzdaLdcHGbd0ZXosJxaDoO5VSRoP4xJz LpesccW7ds6PVDbi7rMAoz8K579lCuwgO3jOW30o31c9/DumABTMMtfQwYmGBh1/IwbZ IT86gQfhyBdsswbftgWo1i4HsBZUyfTP26VNxKCPTzJMTwWKJsurh5KJikRQMuAyRuZO Vo2yqi3GJs+DDCcCJfKQE7ywWvtwi3awQkpRhIVvGAYANU+9hRTQKlPmP7bhsiNZQdf9 Hs7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kQFGfsk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k19si8649193eji.419.2020.07.19.11.44.24; Sun, 19 Jul 2020 11:44:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kQFGfsk5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726085AbgGSSmO (ORCPT + 99 others); Sun, 19 Jul 2020 14:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:50244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbgGSSmN (ORCPT ); Sun, 19 Jul 2020 14:42:13 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-111-31.bvtn.or.frontiernet.net [50.39.111.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 443C1208DB; Sun, 19 Jul 2020 18:42:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595184133; bh=8Jhex8q677bAeQY5l1CdHaRAfACyJJQuxKDmrWhsjaI=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kQFGfsk55Rjwx7U+98D9FPL+JWQo4LM6PaZM9mDKZjlCGvzfNJaqB4k9js/nKVISu Gi4BUS78knKjkztq3L/i7H9wzhC7VWmEtySmkAdQ8s+MyveAehFYxHnOHXCtHXBC3A XxcChNjM1QIME/OVwGIfN4x/bcxPAjJFzM45ZZAA= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 243613522C28; Sun, 19 Jul 2020 11:42:13 -0700 (PDT) Date: Sun, 19 Jul 2020 11:42:13 -0700 From: "Paul E. McKenney" To: Suraj Upadhyay Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, madhuparnabhowmik10@gmail.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rculist: Silence unused-value warning. Message-ID: <20200719184213.GJ9247@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200719105037.GA21010@blackclown> <20200719160747.GE9247@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 19, 2020 at 10:53:05PM +0530, Suraj Upadhyay wrote: > On Sun 19 Jul, 2020, 21:37 Paul E. McKenney, wrote: > > > On Sun, Jul 19, 2020 at 04:20:37PM +0530, Suraj Upadhyay wrote: > > > The macro __list_check_srcu is used as a statement inside a for loop. > > > > > > __list_check_srcu becomes "true" when CONFIG_PROVE_RCU_LIST is not > > defined. > > > This results in compiler warning about an unused value ("true"). > > > > > > Silence the compiler warning about the unused value "true" > > > by replacing it with an empty expression. > > > > > > Signed-off-by: Suraj Upadhyay > > > > Like this, you mean, give or take whitespace? ;-) > > > > https://lore.kernel.org/lkml/20200718001259.GY9247@paulmck-ThinkPad-P72/ > > > > May I add your Tested-by? > > > > Thanx, Paul > > > > Yeah sure. Thank you, I have applied it and it will be public on my next rebase. And thank you for your testing efforts! Thanx, Paul > Thanks, > > Suraj Upadhyay. > > > --- > > > include/linux/rculist.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/include/linux/rculist.h b/include/linux/rculist.h > > > index de9385b9158e..8b8e0584c473 100644 > > > --- a/include/linux/rculist.h > > > +++ b/include/linux/rculist.h > > > @@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head > > *list) > > > #define __list_check_rcu(dummy, cond, extra...) > > \ > > > ({ check_arg_count_one(extra); }) > > > > > > -#define __list_check_srcu(cond) true > > > +#define __list_check_srcu(cond) ({}) > > > #endif > > > > > > /* > > > -- > > > 2.17.1 > > > > > > > > >