All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: kbuild-all@01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Stephen Boyd <swboyd@chromium.org>,
	linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] serial: sh-sci: Use platform_get_irq_optional() for optional interrupts
Date: Wed, 2 Oct 2019 17:52:34 +0800	[thread overview]
Message-ID: <201910021701.JBV8khAI%lkp@intel.com> (raw)
In-Reply-To: <20191001180743.1041-1-geert+renesas@glider.be>

[-- Attachment #1: Type: text/plain, Size: 5614 bytes --]

Hi Geert,

I love your patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[cannot apply to v5.4-rc1 next-20191001]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/serial-sh-sci-Use-platform_get_irq_optional-for-optional-interrupts/20191002-171547
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

vim +2899 drivers/tty/serial/sh-sci.c

  2874	
  2875	static int sci_init_single(struct platform_device *dev,
  2876				   struct sci_port *sci_port, unsigned int index,
  2877				   const struct plat_sci_port *p, bool early)
  2878	{
  2879		struct uart_port *port = &sci_port->port;
  2880		const struct resource *res;
  2881		unsigned int i;
  2882		int ret;
  2883	
  2884		sci_port->cfg	= p;
  2885	
  2886		port->ops	= &sci_uart_ops;
  2887		port->iotype	= UPIO_MEM;
  2888		port->line	= index;
  2889	
  2890		res = platform_get_resource(dev, IORESOURCE_MEM, 0);
  2891		if (res == NULL)
  2892			return -ENOMEM;
  2893	
  2894		port->mapbase = res->start;
  2895		sci_port->reg_size = resource_size(res);
  2896	
  2897		for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
  2898			if (i)
> 2899				sci_port->irqs[i] = platform_get_irq_optional(dev, i);
  2900			else
  2901				sci_port->irqs[i] = platform_get_irq(dev, i);
  2902		}
  2903	
  2904		/* The SCI generates several interrupts. They can be muxed together or
  2905		 * connected to different interrupt lines. In the muxed case only one
  2906		 * interrupt resource is specified as there is only one interrupt ID.
  2907		 * In the non-muxed case, up to 6 interrupt signals might be generated
  2908		 * from the SCI, however those signals might have their own individual
  2909		 * interrupt ID numbers, or muxed together with another interrupt.
  2910		 */
  2911		if (sci_port->irqs[0] < 0)
  2912			return -ENXIO;
  2913	
  2914		if (sci_port->irqs[1] < 0)
  2915			for (i = 1; i < ARRAY_SIZE(sci_port->irqs); i++)
  2916				sci_port->irqs[i] = sci_port->irqs[0];
  2917	
  2918		sci_port->params = sci_probe_regmap(p);
  2919		if (unlikely(sci_port->params == NULL))
  2920			return -EINVAL;
  2921	
  2922		switch (p->type) {
  2923		case PORT_SCIFB:
  2924			sci_port->rx_trigger = 48;
  2925			break;
  2926		case PORT_HSCIF:
  2927			sci_port->rx_trigger = 64;
  2928			break;
  2929		case PORT_SCIFA:
  2930			sci_port->rx_trigger = 32;
  2931			break;
  2932		case PORT_SCIF:
  2933			if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
  2934				/* RX triggering not implemented for this IP */
  2935				sci_port->rx_trigger = 1;
  2936			else
  2937				sci_port->rx_trigger = 8;
  2938			break;
  2939		default:
  2940			sci_port->rx_trigger = 1;
  2941			break;
  2942		}
  2943	
  2944		sci_port->rx_fifo_timeout = 0;
  2945		sci_port->hscif_tot = 0;
  2946	
  2947		/* SCIFA on sh7723 and sh7724 need a custom sampling rate that doesn't
  2948		 * match the SoC datasheet, this should be investigated. Let platform
  2949		 * data override the sampling rate for now.
  2950		 */
  2951		sci_port->sampling_rate_mask = p->sampling_rate
  2952					     ? SCI_SR(p->sampling_rate)
  2953					     : sci_port->params->sampling_rate_mask;
  2954	
  2955		if (!early) {
  2956			ret = sci_init_clocks(sci_port, &dev->dev);
  2957			if (ret < 0)
  2958				return ret;
  2959	
  2960			port->dev = &dev->dev;
  2961	
  2962			pm_runtime_enable(&dev->dev);
  2963		}
  2964	
  2965		port->type		= p->type;
  2966		port->flags		= UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
  2967		port->fifosize		= sci_port->params->fifosize;
  2968	
  2969		if (port->type == PORT_SCI) {
  2970			if (sci_port->reg_size >= 0x20)
  2971				port->regshift = 2;
  2972			else
  2973				port->regshift = 1;
  2974		}
  2975	
  2976		/*
  2977		 * The UART port needs an IRQ value, so we peg this to the RX IRQ
  2978		 * for the multi-IRQ ports, which is where we are primarily
  2979		 * concerned with the shutdown path synchronization.
  2980		 *
  2981		 * For the muxed case there's nothing more to do.
  2982		 */
  2983		port->irq		= sci_port->irqs[SCIx_RXI_IRQ];
  2984		port->irqflags		= 0;
  2985	
  2986		port->serial_in		= sci_serial_in;
  2987		port->serial_out	= sci_serial_out;
  2988	
  2989		return 0;
  2990	}
  2991	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58676 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Stephen Boyd <swboyd@chromium.org>,
	linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] serial: sh-sci: Use platform_get_irq_optional() for optional interrupts
Date: Wed, 2 Oct 2019 17:52:34 +0800	[thread overview]
Message-ID: <201910021701.JBV8khAI%lkp@intel.com> (raw)
In-Reply-To: <20191001180743.1041-1-geert+renesas@glider.be>

[-- Attachment #1: Type: text/plain, Size: 5614 bytes --]

Hi Geert,

I love your patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[cannot apply to v5.4-rc1 next-20191001]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/serial-sh-sci-Use-platform_get_irq_optional-for-optional-interrupts/20191002-171547
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

vim +2899 drivers/tty/serial/sh-sci.c

  2874	
  2875	static int sci_init_single(struct platform_device *dev,
  2876				   struct sci_port *sci_port, unsigned int index,
  2877				   const struct plat_sci_port *p, bool early)
  2878	{
  2879		struct uart_port *port = &sci_port->port;
  2880		const struct resource *res;
  2881		unsigned int i;
  2882		int ret;
  2883	
  2884		sci_port->cfg	= p;
  2885	
  2886		port->ops	= &sci_uart_ops;
  2887		port->iotype	= UPIO_MEM;
  2888		port->line	= index;
  2889	
  2890		res = platform_get_resource(dev, IORESOURCE_MEM, 0);
  2891		if (res == NULL)
  2892			return -ENOMEM;
  2893	
  2894		port->mapbase = res->start;
  2895		sci_port->reg_size = resource_size(res);
  2896	
  2897		for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
  2898			if (i)
> 2899				sci_port->irqs[i] = platform_get_irq_optional(dev, i);
  2900			else
  2901				sci_port->irqs[i] = platform_get_irq(dev, i);
  2902		}
  2903	
  2904		/* The SCI generates several interrupts. They can be muxed together or
  2905		 * connected to different interrupt lines. In the muxed case only one
  2906		 * interrupt resource is specified as there is only one interrupt ID.
  2907		 * In the non-muxed case, up to 6 interrupt signals might be generated
  2908		 * from the SCI, however those signals might have their own individual
  2909		 * interrupt ID numbers, or muxed together with another interrupt.
  2910		 */
  2911		if (sci_port->irqs[0] < 0)
  2912			return -ENXIO;
  2913	
  2914		if (sci_port->irqs[1] < 0)
  2915			for (i = 1; i < ARRAY_SIZE(sci_port->irqs); i++)
  2916				sci_port->irqs[i] = sci_port->irqs[0];
  2917	
  2918		sci_port->params = sci_probe_regmap(p);
  2919		if (unlikely(sci_port->params == NULL))
  2920			return -EINVAL;
  2921	
  2922		switch (p->type) {
  2923		case PORT_SCIFB:
  2924			sci_port->rx_trigger = 48;
  2925			break;
  2926		case PORT_HSCIF:
  2927			sci_port->rx_trigger = 64;
  2928			break;
  2929		case PORT_SCIFA:
  2930			sci_port->rx_trigger = 32;
  2931			break;
  2932		case PORT_SCIF:
  2933			if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
  2934				/* RX triggering not implemented for this IP */
  2935				sci_port->rx_trigger = 1;
  2936			else
  2937				sci_port->rx_trigger = 8;
  2938			break;
  2939		default:
  2940			sci_port->rx_trigger = 1;
  2941			break;
  2942		}
  2943	
  2944		sci_port->rx_fifo_timeout = 0;
  2945		sci_port->hscif_tot = 0;
  2946	
  2947		/* SCIFA on sh7723 and sh7724 need a custom sampling rate that doesn't
  2948		 * match the SoC datasheet, this should be investigated. Let platform
  2949		 * data override the sampling rate for now.
  2950		 */
  2951		sci_port->sampling_rate_mask = p->sampling_rate
  2952					     ? SCI_SR(p->sampling_rate)
  2953					     : sci_port->params->sampling_rate_mask;
  2954	
  2955		if (!early) {
  2956			ret = sci_init_clocks(sci_port, &dev->dev);
  2957			if (ret < 0)
  2958				return ret;
  2959	
  2960			port->dev = &dev->dev;
  2961	
  2962			pm_runtime_enable(&dev->dev);
  2963		}
  2964	
  2965		port->type		= p->type;
  2966		port->flags		= UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
  2967		port->fifosize		= sci_port->params->fifosize;
  2968	
  2969		if (port->type == PORT_SCI) {
  2970			if (sci_port->reg_size >= 0x20)
  2971				port->regshift = 2;
  2972			else
  2973				port->regshift = 1;
  2974		}
  2975	
  2976		/*
  2977		 * The UART port needs an IRQ value, so we peg this to the RX IRQ
  2978		 * for the multi-IRQ ports, which is where we are primarily
  2979		 * concerned with the shutdown path synchronization.
  2980		 *
  2981		 * For the muxed case there's nothing more to do.
  2982		 */
  2983		port->irq		= sci_port->irqs[SCIx_RXI_IRQ];
  2984		port->irqflags		= 0;
  2985	
  2986		port->serial_in		= sci_serial_in;
  2987		port->serial_out	= sci_serial_out;
  2988	
  2989		return 0;
  2990	}
  2991	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58676 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] serial: sh-sci: Use platform_get_irq_optional() for optional interrupts
Date: Wed, 02 Oct 2019 17:52:34 +0800	[thread overview]
Message-ID: <201910021701.JBV8khAI%lkp@intel.com> (raw)
In-Reply-To: <20191001180743.1041-1-geert+renesas@glider.be>

[-- Attachment #1: Type: text/plain, Size: 5770 bytes --]

Hi Geert,

I love your patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[cannot apply to v5.4-rc1 next-20191001]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/serial-sh-sci-Use-platform_get_irq_optional-for-optional-interrupts/20191002-171547
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

vim +2899 drivers/tty/serial/sh-sci.c

  2874	
  2875	static int sci_init_single(struct platform_device *dev,
  2876				   struct sci_port *sci_port, unsigned int index,
  2877				   const struct plat_sci_port *p, bool early)
  2878	{
  2879		struct uart_port *port = &sci_port->port;
  2880		const struct resource *res;
  2881		unsigned int i;
  2882		int ret;
  2883	
  2884		sci_port->cfg	= p;
  2885	
  2886		port->ops	= &sci_uart_ops;
  2887		port->iotype	= UPIO_MEM;
  2888		port->line	= index;
  2889	
  2890		res = platform_get_resource(dev, IORESOURCE_MEM, 0);
  2891		if (res == NULL)
  2892			return -ENOMEM;
  2893	
  2894		port->mapbase = res->start;
  2895		sci_port->reg_size = resource_size(res);
  2896	
  2897		for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
  2898			if (i)
> 2899				sci_port->irqs[i] = platform_get_irq_optional(dev, i);
  2900			else
  2901				sci_port->irqs[i] = platform_get_irq(dev, i);
  2902		}
  2903	
  2904		/* The SCI generates several interrupts. They can be muxed together or
  2905		 * connected to different interrupt lines. In the muxed case only one
  2906		 * interrupt resource is specified as there is only one interrupt ID.
  2907		 * In the non-muxed case, up to 6 interrupt signals might be generated
  2908		 * from the SCI, however those signals might have their own individual
  2909		 * interrupt ID numbers, or muxed together with another interrupt.
  2910		 */
  2911		if (sci_port->irqs[0] < 0)
  2912			return -ENXIO;
  2913	
  2914		if (sci_port->irqs[1] < 0)
  2915			for (i = 1; i < ARRAY_SIZE(sci_port->irqs); i++)
  2916				sci_port->irqs[i] = sci_port->irqs[0];
  2917	
  2918		sci_port->params = sci_probe_regmap(p);
  2919		if (unlikely(sci_port->params == NULL))
  2920			return -EINVAL;
  2921	
  2922		switch (p->type) {
  2923		case PORT_SCIFB:
  2924			sci_port->rx_trigger = 48;
  2925			break;
  2926		case PORT_HSCIF:
  2927			sci_port->rx_trigger = 64;
  2928			break;
  2929		case PORT_SCIFA:
  2930			sci_port->rx_trigger = 32;
  2931			break;
  2932		case PORT_SCIF:
  2933			if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
  2934				/* RX triggering not implemented for this IP */
  2935				sci_port->rx_trigger = 1;
  2936			else
  2937				sci_port->rx_trigger = 8;
  2938			break;
  2939		default:
  2940			sci_port->rx_trigger = 1;
  2941			break;
  2942		}
  2943	
  2944		sci_port->rx_fifo_timeout = 0;
  2945		sci_port->hscif_tot = 0;
  2946	
  2947		/* SCIFA on sh7723 and sh7724 need a custom sampling rate that doesn't
  2948		 * match the SoC datasheet, this should be investigated. Let platform
  2949		 * data override the sampling rate for now.
  2950		 */
  2951		sci_port->sampling_rate_mask = p->sampling_rate
  2952					     ? SCI_SR(p->sampling_rate)
  2953					     : sci_port->params->sampling_rate_mask;
  2954	
  2955		if (!early) {
  2956			ret = sci_init_clocks(sci_port, &dev->dev);
  2957			if (ret < 0)
  2958				return ret;
  2959	
  2960			port->dev = &dev->dev;
  2961	
  2962			pm_runtime_enable(&dev->dev);
  2963		}
  2964	
  2965		port->type		= p->type;
  2966		port->flags		= UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
  2967		port->fifosize		= sci_port->params->fifosize;
  2968	
  2969		if (port->type == PORT_SCI) {
  2970			if (sci_port->reg_size >= 0x20)
  2971				port->regshift = 2;
  2972			else
  2973				port->regshift = 1;
  2974		}
  2975	
  2976		/*
  2977		 * The UART port needs an IRQ value, so we peg this to the RX IRQ
  2978		 * for the multi-IRQ ports, which is where we are primarily
  2979		 * concerned with the shutdown path synchronization.
  2980		 *
  2981		 * For the muxed case there's nothing more to do.
  2982		 */
  2983		port->irq		= sci_port->irqs[SCIx_RXI_IRQ];
  2984		port->irqflags		= 0;
  2985	
  2986		port->serial_in		= sci_serial_in;
  2987		port->serial_out	= sci_serial_out;
  2988	
  2989		return 0;
  2990	}
  2991	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 58676 bytes --]

  parent reply	other threads:[~2019-10-02  9:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 18:07 [PATCH] serial: sh-sci: Use platform_get_irq_optional() for optional interrupts Geert Uytterhoeven
2019-10-02  4:49 ` Yoshihiro Shimoda
2019-10-02  9:52 ` kbuild test robot [this message]
2019-10-02  9:52   ` kbuild test robot
2019-10-02  9:52   ` kbuild test robot
2019-10-02 11:28   ` Geert Uytterhoeven
2019-10-02 11:28     ` Geert Uytterhoeven
2019-10-02 14:20     ` [kbuild-all] " Chen, Rong A
2019-10-02 14:22       ` Chen, Rong A
2019-10-03 16:10 ` Stephen Boyd
2019-10-03 16:10   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910021701.JBV8khAI%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.