Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ruan Jinjie and committed by
Jakub Kicinski
c7606d49 ae1d60c4

+3 -3
+2 -2
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
··· 61 61 62 62 static bool is_ptp_dev_cnf10kb(struct ptp *ptp) 63 63 { 64 - return (ptp->pdev->subsystem_device == PCI_SUBSYS_DEVID_CNF10K_B_PTP) ? true : false; 64 + return ptp->pdev->subsystem_device == PCI_SUBSYS_DEVID_CNF10K_B_PTP; 65 65 } 66 66 67 67 static bool is_ptp_dev_cn10k(struct ptp *ptp) 68 68 { 69 - return (ptp->pdev->device == PCI_DEVID_CN10K_PTP) ? true : false; 69 + return ptp->pdev->device == PCI_DEVID_CN10K_PTP; 70 70 } 71 71 72 72 static bool cn10k_ptp_errata(struct ptp *ptp)
+1 -1
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
··· 2027 2027 #endif 2028 2028 int txq; 2029 2029 2030 - qos_enabled = (netdev->real_num_tx_queues > pf->hw.tx_queues) ? true : false; 2030 + qos_enabled = netdev->real_num_tx_queues > pf->hw.tx_queues; 2031 2031 if (unlikely(qos_enabled)) { 2032 2032 /* This smp_load_acquire() pairs with smp_store_release() in 2033 2033 * otx2_qos_root_add() called from htb offload root creation