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

bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA

An earlier commit re-worked the setting of the bitmask and is now
assigning v with some bit flags rather than bitwise or-ing them
into v, consequently the earlier bit-settings of v are being lost.
Fix this by replacing an assignment with the bitwise or instead.

Addresses-Coverity: ("Unused value")
Fixes: 2be25cac8402 ("bcma: add constants for PCI and use them")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Colin Ian King and committed by
Kalle Valo
420c20be 5f42b382

+2 -2
+2 -2
drivers/bcma/driver_pci.c
··· 78 78 v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD); 79 79 } 80 80 81 - v = BCMA_CORE_PCI_MDIODATA_START; 81 + v |= BCMA_CORE_PCI_MDIODATA_START; 82 82 v |= BCMA_CORE_PCI_MDIODATA_READ; 83 83 v |= BCMA_CORE_PCI_MDIODATA_TA; 84 84 ··· 121 121 v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD); 122 122 } 123 123 124 - v = BCMA_CORE_PCI_MDIODATA_START; 124 + v |= BCMA_CORE_PCI_MDIODATA_START; 125 125 v |= BCMA_CORE_PCI_MDIODATA_WRITE; 126 126 v |= BCMA_CORE_PCI_MDIODATA_TA; 127 127 v |= data;