lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] igb: Fix a test with HWTSTAMP_TX_ON
Date
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Christophe JAILLET
> Sent: Tuesday, February 6, 2018 11:48 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe
> JAILLET <christophe.jaillet@wanadoo.fr>
> Subject: [PATCH] igb: Fix a test with HWTSTAMP_TX_ON
>
> 'HWTSTAMP_TX_ON' should be handled as a value, not as a bit mask.
> The modified code should behave the same, because HWTSTAMP_TX_ON is
> 1
> and no other possible values of 'tx_type' would match the test.
> However, this is more future-proof, should other values be allowed one day.
>
> See 'struct hwtstamp_config' in 'include/uapi/linux/net_tstamp.h'
>
> This fixes a warning reported by smatch:
> igb_xmit_frame_ring() warn: bit shifter 'HWTSTAMP_TX_ON' used for
> logical '&'
>
> Fixes: 26bd4e2db06be ("igb: protect TX timestamping from API misuse")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Tested-by: Aaron Brown <aaron.f.brown@intel.com>
\
 
 \ /
  Last update: 2018-02-13 21:54    [W:0.038 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site