Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2115529pxb; Sat, 7 Nov 2020 09:41:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbwzy309YgnArf/iPuFXVVEe2haFplRVp3WZlesIZuRAUVYp+RUXHcWHg9+A8HHdTI8yUQ X-Received: by 2002:a05:6402:206:: with SMTP id t6mr7581730edv.291.1604770908895; Sat, 07 Nov 2020 09:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604770908; cv=none; d=google.com; s=arc-20160816; b=zCf6xYugGJhYyYfTSeH5l4crL2C0RxaCp282d4R9gXc4U5ZQ5gDa+2TpA+6Nw7jfEg zEhHxNJ6e/LFkVJ+ag5cUfGfs76WoWvJn3RSs6HlicknNT3wZqvBOkSHOG+SRh4aUN4d PdaKCwkRbMBt0uzbnkV0ciuUfg9jinFCtzGuMensxqHchpnm9DvEzNDNpmAPlMoVozga 62Jv2VMv607EtZUd7ojAhiwCsdOJn2jzRCdgl1f+X3RlTJ9MG0vg1nUXecazie7XPOdl rkylzZ0UmKrWqlBInRPbNWZsUR8sIPalhMV8YZmYgcUfb0l7d1x2zx2DOqy8BwngFMiz 6t1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=C/S/Z3P+Hpg33Dxr0R8cfhx6Sk4PZPMpipWhkxCT6z0=; b=UqVx/4r0n8i4EO2uoIvPYGeP9NW2/LuVQRviEJo9FnwdaKr1eX3ffK4qPuLVjh9f8H PdwrhfR8czolTMqR0lfJDwK9Ag1SV6X9BrmMqVIuBNxpd4KWWasj160arowuZ8tIdXTj hy40TNF2/1CVtKwCddD9+EZWZalC00Ngl7hX0RszQfI1G0cK5GZ9Ep6izJ8c4JD9p/Rj D9ge7utXPyb36MPiXBQ2xffSxTFEw6HRRg6FYhximYlgRXmX7RL4BrM3NZuHnC/9kw34 z9vIU2Ez0MyrGYfHDJqn9m+TqUV/DSDgbv6/CY23Hgr5ewsUntzmzjBx2+IWkT8TqaNq yCvg== 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 i9si3601746eje.410.2020.11.07.09.41.25; Sat, 07 Nov 2020 09:41:48 -0800 (PST) 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 S1728388AbgKGRjr (ORCPT + 99 others); Sat, 7 Nov 2020 12:39:47 -0500 Received: from smtprelay0223.hostedemail.com ([216.40.44.223]:39430 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727218AbgKGRjr (ORCPT ); Sat, 7 Nov 2020 12:39:47 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id B98E3181D341E; Sat, 7 Nov 2020 17:39:45 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:152:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1963:2393:2559:2562:2692:2827:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:6119:6120:6691:7901:7903:9040:10004:10400:10848:11232:11658:11783:11914:12297:12740:12895:13069:13076:13149:13230:13311:13357:13894:14096:14097:14659:21060:21080:21451:21627:21660:21972:30012:30054:30075:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: side79_2f0f021272dd X-Filterd-Recvd-Size: 2419 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Sat, 7 Nov 2020 17:39:44 +0000 (UTC) Message-ID: <6ed68a7898c5505d3106223b7ad47950a0c79dc3.camel@perches.com> Subject: Re: [PATCH] net/dsa: remove unused macros to tame gcc warning From: Joe Perches To: Alex Shi , Florian Fainelli , Andrew Lunn Cc: Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 07 Nov 2020 09:39:42 -0800 In-Reply-To: References: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com> <20201106141820.GP933237@lunn.ch> <24690741-cc10-eec1-33c6-7960c8b7fac6@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > It is good to remember that there are multiple readers of source > > > files. There is the compiler which generates code from it, and there > > > is the human trying to understand what is going on, what the hardware > > > can do, how we could maybe extend the code in the future to make use > > > of bits are currently don't, etc. > > > > > > The compiler has no use of these macros, at the moment. But i as a > > > human do. It is valuable documentation, given that there is no open > > > datasheet for this hardware. > > > > > > I would say these warnings are bogus, and the code should be left > > > alone. > > Agreed, these definitions are intended to document what the hardware > > does. These warnings are getting too far. > > Thanks for all comments! I agree these info are much meaningful. > Is there other way to tame the gcc warning? like put them into a .h file > or covered by comments? Does _any_ version of gcc have this warning on by default? I still think my proposal of moving the warning from W=2 to W=3 quite reasonable. Another possibility is to turn the warning off altogether.