public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Junyang Han <han.junyang@zte.com.cn>
Cc: andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	vadim.fedorenko@linux.dev, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	ran.ming@zte.com.cn, han.chengfei@zte.com.cn,
	zhang.yanze@zte.com.cn
Subject: Re: [PATCH net-next v3 1/3] net/ethernet: add ZTE network driver support
Date: Thu, 30 Apr 2026 21:34:56 +0200	[thread overview]
Message-ID: <eabcb0c3-324f-4fd7-992e-8d517980ea27@lunn.ch> (raw)
In-Reply-To: <20260430151138.2813381-2-han.junyang@zte.com.cn>

> +    struct zxdh_pf_device *pf_dev = NULL;

Please don't initialise variables, unless they actual do need
initialising. It mask used before set warnings the compiler will
issue.

> +void dh_pf_pci_close(struct dh_core_dev *dev)
> +{
> +    struct zxdh_pf_device *pf_dev = NULL;

Looks like you can just set it so dev->priv.

> +static int dh_pf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> +{
> +    struct dh_core_dev *dh_dev;
> +    struct zxdh_pf_device *pf_dev;

Reverse Christmas tree. 

> +    struct devlink *devlink;
> +    int ret;
> +
> +    devlink = devlink_alloc(&dh_pf_devlink_ops, sizeof(struct dh_core_dev),
> +                &pdev->dev);

Wrong indentation. In fact, this seems to have spaces not tabs. What
does checkpatch say about these files? Or is you email still broken?

No point reviewing further if the basic are wrong.

    Andrew

---
pw-bot: cr

  reply	other threads:[~2026-04-30 19:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 15:11 [PATCH net-next v3 0/3] Add ZTE DingHai Ethernet PF driver Junyang Han
2026-04-30 15:11 ` [PATCH net-next v3 1/3] net/ethernet: add ZTE network driver support Junyang Han
2026-04-30 19:34   ` Andrew Lunn [this message]
2026-04-30 15:11 ` [PATCH net-next v3 2/3] net/ethernet/zte/dinghai: add logging infrastructure Junyang Han
2026-04-30 19:36   ` Andrew Lunn
2026-04-30 15:11 ` [PATCH net-next v3 3/3] net/ethernet/zte/dinghai: add hardware register access and PCI capability scanning Junyang Han

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=eabcb0c3-324f-4fd7-992e-8d517980ea27@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=han.chengfei@zte.com.cn \
    --cc=han.junyang@zte.com.cn \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ran.ming@zte.com.cn \
    --cc=vadim.fedorenko@linux.dev \
    --cc=zhang.yanze@zte.com.cn \
    /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