Re: [PATCH 04/17] staging:rtl8192u: Rename eqMacAddr macro - Style

From: John Whitmore
Date: Wed Aug 08 2018 - 04:53:01 EST


On Wed, Aug 08, 2018 at 01:12:53AM -0700, Joe Perches wrote:
> On Tue, 2018-08-07 at 22:12 +0100, John Whitmore wrote:
> > The eqMacAddr(a, b) macro causes a checkpatch issue, due to CamelCase
> > naming, so has been renamed to eq_mac_addr(a, b).
> >
> > This is a coding style change which should not impact on runtime code
> > execution.
> []
> > diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
> []
> > @@ -30,7 +30,7 @@ struct rt_dot11d_info {
> > enum dot11d_state state;
> > };
> >
> > -#define eqMacAddr(a, b) (((a)[0] == (b)[0] && \
> > +#define eq_mac_addr(a, b) (((a)[0] == (b)[0] && \
> > (a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && \
> > (a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0)
>
> I'd check to see if the etherdevice.h ether_addr_equal
> would be used instead of this macro.
>

Deadly thanks a million for that input! That Macro gives a checkpatch
warning about the obvious side effects, which I have yet to tackle. I'm
cherry picking the easy stuff ;) getting to know my way around.

I'll check that other macro later today and hopefully reissue a better
v2 of the series. (same for your second email on the other macro)

thanks again.