lkml.org 
[lkml]   [2020]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 6/9] net: phy: add backplane kr driver support
> +/* Backplane custom logging */
> +#define BPDEV_LOG(name) \
> + char log_buffer[LOG_BUFFER_SIZE]; \
> + va_list args; va_start(args, msg); \
> + vsnprintf(log_buffer, LOG_BUFFER_SIZE - 1, msg, args); \
> + if (!bpphy->attached_dev) \
> + dev_##name(&bpphy->mdio.dev, log_buffer); \
> + else \
> + dev_##name(&bpphy->mdio.dev, "%s: %s", \
> + netdev_name(bpphy->attached_dev), log_buffer); \
> + va_end(args)

> +void bpdev_err(struct phy_device *bpphy, char *msg, ...)
> +{
> + BPDEV_LOG(err);
> +}
> +EXPORT_SYMBOL(bpdev_err);
> +
> +void bpdev_warn(struct phy_device *bpphy, char *msg, ...)
> +{
> + BPDEV_LOG(warn);
> +}
> +EXPORT_SYMBOL(bpdev_warn);
> +
> +void bpdev_info(struct phy_device *bpphy, char *msg, ...)
> +{
> + BPDEV_LOG(info);
> +}
> +EXPORT_SYMBOL(bpdev_info);
> +
> +void bpdev_dbg(struct phy_device *bpphy, char *msg, ...)
> +{
> + BPDEV_LOG(dbg);
> +}
> +EXPORT_SYMBOL(bpdev_dbg);

You are currently modelling this as a phydev. So please just use
phydev_err(), phydev_info(), phydev_dbg() etc.

Also, if you look at other PHY code, struct phy_device * is nearly
always called phydev. Please try to be consistent with the existing
code base.

Andrew

\
 
 \ /
  Last update: 2020-03-27 15:23    [W:0.255 / U:2.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site