[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 13/30] xen/riscv: introduce io.h
On Sun, 2024-02-18 at 19:07 +0000, Julien Grall wrote: > > > +/* > > + * Unordered I/O memory access primitives. These are even more > > relaxed than > > + * the relaxed versions, as they don't even order accesses between > > successive > > + * operations to the I/O regions. > > + */ > > +#define readb_cpu(c) ({ uint8_t __r = __raw_readb(c); > > __r; }) > > +#define readw_cpu(c) ({ uint16_t __r = > > le16_to_cpu((__force __le16)__raw_readw(c)); __r; }) > > +#define readl_cpu(c) ({ uint32_t __r = > > le32_to_cpu((__force __le32)__raw_readl(c)); __r; }) > > + > > +#define writeb_cpu(v,c) ((void)__raw_writeb(v,c)) > > +#define > > writew_cpu(v,c) ((void)__raw_writew((__force > > uint16_t)cpu_to_le16(v),c)) > > +#define > > writel_cpu(v,c) ((void)__raw_writel((__force > > uint32_t)cpu_to_le32(v),c)) > > NIT: __raw_write*() are already returning void. So I am not sure to > understand the pointer of the cast. IIUC, this is coming from Linux, > are > you intend to keep the code as-is (including style)? If not, then I > woudl consider to drop the cast on the three lines above and ... Changes have already been made in this header, so it makes sense to remove these casts. Thanks. ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |