On Tue, 11 Feb 2025 16:49:54 +0800 Wenbo Cao <caowe...@mucse.com> wrote:
> +static inline u32 > +rnp_reg_read32(void *base, size_t offset) > +{ > + unsigned int v = rte_read32(((u8 *)base + offset)); > + > + RNP_PMD_REG_LOG(DEBUG, "offset=0x%08lx val=0x%04x", > + (unsigned long)offset, v); > + return v; > +} Why not use uint32_t here? Why not use const? Why the extra parens? static inline u32 rnp_reg_read32(const void *base, size_t offset) { u32 v = rte_read32((const u8 *)base + offset); RNP_PMD_REG_LOG(DEBUG, "offset=%p val=%#" PRIx32, offset, v); }