From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBB3DC4742C for ; Sat, 7 Nov 2020 12:55:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4275208E4 for ; Sat, 7 Nov 2020 12:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728114AbgKGMzP (ORCPT ); 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