Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4125454pxv; Mon, 26 Jul 2021 22:28:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqxHjikMXgXCmEuxuersxqF04GEr7u5Jgi9Rm23jkf7CmzuJJ04rcKIXY1b473w6+rcmZK X-Received: by 2002:a05:6e02:2162:: with SMTP id s2mr15784332ilv.99.1627363706438; Mon, 26 Jul 2021 22:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627363706; cv=none; d=google.com; s=arc-20160816; b=ZOU9WVdgmUUnpYNoMFxzrrl7QaWTu+unIKC7EUGR+F8HbOy1DywfNd9fGsMblaBnII Lh1/tiIA/wCn2Tk2NkGSmRYm/nlL8W1sCq1DiYu6+QAHNeMo9wBCWtVreCPzPnw6YDW2 ey16hRt7Dkcm+te2f1kCQRpc5g5wBXtU40sMBTAc2WxvLwkyU31oYlLtkewOa0xN2UrK XNY7vptazAvjgdlv5ujPHlQOUnZir5vNEjf2YoGx0CfUHoZ9TeUmIRlFdrgLPGXaH2AZ ycIc8tkyqTgHRA5G0mqng6Yjgs03tRYrPzKZLtAJomxk0hOtrQhd3ce448gib8He9c5L MEXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZTyPPB+/24h7aSJ+Gcxs4ia/PINExYMIXP7bvUvgtSM=; b=X6mKTTQpRbSo9O/puEbrIz3dUm14YmB/ZJBAYfLJjOnuK3EkA7zOFt3TQ3YgCtJWW7 mhiFCjH1OEKDYrwvBF6AU1TxhzRPAQQd19s2Gxy+17e104xnVvLvH7AUT6ycE8XCjk5B drtqrkMzYllvXV2o/05WozdHhwTdCET3/SvWirSTu2IfSEOGjEvsw6zqup6uOeJR0Qeb Rr5IGFPJLPVXdJh9HP9P0zyNjXQuQoA8SV5j4lwLqVPSVSOuXDlRsloF4yLcdTef/kVF NH2FxU3tM+8ETy7uc9CDAb4BsCjr3/4JAZ490GkRLbuJMfiBdh+WCUcF8TbAVte4Rek1 ZDng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pnJvORGf; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si2177207jad.82.2021.07.26.22.28.14; Mon, 26 Jul 2021 22:28:26 -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=@linuxfoundation.org header.s=korg header.b=pnJvORGf; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235068AbhG0F10 (ORCPT + 99 others); Tue, 27 Jul 2021 01:27:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:44326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbhG0F1Z (ORCPT ); Tue, 27 Jul 2021 01:27:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C8747610D0; Tue, 27 Jul 2021 05:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627363646; bh=dq6ahuYU1FBLrdnNuaHmwV8noXCRW5UxuGkJIYAWyG0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pnJvORGfIslrZN3wgk8zR7Fic0twmFr2i506B79b2cvRidOieWUJ0Tb2xV6NMb99h dPZab4pwHSWTYrX2lEDx0L3emhuLRK+vq1rCy0FU3llnosgxHnQvL8T7QFZ7Ddhh3u NKX3QHDxG7LPYQsYQd4V8aRxXCbf0z09FGGIIa9g= Date: Tue, 27 Jul 2021 07:27:23 +0200 From: Greg Kroah-Hartman To: Nathan Chancellor Cc: Bill Wendling , "Rafael J. Wysocki" , Nick Desaulniers , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] base: mark 'no_warn' as unused Message-ID: References: <20210714091747.2814370-1-morbo@google.com> <20210726201924.3202278-1-morbo@google.com> <20210726201924.3202278-2-morbo@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 26, 2021 at 01:47:33PM -0700, Nathan Chancellor wrote: > + Greg and Rafael as the maintainer and reviewer of drivers/base/module.c > respectively, drop everyone else. Odd no one cc:ed us originally, I guess they didn't want the patch ever merged? :( > > Original post: > > https://lore.kernel.org/r/20210726201924.3202278-2-morbo@google.com/ > > On 7/26/2021 1:19 PM, 'Bill Wendling' via Clang Built Linux wrote: > > Fix the following build warning: > > > > drivers/base/module.c:36:6: error: variable 'no_warn' set but not used [-Werror,-Wunused-but-set-variable] > > int no_warn; That's not going to be a good warning to ever have the kernel use due to how lots of hardware works (i.e. we need to do a read after a write but we can throw the read away as it does not matter). > > > > This variable is used to remove another warning, but causes a warning > > itself. Mark it as 'unused' to avoid that. > > > > Signed-off-by: Bill Wendling > > Even though they evaluate to the same thing, it might be worth using > "__always_unused" here because it is :) But it is not unused, the value is written into it. So this isn't ok, sometimes we want to write to variables but never care about the value, that does not mean the compiler should complain about it. thanks, greg k-h