All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Wen Gu <guwen@linux.alibaba.com>,
	Philo Lu <lulie@linux.alibaba.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Lukas Bulwahn <lukas.bulwahn@redhat.com>,
	Dong Yibo <dong100@mucse.com>,
	Dust Li <dust.li@linux.alibaba.com>
Subject: Re: [PATCH net-next v19 2/6] eea: introduce ring and descriptor structures
Date: Tue, 13 Jan 2026 17:23:53 -0800	[thread overview]
Message-ID: <20260113172353.2ae6ef81@kernel.org> (raw)
In-Reply-To: <20260113011856.65346-3-xuanzhuo@linux.alibaba.com>

On Tue, 13 Jan 2026 09:18:52 +0800 Xuan Zhuo wrote:
> +void ering_irq_unactive(struct eea_ring *ering)
> +{
> +	union {
> +		u64 data;
> +		struct eea_db db;
> +	} val;
> +
> +	if (ering->mask == EEA_IRQ_MASK)
> +		return;
> +
> +	ering->mask = EEA_IRQ_MASK;
> +
> +	val.db.kick_flags = EEA_IRQ_MASK;
> +
> +	writeq(val.data, (void __iomem *)ering->db);
> +}

AI code review points out that this is writing out a partially
initialized structure. You're only setting kick_flags, so 1byte
and the other 7 bytes are whatever was there before on the stack.
This needs to be fixed.

In general we recommend using FIELD_PREP()-family of macros to encode
bitfields.
-- 
pw-bot: cr

  reply	other threads:[~2026-01-14  1:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13  1:18 [PATCH net-next v19 0/6] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2026-01-13  1:18 ` [PATCH net-next v19 1/6] eea: introduce PCI framework Xuan Zhuo
2026-01-13  1:18 ` [PATCH net-next v19 2/6] eea: introduce ring and descriptor structures Xuan Zhuo
2026-01-14  1:23   ` Jakub Kicinski [this message]
2026-01-13  1:18 ` [PATCH net-next v19 3/6] eea: probe the netdevice and create adminq Xuan Zhuo
2026-01-13  1:18 ` [PATCH net-next v19 4/6] eea: create/destroy rx,tx queues for netdevice open and stop Xuan Zhuo
2026-01-13  1:18 ` [PATCH net-next v19 5/6] eea: introduce ethtool support Xuan Zhuo
2026-01-13  1:18 ` [PATCH net-next v19 6/6] eea: introduce callback for ndo_get_stats64 Xuan Zhuo

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=20260113172353.2ae6ef81@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dong100@mucse.com \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=lulie@linux.alibaba.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=xuanzhuo@linux.alibaba.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.