From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Felix Fietkau <nbd@nbd.name>,
Pablo Neira Ayuso <pablo@netfilter.org>,
"David S. Miller" <davem@davemloft.net>
Cc: Christoph Hellwig <hch@infradead.org>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/mediatek/mtk_ppe_offload.c - suspicious code?
Date: Sun, 18 Apr 2021 21:02:12 -0400 [thread overview]
Message-ID: <526789.1618794132@turing-police> (raw)
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
While doing some code auditing for -Woverride_init, I spotted some questionable code
commit 502e84e2382d92654a2ecbc52cdbdb5a11cdcec7
Author: Felix Fietkau <nbd@nbd.name>
Date: Wed Mar 24 02:30:54 2021 +0100
net: ethernet: mtk_eth_soc: add flow offloading support
In drivers/net/ethernet/mediatek/mtk_ppe_offload.c:
+static const struct rhashtable_params mtk_flow_ht_params = {
+ .head_offset = offsetof(struct mtk_flow_entry, node),
+ .head_offset = offsetof(struct mtk_flow_entry, cookie),
+ .key_len = sizeof(unsigned long),
+ .automatic_shrinking = true,
+};
What's intended for head_offset here?
Christoph: This was the only actual questionable code caught by override-init
across allmodconfig builds of arm, arm64, and x86_64. The other 218 warnings
not already silenced by Makefile twiddling of CFLAGS are all legitimate. I
admit not being sure what that means for its use in W=1 builds in general.
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2021-04-19 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 1:02 Valdis Klētnieks [this message]
2021-04-19 8:06 ` drivers/net/ethernet/mediatek/mtk_ppe_offload.c - suspicious code? Pablo Neira Ayuso
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=526789.1618794132@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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).