On 8 March 2017 at 15:54, Liping Zhang <zlpnobody@xxxxxxx> wrote: > > +/* Store/load an u16 or u8 integer to/from the u32 data register. > + * > + * Note, when using concatenations, register allocation happens at 32-bit > + * level. So for store instruction, pad the rest part with zero to avoid > + * garbage values. > + */ > + > +static inline void nft_reg_store16(u32 *dreg, u16 val) > +{ > + *dreg = 0; > + *(u16 *)dreg = val; > +} > + > +static inline void nft_reg_store8(u32 *dreg, u8 val) > +{ > + *dreg = 0; > + *(u8 *)dreg = val; > +} > + Any chance the compiler detects the double assignment and removes the first one? -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html