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

Configure Feed

Select the types of activity you want to include in your feed.

phy: cadence-torrent: use swap() to make code cleaner

Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Link: https://lore.kernel.org/r/20211104065233.1833499-1-yang.guang5@zte.com.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Yang Guang and committed by
Vinod Koul
a4634629 b1f9f454

+2 -4
+2 -4
drivers/phy/cadence/phy-cadence-torrent.c
··· 2278 2278 struct cdns_torrent_vals *cmn_vals, *tx_ln_vals, *rx_ln_vals; 2279 2279 enum cdns_torrent_ref_clk ref_clk = cdns_phy->ref_clk_rate; 2280 2280 struct cdns_torrent_vals *link_cmn_vals, *xcvr_diag_vals; 2281 - enum cdns_torrent_phy_type phy_t1, phy_t2, tmp_phy_type; 2281 + enum cdns_torrent_phy_type phy_t1, phy_t2; 2282 2282 struct cdns_torrent_vals *pcs_cmn_vals; 2283 2283 int i, j, node, mlane, num_lanes, ret; 2284 2284 struct cdns_reg_pairs *reg_pairs; ··· 2304 2304 * configure the PHY for second link with phy_t2. 2305 2305 * Get the array values as [phy_t2][phy_t1][ssc]. 2306 2306 */ 2307 - tmp_phy_type = phy_t1; 2308 - phy_t1 = phy_t2; 2309 - phy_t2 = tmp_phy_type; 2307 + swap(phy_t1, phy_t2); 2310 2308 } 2311 2309 2312 2310 mlane = cdns_phy->phys[node].mlane;