From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH ethtool v2 0/9] compiler warnings cleanup, part 2
Date: Sun, 23 Aug 2020 21:40:15 +0200 (CEST) [thread overview]
Message-ID: <cover.1598210544.git.mkubecek@suse.cz> (raw)
Two compiler warnings still appear when compiling current source:
comparison between signed and unsigned values and missing struct member
initializations.
The former are mostly handled by declaring variables (loop iterators,
mostly) as unsigned, only few required an explicit cast. The latter are
handled by using named field initializers; in link_mode_info[] array,
helper macros are also used to make code easier to read and check.
As the final step, add "-Wextra" to default CFLAGS to catch any future
warnings as early as possible.
changes between v1 and v2:
- use unsigned int for feature_flags[] (suggested by Andrew Lunn, patch 1)
- use unsigned int for argc counters and split this change out (suggested
by Andrew Lunn, patches 4 and 5)
- add missing argc underflow check in do_perqueue() (patch 3)
Michal Kubecek (9):
netlink: get rid of signed/unsigned comparison warnings
ioctl: check presence of eeprom length argument properly
ioctl: prevent argc underflow in do_perqueue()
ioctl: make argc counters unsigned
ioctl: get rid of signed/unsigned comparison warnings
get rid of signed/unsigned comparison warnings in register dump
parsers
settings: simplify link_mode_info[] initializers
ioctl: convert cmdline_info arrays to named initializers
build: add -Wextra to default CFLAGS
Makefile.am | 2 +-
dsa.c | 2 +-
ethtool.c | 447 ++++++++++++++++++++++++++++++++++-----------
fec.c | 2 +-
ibm_emac.c | 2 +-
internal.h | 2 +-
marvell.c | 2 +-
natsemi.c | 2 +-
netlink/features.c | 6 +-
netlink/netlink.c | 4 +-
netlink/netlink.h | 2 +-
netlink/nlsock.c | 2 +-
netlink/parser.c | 2 +-
netlink/settings.c | 242 +++++++++---------------
rxclass.c | 8 +-
sfpdiag.c | 2 +-
tg3.c | 4 +-
17 files changed, 448 insertions(+), 285 deletions(-)
--
2.28.0
next reply other threads:[~2020-08-23 19:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-23 19:40 Michal Kubecek [this message]
2020-08-23 19:40 ` [PATCH ethtool v2 1/9] netlink: get rid of signed/unsigned comparison warnings Michal Kubecek
2020-08-23 20:06 ` Andrew Lunn
2020-08-23 19:40 ` [PATCH ethtool v2 2/9] ioctl: check presence of eeprom length argument properly Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 3/9] ioctl: prevent argc underflow in do_perqueue() Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 4/9] ioctl: make argc counters unsigned Michal Kubecek
2020-08-23 20:08 ` Andrew Lunn
2020-08-23 19:40 ` [PATCH ethtool v2 5/9] ioctl: get rid of signed/unsigned comparison warnings Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 6/9] get rid of signed/unsigned comparison warnings in register dump parsers Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 7/9] settings: simplify link_mode_info[] initializers Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 8/9] ioctl: convert cmdline_info arrays to named initializers Michal Kubecek
2020-08-23 19:40 ` [PATCH ethtool v2 9/9] build: add -Wextra to default CFLAGS Michal Kubecek
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=cover.1598210544.git.mkubecek@suse.cz \
--to=mkubecek@suse.cz \
--cc=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).