Re: [PATCH net-next v2 6/9] net: phy: add backplane kr driver support

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

 



> +/* Backplane custom logging */
> +#define bpdev_fn(fn)							\
> +void bpdev_##fn(struct phy_device *phydev, char *fmt, ...)		\
> +{									\
> +	struct va_format vaf = {					\
> +		.fmt = fmt,						\
> +	};								\
> +	va_list args;							\
> +	va_start(args, fmt);						\
> +	vaf.va = &args;							\
> +	if (!phydev->attached_dev)					\
> +		dev_##fn(&phydev->mdio.dev, "%pV", &vaf);		\
> +	else								\
> +		dev_##fn(&phydev->mdio.dev, "%s: %pV",			\
> +			netdev_name(phydev->attached_dev), &vaf);	\
> +	va_end(args);							\
> +}
> +
> +bpdev_fn(err)
> +EXPORT_SYMBOL(bpdev_err);
> +
> +bpdev_fn(warn)
> +EXPORT_SYMBOL(bpdev_warn);
> +
> +bpdev_fn(info)
> +EXPORT_SYMBOL(bpdev_info);
> +
> +bpdev_fn(dbg)
> +EXPORT_SYMBOL(bpdev_dbg);

Didn't i say something about just using phydev_{err|warn|info|dbg}?

       Andrew



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux