lkml.org 
[lkml]   [2021]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 5/6] MIPS: implement architecture dependent 'pci_remap_iospace()'
On Sat, Sep 25, 2021 at 8:10 PM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
> > It might be good to check that res->start is zero here, otherwise
> > the io_port_base would be off. That could happen if you ever have more
> > than one bridge.
>
> Do you mean something like the following?

Yes, exactly.

> int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr)
> {
> unsigned long vaddr;
> size_t size;
>
> if (res->start != 0) {
> // Should I WARN_ONCE or just show an error/warning message??
> WARN_ONCE(1, "resource start must be zero\n");
> return -ENODEV;
> }

I don't care if it's WARN(), WARN_ONCE() or pr_warn(). If we ever see the
message, the system is not working and the person who caused the problem
will figure it out.

Arnd

\
 
 \ /
  Last update: 2021-09-25 21:35    [W:0.055 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site