Re: [PATCH] iscsi_ibft: Fix isa_bus_to_virt not working under ARM

From: Konrad Rzeszutek Wilk
Date: Thu Sep 02 2021 - 16:35:20 EST


On Thu, Sep 02, 2021 at 08:14:44PM +0300, Mike Rapoport wrote:
> On Thu, Sep 02, 2021 at 02:03:13PM +0000, Konrad Rzeszutek Wilk wrote:
> > The isa_bus_to_virt is only needed under X86 and in fact the code
> > that sets the ibft_phys_addr is only compiled under X86.
> >
> > As such lets just ifdef the code.
> >
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Reported-by: Vijayendra Suman <vijayendra.suman@xxxxxxxxxx>
> > CC: Maurizio Lombardi <mlombard@xxxxxxxxxx>
> > CC: Mike Rapoport <rppt@xxxxxxxxxx>
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> > ---
> > drivers/firmware/iscsi_ibft.c | 22 +++++++++++++++++-----
> > 1 file changed, 17 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
> > index 612a59e213df..7cde1a7a3ab1 100644
> > --- a/drivers/firmware/iscsi_ibft.c
> > +++ b/drivers/firmware/iscsi_ibft.c
> > @@ -86,7 +86,7 @@ MODULE_VERSION(IBFT_ISCSI_VERSION);
> >
> > static struct acpi_table_ibft *ibft_addr;
> >
> > -#ifndef CONFIG_ISCSI_IBFT_FIND
> > +#ifdef CONFIG_ISCSI_IBFT_FIND
> > phys_addr_t ibft_phys_addr;
> > #endif
>
> I think this declaration should be removed after you added
> acpi_find_ibft_region().
>
> Before your changes we had ibft_phys_addr defined in iscsi_ibft_find.c for
> CONFIG_ISCSI_IBFT_FIND=y and the declaration above was needed to avoid
> compilation error in ibft_init().
>
> With the only use of ibft_phys_addr hidden under #ifdef CONFIG_ISCSI_IBFT_FIND
> this declaration actually hides ibft_phys_addr defined in
> iscsi_ibft_find.c.

Yes good idea. I think this below will work rather nicely: