[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] ring.h: introduce macros to handle monodirectional rings with multiple req sizes
>>> On 21.02.17 at 02:32, <sstabellini@xxxxxxxxxx> wrote: > +static inline void name##_read_packet(char *buf, > \ > + RING_IDX *masked_prod, RING_IDX *masked_cons, > \ The const/indirection problems is still there. > +static inline void name##_write_packet(char *buf, > \ > + RING_IDX *masked_prod, RING_IDX *masked_cons, > \ > + RING_IDX ring_size, packet_t *h) { > \ Same here - it being a pointer now, the last parameter should then be a pointer to const (and you shouldn't cast away constness below). > +struct name##_data_intf { > \ > + RING_IDX in_cons, in_prod; > \ > + > \ > + uint8_t pad1[56]; > \ > + > \ > + RING_IDX out_cons, out_prod; > \ > + > \ > + uint8_t pad2[56]; > \ > + > \ > + RING_IDX ring_order; > \ > + grant_ref_t ref[]; > \ > +}; The use of a variable sized array here should also be mentioned as an exception from the C89-compatibility rule in the description. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |