Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1967213pxb; Sat, 7 Nov 2020 05:00:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLElbJZjaGWlLQneh4TBxcOFYFIZpWQdUb7K1dswh/HWAEmuou8/ClkChzCOllQcdjHPip X-Received: by 2002:a17:906:349b:: with SMTP id g27mr6964563ejb.512.1604754032493; Sat, 07 Nov 2020 05:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604754032; cv=none; d=google.com; s=arc-20160816; b=i1/X8sAkUlivs/Q9MqLYOYusgEMzghp0G1CL100edy2r7Ns6p0z/UrdY3F0Ub9Y1at j0A4TQAH52UhcYV8mD5EE5ub1wZ7XCA/ws3pizuEp/sthH122T1413BBh7OK0wG8aBEO DWXux/YvrD2cUV8Xhwb0Ms/Nf0vOv7cMDQSCF+twmD+NQatsStddxPrCNlnPudTjhCll bCPDz0fao+WB85LbuVimh3Vz8JdYVaoLvrd6cxoB0xjyBbTxKFYAVhD1HCKGwJyXiwS1 LBR860iaU5BlPGobKovv4qsLx5VFdUZFbUDkhSFQVCLLBR8Sr3ZZzJsA2MhsoQcnfJte xHuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=zFE51D8utNmf4TaKGjSKKZIme3NA4I1cNN8ZwRDP2Ow=; b=YTgd13XhnLLKt9QpxbBCukIAqY8H/Oe9pnT5Av/eaYpUjFWb6GUPBkz9r1uO1ptgL7 c0ZhGQrpbFOPDYiSQmaw1U8jac7vHuekl/E7YBWETnQvNA6m214JEfPZCKDV5Xqz2mR8 qUv3lAHXb35784xcJpHi2SM5Dt6WJL7TpLPjs/RV7Pkwf5SMlQBERi6sOY8M32TntFkb lTbeTC+Cvkh84RPrkzuOKVYrsrJYbiHDMvbbNASzrPOIJWRHYwkbOdXWG27eUS+Qmvrz z4qIi0WbMdQhT+amlKgREwkG8PIfo6LwfU8+3tLAVFZvvfqyL/Xy2smMNqEN00bh4lco ShJA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mc1si3005415ejb.219.2020.11.07.05.00.08; Sat, 07 Nov 2020 05:00:32 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbgKGMzP (ORCPT + 99 others); Sat, 7 Nov 2020 07:55:15 -0500 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:58216 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbgKGMzP (ORCPT ); Sat, 7 Nov 2020 07:55:15 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R941e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UEWYE.-_1604753711; Received: from IT-FVFX43SYHV2H.lan(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UEWYE.-_1604753711) by smtp.aliyun-inc.com(127.0.0.1); Sat, 07 Nov 2020 20:55:11 +0800 Subject: Re: [PATCH] net/dsa: remove unused macros to tame gcc warning To: Florian Fainelli , Andrew Lunn Cc: Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com> <20201106141820.GP933237@lunn.ch> <24690741-cc10-eec1-33c6-7960c8b7fac6@gmail.com> From: Alex Shi Message-ID: Date: Sat, 7 Nov 2020 20:54:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <24690741-cc10-eec1-33c6-7960c8b7fac6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/11/7 上午12:39, Florian Fainelli 写道: >> Hi Alex >> >> 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? Thanks Alex