Re: [PATCH v9, 2/2] net: Add dm9051 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux