Linux-KBuild Archive on lore.kernel.org
 help / color / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: netdev <netdev@vger.kernel.org>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Rohit Maheshwari <rohitm@chelsio.com>,
	linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com,
	Andrew Lunn <andrew@lunn.ch>
Subject: [RFC PATCH net-next v2 0/2] driver/net/ethernet W=1 by default
Date: Thu,  1 Oct 2020 03:12:30 +0200
Message-ID: <20201001011232.4050282-1-andrew@lunn.ch> (raw)

There is a movement to make the code base compile clean with W=1. Some
subsystems are already clean. In order to keep them clean, we need
developers to build new code with W=1 by default in these
subsystems. Otherwise new warnings will be added. To prove the point:

commit e666a4c668528ae1f5b8b3a2e7cb6a5be488dfbb
Merge: d0186842ec5f d0ea5cbdc286
Author: David S. Miller <davem@davemloft.net>
Date:   Fri Sep 25 16:29:00 2020 -0700

    Merge branch 'drivers-net-warning-clean'

    Jesse Brandeburg says:

    ====================
    make drivers/net/ethernet W=1 clean

Then 4 days later a new W=1 warning has added:

drivers/net/ethernet//chelsio/inline_crypto/ch_ktls/chcr_ktls.c: In function ‘chcr_ktls_cpl_set_tcb_rpl’:
drivers/net/ethernet//chelsio/inline_crypto/ch_ktls/chcr_ktls.c:684:22: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum ch_ktls_open_state’ [-Wenum-conversion]
  684 |  tx_info->open_state = false;

This patchset refactors the core Makefile warning code to allow the
additional warnings W=1 adds available to any Makefile. The Ethernet
driver subsystem Makefiles then make use of this to make W=1 the
default for this subsystem.

v2:

Address the comment that we need to be able to add new W=1 compiler
flags without actually causing new warnings for builds which don't have W=1

Andrew Lunn (2):
  Makefile.extrawarn: Add symbol for W=1 warnings for today
  driver/net/ethernet: Sign up for W=1 as defined on 20200930

 drivers/net/ethernet/Makefile |  3 +++
 scripts/Makefile.extrawarn    | 34 ++++++++++++++++++----------------
 2 files changed, 21 insertions(+), 16 deletions(-)

-- 
2.28.0


             reply index

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  1:12 Andrew Lunn [this message]
2020-10-01  1:12 ` [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today Andrew Lunn
2020-10-01 23:09   ` Nick Desaulniers
2020-10-02  1:44     ` Andrew Lunn
2020-10-02 12:20       ` Arnd Bergmann
2020-10-02 12:51         ` Andrew Lunn
2020-10-02 13:15           ` Arnd Bergmann
2020-10-12  1:00         ` Masahiro Yamada
2020-10-12  8:05           ` Arnd Bergmann
2020-10-05 17:31       ` Nick Desaulniers
2020-10-05 19:49         ` Andrew Lunn
2020-10-05 20:03           ` Arnd Bergmann
2020-10-05 21:08             ` Andrew Lunn
2020-10-11 13:03               ` Masahiro Yamada
2020-10-12  8:11                 ` Arnd Bergmann
2020-10-16 14:12                 ` Andrew Lunn
     [not found]                   ` <CAK8P3a1nBhmf1PQwHHbEjiVgRTXi4UuJAbwuK92CKEbR=yKGWw@mail.gmail.com>
2020-10-17 14:57                     ` Andrew Lunn
2020-10-02 11:08   ` kernel test robot
2020-10-01  1:12 ` [PATCH net-next v2 2/2] driver/net/ethernet: Sign up for W=1 as defined on 20200930 Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201001011232.4050282-1-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=netdev@vger.kernel.org \
    --cc=rohitm@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-KBuild Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kbuild/0 linux-kbuild/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kbuild linux-kbuild/ https://lore.kernel.org/linux-kbuild \
		linux-kbuild@vger.kernel.org
	public-inbox-index linux-kbuild

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kbuild


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git