netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Xin Tian <tianx@yunsilicon.com>
Cc: netdev@vger.kernel.org, leon@kernel.org, andrew+netdev@lunn.ch,
	kuba@kernel.org, pabeni@redhat.com, edumazet@google.com,
	davem@davemloft.net, jeff.johnson@oss.qualcomm.com,
	przemyslaw.kitszel@intel.com, weihg@yunsilicon.com,
	wanry@yunsilicon.com, jacky@yunsilicon.com,
	parthiban.veerasooran@microchip.com, masahiroy@kernel.org,
	kalesh-anakkur.purayil@broadcom.com, geert+renesas@glider.be
Subject: Re: [PATCH net-next v8 02/14] xsc: Enable command queue
Date: Tue, 18 Mar 2025 15:23:19 +0000	[thread overview]
Message-ID: <20250318152319.GD688833@kernel.org> (raw)
In-Reply-To: <c94717a8-0d96-4914-8e24-9eb2959aa193@yunsilicon.com>

On Tue, Mar 18, 2025 at 06:06:07PM +0800, Xin Tian wrote:
> On 2025/3/12 17:17, Xin Tian wrote:
> > On 2025/3/10 14:34, Simon Horman wrote:
> >> On Fri, Mar 07, 2025 at 06:08:29PM +0800, Xin Tian wrote:
> >>> The command queue is a hardware channel for sending
> >>> commands between the driver and the firmware.
> >>> xsc_cmd.h defines the command protocol structures.
> >>> The logic for command allocation, sending,
> >>> completion handling, and error handling is implemented
> >>> in cmdq.c.
> >>>
> >>> Co-developed-by: Honggang Wei <weihg@yunsilicon.com>
> >>> Signed-off-by: Honggang Wei <weihg@yunsilicon.com>
> >>> Co-developed-by: Lei Yan <jacky@yunsilicon.com>
> >>> Signed-off-by: Lei Yan <jacky@yunsilicon.com>
> >>> Signed-off-by: Xin Tian <tianx@yunsilicon.com>
> >> Hi Xin,
> >>
> >> Some minor feedback from my side.
> >>
> >> ...
> >>
> >>> diff --git a/drivers/net/ethernet/yunsilicon/xsc/pci/cmdq.c b/drivers/net/ethernet/yunsilicon/xsc/pci/cmdq.c
> >> ...
> >>
> >>> +static int xsc_copy_to_cmd_msg(struct xsc_cmd_msg *to, void *from, int size)
> >>> +{
> >>> +	struct xsc_cmd_prot_block *block;
> >>> +	struct xsc_cmd_mailbox *next;
> >>> +	int copy;
> >>> +
> >>> +	if (!to || !from)
> >>> +		return -ENOMEM;
> >>> +
> >>> +	copy = min_t(int, size, sizeof(to->first.data));
> >> nit: I expect that using min() is sufficient here...
> > Ack
> 
> min(size, sizeof(to->first.data)) will lead to a compile warning.
> size is int and sizeof(to->first.data) is size_t.
> So I kept this in v9

Ack, thanks for checking.

  parent reply	other threads:[~2025-03-18 15:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 10:09 [PATCH net-next v8 00/14] xsc: ADD Yunsilicon XSC Ethernet Driver Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 01/14] xsc: Add xsc driver basic framework Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 02/14] xsc: Enable command queue Xin Tian
2025-03-10  6:34   ` Simon Horman
2025-03-12  9:17     ` Xin Tian
2025-03-18 10:06       ` Xin Tian
2025-03-18 10:29         ` Geert Uytterhoeven
2025-03-18 10:59           ` Xin Tian
2025-03-18 15:23         ` Simon Horman [this message]
2025-03-11 14:55   ` Paolo Abeni
2025-03-12  8:37     ` Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 03/14] xsc: Add hardware setup APIs Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 04/14] xsc: Add qp and cq management Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 05/14] xsc: Add eq and alloc Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 06/14] xsc: Init pci irq Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 07/14] xsc: Init auxiliary device Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 08/14] xsc: Add ethernet interface Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 09/14] xsc: Init net device Xin Tian
2025-03-11 15:06   ` Paolo Abeni
2025-03-11 15:12   ` Paolo Abeni
2025-03-18  4:29     ` Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 10/14] xsc: Add eth needed qp and cq apis Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 11/14] xsc: ndo_open and ndo_stop Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 12/14] xsc: Add ndo_start_xmit Xin Tian
2025-03-11 15:18   ` Paolo Abeni
2025-03-12  9:43     ` Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 13/14] xsc: Add eth reception data path Xin Tian
2025-03-07 10:08 ` [PATCH net-next v8 14/14] xsc: add ndo_get_stats64 Xin Tian
2025-03-11 15:28   ` Paolo Abeni
2025-03-12  9:37     ` Xin Tian
2025-03-18  9:00       ` Xin Tian
2025-03-07 10:40 ` [PATCH net-next v8 00/14] xsc: ADD Yunsilicon XSC Ethernet Driver Xin Tian

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=20250318152319.GD688833@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=jacky@yunsilicon.com \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parthiban.veerasooran@microchip.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=tianx@yunsilicon.com \
    --cc=wanry@yunsilicon.com \
    --cc=weihg@yunsilicon.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 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).