From: Lorenzo Bianconi Date: Sat, 16 Mar 2019 15:45:36 +0000 (+0100) Subject: mt7603: core: do not use magic numbers in mt7603_reg_map X-Git-Tag: v5.15~6431^2~37^2~4^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e04ba6aa34bc079705eefdfdb71939d40c6c842;p=platform%2Fkernel%2Flinux-starfive.git mt7603: core: do not use magic numbers in mt7603_reg_map Use register definitions instead of magic numbers in mt7603_reg_map Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/core.c b/drivers/net/wireless/mediatek/mt76/mt7603/core.c index e32a16f..4668c57 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/core.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/core.c @@ -53,8 +53,8 @@ irqreturn_t mt7603_irq_handler(int irq, void *dev_instance) u32 mt7603_reg_map(struct mt7603_dev *dev, u32 addr) { - u32 base = addr & GENMASK(31, 19); - u32 offset = addr & GENMASK(18, 0); + u32 base = addr & MT_MCU_PCIE_REMAP_2_BASE; + u32 offset = addr & MT_MCU_PCIE_REMAP_2_OFFSET; dev->bus_ops->wr(&dev->mt76, MT_MCU_PCIE_REMAP_2, base);