summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia/atlantic
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2020-11-08 04:11:59 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-11 02:24:49 +0300
commit3ec94da976fe10b6e4f74c8d35deef0a6c0dd743 (patch)
tree336503f0da5f9d7abf612bbfc0ed77c30c19ad9e /drivers/net/ethernet/aquantia/atlantic
parent30e2379e823309ee015043ffaa522cf5a0cd00b1 (diff)
downloadlinux-3ec94da976fe10b6e4f74c8d35deef0a6c0dd743.tar.xz
net: atlantic: Remove unnecessary conversion to bool
The '!=' expression itself is bool, no need to convert it to bool. Fix the following coccicheck warning: ./drivers/net/ethernet/aquantia/atlantic/aq_nic.c:1477:34-39: WARNING: conversion to bool not needed here Reported-by: Tosk Robot <tencent_os_robot@tencent.com> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Link: https://lore.kernel.org/r/1604797919-10157-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_nic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index bf5e0e9bd0e2..6c049864dac0 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -1474,7 +1474,7 @@ int aq_nic_setup_tc_mqprio(struct aq_nic_s *self, u32 tcs, u8 *prio_tc_map)
for (i = 0; i < sizeof(cfg->prio_tc_map); i++)
cfg->prio_tc_map[i] = cfg->tcs * i / 8;
- cfg->is_qos = (tcs != 0 ? true : false);
+ cfg->is_qos = !!tcs;
cfg->is_ptp = (cfg->tcs <= AQ_HW_PTP_TC);
if (!cfg->is_ptp)
netdev_warn(self->ndev, "%s\n",