summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/nic
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-08-01 14:26:38 +0300
committerJakub Kicinski <kuba@kernel.org>2023-08-02 22:08:27 +0300
commitc7606d49e6093e9a66ffd1c5dfb294a4f8836dba (patch)
tree30635c0947340a5a9396ec58f6f732b6084752f6 /drivers/net/ethernet/marvell/octeontx2/nic
parentae1d60c41e581be049aa84dd53aca89027101ce1 (diff)
downloadlinux-c7606d49e6093e9a66ffd1c5dfb294a4f8836dba.tar.xz
octeontx2: Remove unnecessary ternary operators
There are a little ternary operators, the true or false judgement of which is unnecessary in C language semantics. So remove it to clean Code. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Sunil Goutham <sgoutham@marvell.com> Link: https://lore.kernel.org/r/20230801112638.317149-1-ruanjinjie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/nic')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 9551b422622a..61f62a6ec662 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -2027,7 +2027,7 @@ u16 otx2_select_queue(struct net_device *netdev, struct sk_buff *skb,
#endif
int txq;
- qos_enabled = (netdev->real_num_tx_queues > pf->hw.tx_queues) ? true : false;
+ qos_enabled = netdev->real_num_tx_queues > pf->hw.tx_queues;
if (unlikely(qos_enabled)) {
/* This smp_load_acquire() pairs with smp_store_release() in
* otx2_qos_root_add() called from htb offload root creation