mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "illusion.wang" <illusion.wang@nebula-matrix.com>
Cc: dimon.zhao@nebula-matrix.com, alvin.wang@nebula-matrix.com,
	sam.chen@nebula-matrix.com, netdev@vger.kernel.org,
	andrew+netdev@lunn.ch, corbet@lwn.net, kuba@kernel.org,
	linux-doc@vger.kernel.org, lorenzo@kernel.org, pabeni@redhat.com,
	horms@kernel.org, vadim.fedorenko@linux.dev,
	lukas.bulwahn@redhat.com, edumazet@google.com,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 net-next 02/11] net/nebula-matrix: add our driver architecture
Date: Fri, 27 Feb 2026 23:46:46 +0100	[thread overview]
Message-ID: <b9cd1827-ba68-4e5c-ba17-773372f75407@lunn.ch> (raw)
In-Reply-To: <20260226073840.3222-3-illusion.wang@nebula-matrix.com>

> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_hw_leonis.c
> @@ -0,0 +1,138 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2025 Nebula Matrix Limited.
> + * Author:
> + */
> +
> +#include "nbl_hw_leonis.h"
> +
> +static struct nbl_hw_ops hw_ops = {
> +	if (param->caps.has_ctrl) {
> +		hw_mgt->hw_addr =
> +			ioremap(pci_resource_start(pdev, NBL_MEMORY_BAR),
> +				pci_resource_len(pdev, NBL_MEMORY_BAR) -
> +					NBL_RDMA_NOTIFY_OFF);

Where is the include of linux/io.h needed for this?

> +	spin_lock_init(&hw_mgt->reg_lock);

linux/spinlock.h?

> +static inline u32 rd32(u8 __iomem *addr, u64 reg)
> +{
> +	return readl(addr + (reg));
> +}

Why () around reg?

> +
> +static inline void wr32(u8 __iomem *addr, u64 reg, u32 value)
> +{
> +	writel((value), (addr + (reg)));
> +}

Why () around value? These are functions, not macros, so there cannot
be any side effects.


    Andrew

---
pw-bot: cr

  reply	other threads:[~2026-02-27 22:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  7:38 [PATCH v5 net-next 00/11] nbl driver for Nebulamatrix NICs illusion.wang
2026-02-26  7:38 ` [PATCH v5 net-next 01/11] net/nebula-matrix: add minimum nbl build framework illusion.wang
2026-02-27 22:30   ` Andrew Lunn
2026-02-26  7:38 ` [PATCH v5 net-next 02/11] net/nebula-matrix: add our driver architecture illusion.wang
2026-02-27 22:46   ` Andrew Lunn [this message]
2026-02-26  7:38 ` [PATCH v5 net-next 03/11] net/nebula-matrix: add chip related definitions illusion.wang
2026-02-27 22:56   ` Andrew Lunn
2026-03-02  8:00     ` 回复:[PATCH " Illusion Wang
2026-02-26  7:38 ` [PATCH v5 net-next 04/11] net/nebula-matrix: channel msg value and msg struct illusion.wang
2026-02-27 22:57   ` Andrew Lunn
2026-02-26  7:38 ` [PATCH v5 net-next 05/11] net/nebula-matrix: add channel layer illusion.wang
2026-02-27 23:31   ` Andrew Lunn
2026-03-04  2:04     ` 回复:[PATCH " Illusion Wang
2026-02-26  7:38 ` [PATCH v5 net-next 06/11] net/nebula-matrix: add common resource implementation illusion.wang
2026-02-28 20:44   ` Andrew Lunn
2026-02-26  7:38 ` [PATCH v5 net-next 07/11] net/nebula-matrix: add intr " illusion.wang
2026-02-26  7:38 ` [PATCH v5 net-next 08/11] net/nebula-matrix: add vsi " illusion.wang
2026-02-28 20:50   ` Andrew Lunn
2026-02-26  7:38 ` [PATCH v5 net-next 09/11] net/nebula-matrix: add Dispatch layer implementation illusion.wang
2026-02-26  7:38 ` [PATCH v5 net-next 10/11] net/nebula-matrix: add common/ctrl dev init/reinit operation illusion.wang
2026-02-26  7:38 ` [PATCH v5 net-next 11/11] net/nebula-matrix: add common dev start/stop operation illusion.wang
2026-02-28 20:59   ` Andrew Lunn
2026-03-04  7:20     ` 回复:[PATCH " Illusion Wang
2026-03-04 13:56       ` 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=b9cd1827-ba68-4e5c-ba17-773372f75407@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alvin.wang@nebula-matrix.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=dimon.zhao@nebula-matrix.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=illusion.wang@nebula-matrix.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sam.chen@nebula-matrix.com \
    --cc=vadim.fedorenko@linux.dev \
    /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

all inboxes | Powered by JetHome®