> From: Brian Norris [mailto:[email protected]] > > Hi, > > > > > +static inline void > > +_rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 > data) > > +{ > > + rtw_write32_mask(rtwdev, addr, mask, data); > > + rtw_write32_mask(rtwdev, addr + 0x200, mask, data); > > +} > > + > > +/* 0xC00-0xCFF and 0xE00-0xEFF have the same layout */ > > Feels like this belongs with _rtw_write32s_mask() now, not here? Yeah. > > > +#define rtw_write32s_mask(rtwdev, addr, mask, data) > > \ > > + do { \ > > + BUILD_BUG_ON(addr < 0xC00 || addr >= 0xD00); \ > > You probably want parentheses around the 'addr'. You *probably* won't > run into trouble with this particular macro, but if the caller is doing > the wrong kinds of comparisons or arithmetic, this might not work they > way you want. Should add parentheses to protect in case of some coding mistakes. Thanks > > Brian > > > + \ > > + _rtw_write32s_mask(rtwdev, addr, mask, data); \ > > + } while (0) > > + > > /* phy status page0 */ > > #define GET_PHY_STAT_P0_PWDB(phy_stat) > \ > > le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) > > -- Yan-Hsuan
- [PATCH 12/24] rtw88: add module param to switch lps supportab... yhchuang
- [PATCH 21/24] rtw88: do not count dummy tail into rx counter yhchuang
- [PATCH 14/24] rtw88: add 8822c tx agc support yhchuang
- [PATCH 16/24] rtw88: 8822c: add support for DACK yhchuang
- [PATCH 23/24] rtw88: fix slot time value yhchuang
- [PATCH 13/24] rtw88: add 8822c tx power index table parsing s... yhchuang
- [PATCH 05/24] rtw88: add a delay after writing a rf register yhchuang
- [PATCH 18/24] rtw88: 8822c: set ack timeout yhchuang
- [PATCH 24/24] rtw88: 8822b: turn rtw_write32s_mask into macro yhchuang
- Re: [PATCH 24/24] rtw88: 8822b: turn rtw_write32s_mask i... Brian Norris
- RE: [PATCH 24/24] rtw88: 8822b: turn rtw_write32s_ma... Tony Chuang
- [PATCH 15/24] rtw88: extract utility functions into util.c yhchuang
- [PATCH 01/24] rtw88: report correct tx status if mac80211 req... yhchuang
- [PATCH 06/24] rtw88: 8822c: correct crystal setting yhchuang
- [PATCH 02/24] rtw88: add get_c2h_from_skb for extracting c2h ... yhchuang
- [PATCH 11/24] rtw88: 8822c: update trx mode setting yhchuang
- [PATCH 10/24] rtw88: 8822c: update channel setting yhchuang
- [PATCH 17/24] rtw88: 8822c: fix RSC setting yhchuang
