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: <20170126.143629.337763461510725581.davem@davemloft.net>
Date:   Thu, 26 Jan 2017 14:36:29 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     ecree@...arflare.com
Cc:     linux-net-drivers@...arflare.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] sfc: refactor debug-or-warnings printks

From: Edward Cree <ecree@...arflare.com>
Date: Thu, 26 Jan 2017 17:53:48 +0000

> diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
> index 5927c20..c640955 100644
> --- a/drivers/net/ethernet/sfc/net_driver.h
> +++ b/drivers/net/ethernet/sfc/net_driver.h
> @@ -51,6 +51,15 @@
>  #define EFX_WARN_ON_PARANOID(x) do {} while (0)
>  #endif
>  
> +/* if @cond then downgrade to debug, else print at @level */
> +#define netif_cond_dbg(priv, type, netdev, cond, level, fmt, args...)     \
> +	do {                                                              \
> +		if (cond)                                                 \
> +			netif_dbg(priv, type, netdev, fmt, ##args);       \
> +		else                                                      \
> +			netif_ ## level(priv, type, netdev, fmt, ##args); \
> +	} while (0)
> +
>  /**************************************************************************
>   *
>   * Efx data structures
> 

Please do not define locally in a driver an interface that looks like a generic
one and might be useful to code outside of your driver.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ