On 14 November 2018 at 16:39, Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > Hi Thomas, > > On 14/11/18 17:29, Thomas Huth wrote: >> Please don't. For rationale, see: >> https://www.kernel.org/doc/html/v4.19/process/coding-style.html#typedefs > > > Thanks for the pointer, I am interested in understanding why not do that. > However in the link you pasted I don't see a rational about enforcing > constness, I understand that since this case doesn't match the 5 rules, we > should use 'struct VMStateField' directly and remove the typedef.
QEMU's coding style is not the kernel's. In the kernel, yes, they prefer "struct foo". In QEMU we generally prefer to use a typedef for most structs. thanks -- PMM