On 1/17/2022 3:29 PM, Hector Martin wrote: > The alignment check was wrong (e.g. & 4 instead of & 3), and the logic > was also inefficient if the length was not a multiple of 4, since it > would needlessly fall back to copying the entire buffer bytewise. > > We already have a perfectly good memcpy_toio function, so just call that > instead of rolling our own copy logic here. brcmf_pcie_init_ringbuffers > was already using it anyway. > > Fixes: 9e37f045d5e7 ("brcmfmac: Adding PCIe bus layer support.") > Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel > Signed-off-by: Hector Martin > --- > .../broadcom/brcm80211/brcmfmac/pcie.c | 48 ++----------------- > 1 file changed, 4 insertions(+), 44 deletions(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c > index b1ae6c41013f..c25f48db1f60 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include As brcmf_pcie_init_ringbuffers was already using it I suppose this was already implicitly included. Still good to make it explicit. > #include > > #include