From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224bgqLvWP9VhGKVknRdT1343mCJr0NyT1FnGgqJuz4uEwMAkasUIMFvU+AcQxfLG8cVXgru ARC-Seal: i=1; a=rsa-sha256; t=1517243739; cv=none; d=google.com; s=arc-20160816; b=DyXAmExIgiCefvNQlKJaeCZM1seC7oGxImvj1gg9zIDrtkExp60sLhzzm/HVU5Scah C7QkgQPbrHQxRrcsAnv++OnDvgCFZAOu/6Qxy7My3tALbioxSrWTqdi9OF89lYQCnEvD HXsCLLUXj/Qb8ZnJd66IP7Nsf65M0HpSo+EbLESa5llfQCG5chsBHwOoOZtNh3KdB+vy ZUqbVFdVtFDUzKSdHQhWnuXTRyNDWvFGwkZAaCjPBMMjpcDJx6resNt0APE/S0YBbEGg YLjZxYVkCdryNvsM8b9Z4bXlv2B4jZpqj8h2P8v0RxGRLbeQVaqGFRNsABgiL3kxzn/u NBcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:references:in-reply-to:subject:cc:to:from :date:content-transfer-encoding:mime-version:dkim-signature :dkim-signature:arc-authentication-results; bh=HviWS7nxTa//iEokSARX/l9zToi4IrU6wz0joQJetrI=; b=Eupkfq/z2o9UWeLQJnIrDXokdcBvIlYYCqcwc7nbKUpFPIhXXClcr89boPah3KnoO+ a/j2T5TVqNhBuXOci8IUNmlIcj2RHZGsnoUyAdl2//b0rEwhVkb0ofsJLur22uV/g37L 193t1VO/8gKNfS18Tf6g7K4IyFfa9LRTxDgUMX6KtrXqsltBvQEFPktGUK9Yho/44QVm HwrWcixAqd+/YdiFMv71yz8E2RBl7K9nhO+6v4Yaq71qWyjLNix+4DrBuhfeLwnDNFEp iXRS8S65027mZ+G6NyCIhRE5C6e3XWSTNf1SWJA8blc5AhdOpJFOcEMh2SZt2oBqV+6p azWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SM/nNXBV; dkim=pass header.i=@codeaurora.org header.s=default header.b=obamPSWI; spf=pass (google.com: domain of psodagud@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=psodagud@codeaurora.org Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SM/nNXBV; dkim=pass header.i=@codeaurora.org header.s=default header.b=obamPSWI; spf=pass (google.com: domain of psodagud@codeaurora.org designates 198.145.29.96 as permitted sender) smtp.mailfrom=psodagud@codeaurora.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 29 Jan 2018 08:35:38 -0800 From: Sodagudi Prasad To: Segher Boessenkool Cc: gregkh@linuxfoundation.org, mmarek@suse.com, ghackmann@google.com, yamada.masahiro@socionext.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: clang: Disable -Wunused-const-variable warnings In-Reply-To: <20180128162239.GZ21977@gate.crashing.org> References: <1517014786-30685-1-git-send-email-psodagud@codeaurora.org> <20180128162239.GZ21977@gate.crashing.org> Message-ID: User-Agent: Roundcube Webmail/1.2.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590705328423377998?= X-GMAIL-MSGID: =?utf-8?q?1590945371937122684?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On 2018-01-28 08:22, Segher Boessenkool wrote: > On Fri, Jan 26, 2018 at 04:59:46PM -0800, Prasad Sodagudi wrote: >> Disable -Wunused-const-variable warnings instead of >> disabling -Wunused-variable warnings, So that in both >> clang and GCC -Wunused-const-variable gets disabled. > > Why would you disable -Wunused-const-variable on GCC? You do not > explain why. Hi Segher, Please check below discussion with Greg and Masahiro about "unused-variable". https://lkml.org/lkml/2017/12/18/697 Please check this link, "unused-const-variable" warning is already disabled for GCC. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v4.15#n719 Below commit is disabling the "unused-const-variable" for GCC. commit - c9c6837d39311b0c - "kbuild: move -Wunused-const-variable to W=1 warning level" Currently "unused-variable" warnings are disabled for clang and not for the gcc. Disabling of "unused-variable" warning also disables "unused-const-variable" warning. To match same settings between clang and gcc, disabling "unused-const-variable" warnings for clang as well. So with this patch, keeping the same settings for GCC and CLANG with respect to "unused-const-variable". -Thanks, Prasad > > > Segher -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project