Message ID | 20241030104406.2173357-1-frediano.ziglio@cloud.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86/setup: Make setup.h header self contained | expand |
On 30.10.2024 11:44, Frediano Ziglio wrote: > The header uses rangeset structure typedef which definition > is not included. And it doesn't need to be. For int remove_xen_ranges(struct rangeset *r); we don't need ... > --- a/xen/arch/x86/include/asm/setup.h > +++ b/xen/arch/x86/include/asm/setup.h > @@ -2,6 +2,7 @@ > #define __X86_SETUP_H_ > > #include <xen/multiboot.h> > +#include <xen/rangeset.h> > #include <asm/numa.h> > > extern const char __2M_text_start[], __2M_text_end[]; ... this, a mere struct rangeset; forward decl will suffice. Jan
On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich <jbeulich@suse.com> wrote: > > On 30.10.2024 11:44, Frediano Ziglio wrote: > > The header uses rangeset structure typedef which definition > > is not included. > > And it doesn't need to be. For > > int remove_xen_ranges(struct rangeset *r); > > we don't need ... > > > --- a/xen/arch/x86/include/asm/setup.h > > +++ b/xen/arch/x86/include/asm/setup.h > > @@ -2,6 +2,7 @@ > > #define __X86_SETUP_H_ > > > > #include <xen/multiboot.h> > > +#include <xen/rangeset.h> > > #include <asm/numa.h> > > > > extern const char __2M_text_start[], __2M_text_end[]; > > ... this, a mere > > struct rangeset; > > forward decl will suffice. > > Jan > It's true, but for the same reason, we could avoid including "xen/multiboot.h" and use "struct module" instead of "module_t". Frediano
On 30.10.2024 12:15, Frediano Ziglio wrote: > On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich <jbeulich@suse.com> wrote: >> >> On 30.10.2024 11:44, Frediano Ziglio wrote: >>> The header uses rangeset structure typedef which definition >>> is not included. >> >> And it doesn't need to be. For >> >> int remove_xen_ranges(struct rangeset *r); >> >> we don't need ... >> >>> --- a/xen/arch/x86/include/asm/setup.h >>> +++ b/xen/arch/x86/include/asm/setup.h >>> @@ -2,6 +2,7 @@ >>> #define __X86_SETUP_H_ >>> >>> #include <xen/multiboot.h> >>> +#include <xen/rangeset.h> >>> #include <asm/numa.h> >>> >>> extern const char __2M_text_start[], __2M_text_end[]; >> >> ... this, a mere >> >> struct rangeset; >> >> forward decl will suffice. >> >> Jan >> > > It's true, but for the same reason, we could avoid including > "xen/multiboot.h" and use "struct module" instead of "module_t". Indeed. I'd even question the need for that typedef. Jan
On 30/10/2024 11:17 am, Jan Beulich wrote: > On 30.10.2024 12:15, Frediano Ziglio wrote: >> On Wed, Oct 30, 2024 at 10:59 AM Jan Beulich <jbeulich@suse.com> wrote: >>> On 30.10.2024 11:44, Frediano Ziglio wrote: >>>> The header uses rangeset structure typedef which definition >>>> is not included. >>> And it doesn't need to be. For >>> >>> int remove_xen_ranges(struct rangeset *r); >>> >>> we don't need ... >>> >>>> --- a/xen/arch/x86/include/asm/setup.h >>>> +++ b/xen/arch/x86/include/asm/setup.h >>>> @@ -2,6 +2,7 @@ >>>> #define __X86_SETUP_H_ >>>> >>>> #include <xen/multiboot.h> >>>> +#include <xen/rangeset.h> >>>> #include <asm/numa.h> >>>> >>>> extern const char __2M_text_start[], __2M_text_end[]; >>> ... this, a mere >>> >>> struct rangeset; >>> >>> forward decl will suffice. >>> >>> Jan >>> >> It's true, but for the same reason, we could avoid including >> "xen/multiboot.h" and use "struct module" instead of "module_t". > Indeed. I'd even question the need for that typedef. Please don't got playing with includes of multiboot.h. All you'll do is interfere with Daniel's in-progress series. Most includes are getting removed. ~Andrew
diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 4874ee8936..e4e96b36bd 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -2,6 +2,7 @@ #define __X86_SETUP_H_ #include <xen/multiboot.h> +#include <xen/rangeset.h> #include <asm/numa.h> extern const char __2M_text_start[], __2M_text_end[];
The header uses rangeset structure typedef which definition is not included. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> --- xen/arch/x86/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+)