On Wed, 2024-10-02 at 14:11 +0200, Jan Beulich wrote:
> On 02.10.2024 13:25, oleksii.kuroc...@gmail.com wrote:
> > On Tue, 2024-10-01 at 17:49 +0200, Jan Beulich wrote:
> > > On 30.09.2024 17:08, Oleksii Kurochko wrote:
> > > > @@ -26,6 +27,8 @@ unsigned char __initdata
> > > > cpu0_boot_stack[STACK_SIZE]
> > > >  void __init noreturn start_xen(unsigned long bootcpu_id,
> > > >                                 paddr_t dtb_addr)
> > > >  {
> > > > +    struct bootmodule *xen_bootmodule;
> > > 
> > > With just the uses below this can be pointer-to-const. Question
> > > of
> > > course
> > > is whether you already know of further uses.
> > It could be dropped as it is used only for BUG_ON(!xen_bootmodule)
> > as
> > it looks to me a little bit better then:
> >     BUG_ON(!add_boot_module(BOOTMOD_XEN, virt_to_maddr(_start),
> >                             (_end - _start), false));
> 
> Yet that's undesirable for other reasons. Did you consider
> 
>     if ( !add_boot_module(BOOTMOD_XEN, virt_to_maddr(_start),
>                           _end - _start, false) )
>         BUG();
> 
> ? Maybe panic() would be even better for cases like this one.
It looks fine to me. Thanks for suggestion.

~ Oleksii


Reply via email to