Skip to content

Commit

Permalink
mellanox: Change en_print to return void
Browse files Browse the repository at this point in the history
No caller or macro uses the return value so make it void.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Sep 26, 2014
1 parent b4fc1a4 commit 0c87b29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
17 changes: 7 additions & 10 deletions drivers/net/ethernet/mellanox/mlx4/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,24 @@ MLX4_EN_PARM_INT(inline_thold, MAX_INLINE,
#define MAX_PFC_TX 0xff
#define MAX_PFC_RX 0xff

int en_print(const char *level, const struct mlx4_en_priv *priv,
const char *format, ...)
void en_print(const char *level, const struct mlx4_en_priv *priv,
const char *format, ...)
{
va_list args;
struct va_format vaf;
int i;

va_start(args, format);

vaf.fmt = format;
vaf.va = &args;
if (priv->registered)
i = printk("%s%s: %s: %pV",
level, DRV_NAME, priv->dev->name, &vaf);
printk("%s%s: %s: %pV",
level, DRV_NAME, priv->dev->name, &vaf);
else
i = printk("%s%s: %s: Port %d: %pV",
level, DRV_NAME, dev_name(&priv->mdev->pdev->dev),
priv->port, &vaf);
printk("%s%s: %s: Port %d: %pV",
level, DRV_NAME, dev_name(&priv->mdev->pdev->dev),
priv->port, &vaf);
va_end(args);

return i;
}

void mlx4_en_update_loopback_state(struct net_device *dev,
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ extern const struct ethtool_ops mlx4_en_ethtool_ops;
*/

__printf(3, 4)
int en_print(const char *level, const struct mlx4_en_priv *priv,
const char *format, ...);
void en_print(const char *level, const struct mlx4_en_priv *priv,
const char *format, ...);

#define en_dbg(mlevel, priv, format, ...) \
do { \
Expand Down

0 comments on commit 0c87b29

Please sign in to comment.