Message ID | 20191001180743.1041-1-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | serial: sh-sci: Use platform_get_irq_optional() for optional interrupts | expand |
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Wednesday, October 2, 2019 3:08 AM > > As platform_get_irq() now prints an error when the interrupt does not > exist, scary warnings may be printed for optional interrupts: > > sh-sci e6550000.serial: IRQ index 1 not found > sh-sci e6550000.serial: IRQ index 2 not found > sh-sci e6550000.serial: IRQ index 3 not found > sh-sci e6550000.serial: IRQ index 4 not found > sh-sci e6550000.serial: IRQ index 5 not found > > Fix this by calling platform_get_irq_optional() instead for all but the > first interrupts, which are optional. > > Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > This is a fix for v5.4-rc1. Thank you for the patch! Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> And, I tested this patch on R-Car H3. So, Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Best regards, Yoshihiro Shimoda
Hi Kbuild test robot, On Wed, Oct 2, 2019 at 11:53 AM kbuild test robot <lkp@intel.com> wrote: > I love your patch! Yet something to improve: > > [auto build test ERROR on tty/tty-testing] > [cannot apply to v5.4-rc1 next-20191001] Strange, this patch applies to all of v5.4-rc1, tty/tty-testing, and next-20191001? > url: https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/serial-sh-sci-Use-platform_get_irq_optional-for-optional-interrupts/20191002-171547 Oh, this is still the old tty/tty-testing before it was rebased to v5.4-rc1, i.e. still based on v5.3-rc4. That explains the build failure. That does not explain why you couldn't apply this patch to v5.4-rc1 and next-20191001, though. > base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing > config: sparc64-allmodconfig (attached as .config) > compiler: sparc64-linux-gcc (GCC) 7.4.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=7.4.0 make.cross ARCH=sparc64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > > drivers/tty/serial/sh-sci.c: In function 'sci_init_single': > >> drivers/tty/serial/sh-sci.c:2899:24: error: implicit declaration of function 'platform_get_irq_optional'; did you mean 'platform_get_irq_byname'? [-Werror=implicit-function-declaration] > sci_port->irqs[i] = platform_get_irq_optional(dev, i); > ^~~~~~~~~~~~~~~~~~~~~~~~~ > platform_get_irq_byname > cc1: some warnings being treated as errors FTR, not reproducible on sparc on v5.4-rc1, current tty/tty-testing, and next-20191001. Gr{oetje,eeting}s, Geert
Hi Geert, Thanks for your clarification. we are on vacation this week, and we'll take a look asap. Best Regards, Rong Chen On 10/2/2019 7:28 PM, Geert Uytterhoeven wrote: > Hi Kbuild test robot, > > On Wed, Oct 2, 2019 at 11:53 AM kbuild test robot <lkp@intel.com> wrote: >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on tty/tty-testing] >> [cannot apply to v5.4-rc1 next-20191001] > Strange, this patch applies to all of v5.4-rc1, tty/tty-testing, and > next-20191001? > >> url: https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/serial-sh-sci-Use-platform_get_irq_optional-for-optional-interrupts/20191002-171547 > Oh, this is still the old tty/tty-testing before it was rebased to v5.4-rc1, > i.e. still based on v5.3-rc4. That explains the build failure. > > That does not explain why you couldn't apply this patch to v5.4-rc1 and > next-20191001, though. > >> base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing >> config: sparc64-allmodconfig (attached as .config) >> compiler: sparc64-linux-gcc (GCC) 7.4.0 >> reproduce: >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # save the attached .config to linux build tree >> GCC_VERSION=7.4.0 make.cross ARCH=sparc64 >> >> If you fix the issue, kindly add following tag >> Reported-by: kbuild test robot <lkp@intel.com> >> >> All errors (new ones prefixed by >>): >> >> drivers/tty/serial/sh-sci.c: In function 'sci_init_single': >>>> drivers/tty/serial/sh-sci.c:2899:24: error: implicit declaration of function 'platform_get_irq_optional'; did you mean 'platform_get_irq_byname'? [-Werror=implicit-function-declaration] >> sci_port->irqs[i] = platform_get_irq_optional(dev, i); >> ^~~~~~~~~~~~~~~~~~~~~~~~~ >> platform_get_irq_byname >> cc1: some warnings being treated as errors > FTR, not reproducible on sparc on v5.4-rc1, current tty/tty-testing, and > next-20191001. > > Gr{oetje,eeting}s, > > Geert >
Quoting Geert Uytterhoeven (2019-10-01 11:07:43) > As platform_get_irq() now prints an error when the interrupt does not > exist, scary warnings may be printed for optional interrupts: > > sh-sci e6550000.serial: IRQ index 1 not found > sh-sci e6550000.serial: IRQ index 2 not found > sh-sci e6550000.serial: IRQ index 3 not found > sh-sci e6550000.serial: IRQ index 4 not found > sh-sci e6550000.serial: IRQ index 5 not found > > Fix this by calling platform_get_irq_optional() instead for all but the > first interrupts, which are optional. > > Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- Reviewed-by: Stephen Boyd <swboyd@chromium.org>
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 4e754a4850e6db63..22e5d4e13714e863 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2894,8 +2894,12 @@ static int sci_init_single(struct platform_device *dev, port->mapbase = res->start; sci_port->reg_size = resource_size(res); - for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) - sci_port->irqs[i] = platform_get_irq(dev, i); + for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) { + if (i) + sci_port->irqs[i] = platform_get_irq_optional(dev, i); + else + sci_port->irqs[i] = platform_get_irq(dev, i); + } /* The SCI generates several interrupts. They can be muxed together or * connected to different interrupt lines. In the muxed case only one
As platform_get_irq() now prints an error when the interrupt does not exist, scary warnings may be printed for optional interrupts: sh-sci e6550000.serial: IRQ index 1 not found sh-sci e6550000.serial: IRQ index 2 not found sh-sci e6550000.serial: IRQ index 3 not found sh-sci e6550000.serial: IRQ index 4 not found sh-sci e6550000.serial: IRQ index 5 not found Fix this by calling platform_get_irq_optional() instead for all but the first interrupts, which are optional. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- This is a fix for v5.4-rc1. --- drivers/tty/serial/sh-sci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)