Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp557619pxf; Wed, 17 Mar 2021 10:25:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMa0fA8gU79wF3M7AIh0vUxLAdn6HD3dQki9Phs45rNpiJDBYp0LtgMFwZRcgKsodEHy8X X-Received: by 2002:a17:906:110d:: with SMTP id h13mr37180432eja.357.1616001948025; Wed, 17 Mar 2021 10:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001948; cv=none; d=google.com; s=arc-20160816; b=t1RDL8K+Kcv19LonvbZfWmDREc7ma2+p0oXp0Bnk9i67v/JxTsmvaIQTAyJDCI7F95 Bj9C3LcDlgbM5zPkJUNQ7jRY8ccLCXIW7X89q+s9Lk1JuR5xDaosi2ApdfG3G8HiPZst 1/RCFy+kd3PbCqpCLnOCKrb+ZSLXr3KVhUQ/tcIrkQZlGJQBGwrIOsFDfqtdnNu1YmP3 iG4qFyYqRWxMnIcQuiaD08Wy3na6FMzc8/MquWYfXCEwKhaZeOjGBURMiISyOIQbbpjz qGTaFLHQYia91KmRIYtQpGVReU2z6wrmYmMiMPFU36Dqn3CNk1mz/2SGLz2tAyixjnrZ Ybjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date; bh=FAB9EiZo828RerCHd9HR2N3JRdP1SK5SwNh7V4qHcCg=; b=g3wNlC1iAW9MDlOEvQVTm+r7RRE+Do1uEitGjnpxzwtb7gzlYnarbHn3UmrJei9643 AeQVeEUArGWznddaUocwQVEbF2YU83M+0Y6oqXIH0qoz/kAm445y/dYh/Alv3OdoV6TH QT5EiExKPQiMO3VShwIr7w/nyVisQx4/p3OcYYP7mXB6AVlrmledtvddjrAS7fAMlP+J T7Tu2bmzkWAOAiQfgIBXSvr79/9vgWtO9YVsxo4y5QzFDE2ZRmFtSYPTFz97go4o71xl UMGrXoncAc0HBDsG4tiXZe8WvR5Y9zE0Djh9jKJ/kZZyR5nYnyXhpwrXQ46g+ykrWSog CNtQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si17509653ejb.180.2021.03.17.10.25.25; Wed, 17 Mar 2021 10:25: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229680AbhCQRHv (ORCPT + 99 others); Wed, 17 Mar 2021 13:07:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:59406 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbhCQRHf (ORCPT ); Wed, 17 Mar 2021 13:07:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BD68CAE27; Wed, 17 Mar 2021 17:07:33 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 99686DA6E2; Wed, 17 Mar 2021 18:05:31 +0100 (CET) Date: Wed, 17 Mar 2021 18:05:31 +0100 From: David Sterba To: Victor Erminpour Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] btrfs: Use immediate assignment when referencing cc-option Message-ID: <20210317170531.GU7604@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Victor Erminpour , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <1615997328-24677-1-git-send-email-victor.erminpour@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1615997328-24677-1-git-send-email-victor.erminpour@oracle.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 09:08:48AM -0700, Victor Erminpour wrote: > Calling cc-option will use KBUILD_CFLAGS, which when lazy setting > subdir-ccflags-y produces the following build error: > > scripts/Makefile.lib:10: *** Recursive variable `KBUILD_CFLAGS' \ > references itself (eventually). Stop. > > Use single := assignment for subdir-ccflags-y. The cc-option calls > are done right away and we don't end up with KBUILD_CFLAGS > referencing itself. > > Signed-off-by: Victor Erminpour > --- > fs/btrfs/Makefile | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile > index b634c42115ea..583ca2028e08 100644 > --- a/fs/btrfs/Makefile > +++ b/fs/btrfs/Makefile > @@ -1,16 +1,16 @@ > # SPDX-License-Identifier: GPL-2.0 > > # Subset of W=1 warnings > +subdir-ccflags-y := $(call cc-option, -Wunused-but-set-variable) \ > + $(call cc-option, -Wunused-const-variable) \ > + $(call cc-option, -Wpacked-not-aligned) \ > + $(call cc-option, -Wstringop-truncation) That's still overwriting the value unconditionally, the idea was a separate variable https://lore.kernel.org/linux-btrfs/20210317104313.17028-1-dsterba@suse.com