lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d0a5666-c57a-4026-b6a1-284821f25943@lunn.ch>
Date: Fri, 4 Jul 2025 20:03:47 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Dong Yibo <dong100@...se.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, corbet@....net,
	andrew+netdev@...n.ch, gur.stavi@...wei.com, maddy@...ux.ibm.com,
	mpe@...erman.id.au, danishanwar@...com, lee@...ger.us,
	gongfan1@...wei.com, lorenzo@...nel.org, geert+renesas@...der.be,
	Parthiban.Veerasooran@...rochip.com, lukas.bulwahn@...hat.com,
	alexanderduyck@...com, netdev@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/15] net: rnpgbe: Add n500/n210 chip support

> +#define M_NET_FEATURE_SG ((u32)(1 << 0))
> +#define M_NET_FEATURE_TX_CHECKSUM ((u32)(1 << 1))
> +#define M_NET_FEATURE_RX_CHECKSUM ((u32)(1 << 2))

Please use the BIT() macro.

> +	u32 feature_flags;
> +	u16 usecstocount;
> +};
> +

> +#define rnpgbe_rd_reg(reg) readl((void *)(reg))
> +#define rnpgbe_wr_reg(reg, val) writel((val), (void *)(reg))

These casts look wrong. You should be getting your basic iomem pointer
from a function which returns an void __iomem* pointer, so the cast
should not be needed.

> -static int rnpgbe_add_adpater(struct pci_dev *pdev)
> +static int rnpgbe_add_adpater(struct pci_dev *pdev,
> +			      const struct rnpgbe_info *ii)
>  {
> +	int err = 0;
>  	struct mucse *mucse = NULL;
>  	struct net_device *netdev;
> +	struct mucse_hw *hw = NULL;
> +	u8 __iomem *hw_addr = NULL;
> +	u32 dma_version = 0;
>  	static int bd_number;
> +	u32 queues = ii->total_queue_pair_cnts;

You need to work on your reverse Christmas tree. Local variables
should be ordered longest to shortest.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ