All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/setup: Make setup.h header self contained
@ 2024-10-30 10:44 Frediano Ziglio
  2024-10-30 10:59 ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Frediano Ziglio @ 2024-10-30 10:44 UTC (permalink / raw)
  To: xen-devel
  Cc: Frediano Ziglio, Jan Beulich, Andrew Cooper, Roger Pau Monné

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(+)

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[];
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/setup: Make setup.h header self contained
  2024-10-30 10:44 [PATCH] x86/setup: Make setup.h header self contained Frediano Ziglio
@ 2024-10-30 10:59 ` Jan Beulich
  2024-10-30 11:15   ` Frediano Ziglio
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2024-10-30 10:59 UTC (permalink / raw)
  To: Frediano Ziglio; +Cc: Andrew Cooper, Roger Pau Monné, xen-devel

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/setup: Make setup.h header self contained
  2024-10-30 10:59 ` Jan Beulich
@ 2024-10-30 11:15   ` Frediano Ziglio
  2024-10-30 11:17     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Frediano Ziglio @ 2024-10-30 11:15 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Roger Pau Monné, xen-devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/setup: Make setup.h header self contained
  2024-10-30 11:15   ` Frediano Ziglio
@ 2024-10-30 11:17     ` Jan Beulich
  2024-10-30 11:35       ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2024-10-30 11:17 UTC (permalink / raw)
  To: Frediano Ziglio; +Cc: Andrew Cooper, Roger Pau Monné, xen-devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/setup: Make setup.h header self contained
  2024-10-30 11:17     ` Jan Beulich
@ 2024-10-30 11:35       ` Andrew Cooper
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2024-10-30 11:35 UTC (permalink / raw)
  To: Jan Beulich, Frediano Ziglio; +Cc: Roger Pau Monné, xen-devel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-30 11:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-30 10:44 [PATCH] x86/setup: Make setup.h header self contained Frediano Ziglio
2024-10-30 10:59 ` Jan Beulich
2024-10-30 11:15   ` Frediano Ziglio
2024-10-30 11:17     ` Jan Beulich
2024-10-30 11:35       ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.