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]
Date:   Tue, 17 Dec 2019 15:39:16 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     davem@...emloft.net, linux@...linux.org.uk, andrew@...n.ch,
        f.fainelli@...il.com, vivien.didelot@...il.com,
        alexandru.marginean@....com, claudiu.manoil@....com,
        xiaoliang.yang_1@....com, yangbo.lu@....com,
        netdev@...r.kernel.org, alexandre.belloni@...tlin.com,
        horatiu.vultur@...rochip.com,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [RFC PATCH v2 4/8] enetc: Make MDIO accessors more generic and
 export to include/linux/fsl

On Wed, 18 Dec 2019 00:18:27 +0200, Vladimir Oltean wrote:
> From: Claudiu Manoil <claudiu.manoil@....com>
> 
> Within the LS1028A SoC, the register map for the ENETC MDIO controller
> is instantiated a few times: for the central (external) MDIO controller,
> for the internal bus of each standalone ENETC port, and for the internal
> bus of the Felix switch.
> 
> Refactoring is needed to support multiple MDIO buses from multiple
> drivers. The enetc_hw structure is made an opaque type and a smaller
> enetc_mdio_priv is created.
> 
> 'mdio_base' - MDIO registers base address - is being parameterized, to
> be able to work with different MDIO register bases.

I'm getting these on a W=1 C=1 allmodconfig build:

WARNING: drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio: 'enetc_mdio_write' exported twice. Previous export was in drivers/net/ethernet/freescale/enetc/fsl-enetc.ko
WARNING: drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio: 'enetc_mdio_read' exported twice. Previous export was in drivers/net/ethernet/freescale/enetc/fsl-enetc.ko
WARNING: drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio: 'enetc_hw_alloc' exported twice. Previous export was in drivers/net/ethernet/freescale/enetc/fsl-enetc.ko

> -#define enetc_mdio_rd(hw, off) \
> -	enetc_port_rd(hw, ENETC_##off + ENETC_MDIO_REG_OFFSET)
> -#define enetc_mdio_wr(hw, off, val) \
> -	enetc_port_wr(hw, ENETC_##off + ENETC_MDIO_REG_OFFSET, val)
> -#define enetc_mdio_rd_reg(off)	enetc_mdio_rd(hw, off)
> +static inline u32 _enetc_mdio_rd(struct enetc_mdio_priv *mdio_priv, int off)
> +{
> +	return enetc_port_rd(mdio_priv->hw, mdio_priv->mdio_base + off);
> +}

Please no static inline in source files. Compiler will know to inline
this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ