On Tue, Feb 1, 2022 at 10:43 AM Richard Henderson < richard.henderson@linaro.org> wrote: > On 2/1/22 22:14, Warner Losh wrote: > > +#ifndef BSD_FILE_H_ > > +#define BSD_FILE_H_ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > Many of these should be done by "qemu/osdep.h" already. Otherwise I > question putting them > into this header, as opposed to as needed by other syscall handling c > files. > I can remove the ones that are done by qemu/osdep.h easily enough. That's changed over time and these used to be required. I'm hesitant to remove the others since that's starting to get into restructuring the code we have working upstream. On the other hand, the ordering of these files make it such that these are often included just once, so moving to a bsd-file.h that's just the functions and bsd-file.c that's the definition and relying on LTO to optimize. That would make things less fragile than they are now. So I'm torn since part of floating these patches is to do a small sliver to get feedback... I may need to sleep on this to figure out how to weigh the 'cleaner code' vs 'risk of introducing regressions during refactoring'. Warner