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] [day] [month] [year] [list]
Date:   Fri, 27 Jan 2017 11:34:00 +0000
From:   Edward Cree <ecree@...arflare.com>
To:     David Miller <davem@...emloft.net>
CC:     <linux-net-drivers@...arflare.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] sfc: refactor debug-or-warnings printks

On 26/01/17 19:36, David Miller wrote:
> 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.

Sure.  I'll put this in netdevice.h and respin.

-Ed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ