Re: [PATCH v9 15/25] block/rnbd: private headers with rnbd protocol structs and helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 1, 2020 at 3:12 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> On 2020-02-21 02:47, Jack Wang wrote:
> > +/**
> > + * struct rnbd_msg_hdr - header of RNBD messages
> > + * @type:    Message type, valid values see: enum rnbd_msg_types
> > + */
> > +struct rnbd_msg_hdr {
> > +     __le16          type;
> > +     __le16          __padding;
> > +};
>
> Please add a BUILD_BUG_ON() somewhere that checks the size of the
> structures that represent the wire protocol.
Ok, will do
>
> > +static inline u32 rnbd_op(u32 flags)
> > +{
> > +     return (flags & RNBD_OP_MASK);
> > +}
> > +
> > +static inline u32 rnbd_flags(u32 flags)
> > +{
> > +     return (flags & ~RNBD_OP_MASK);
> > +}
>
> No parentheses around returned values please.
will fix.
>
> Thanks,
>
> Bart.
Thanks Bart!



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux