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: <20211227174954.1411a643@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Mon, 27 Dec 2021 17:49:54 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Joseph CHAMG <josright123@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Rob Herring <robh+dt@...nel.org>, joseph_chang@...icom.com.tw,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Leon Romanovsky <leon@...nel.org>
Subject: Re: [PATCH v9, 2/2] net: Add dm9051 driver

On Mon, 27 Dec 2021 18:02:33 +0800 Joseph CHAMG wrote:
> +static inline void dm9051_phyup_lock(struct board_info *db)
> +{
> +	int val, ret;
> +
> +	mutex_lock(&db->addr_lock);
> +
> +	ret = dm9051_phy_read(db, MII_BMCR, &val);
> +	if (ret)
> +		return;
> +
> +	/* BMCR Power-up PHY */
> +	ret = dm9051_phy_write(db, MII_BMCR, val & ~0x0800);
> +	if (ret)
> +		return;
> +
> +	/* GPR Power-up PHY */
> +	dm9051_iow(db, DM9051_GPR, 0);
> +	mdelay(1); /* need for activate phyxcer */
> +
> +	mutex_unlock(&db->addr_lock);
> +}
> +
> +static inline void dm9051_phydown_lock(struct board_info *db)
> +{
> +	mutex_lock(&db->addr_lock);
> +	dm9051_iow(db, DM9051_GPR, 0x01); /* Power-Down PHY */
> +	mutex_unlock(&db->addr_lock);
> +}

Please remove the 'inline' qualifier from functions in C sources.
Compiler will know which static functions to inline these days.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ