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@xxxxxxxxx> 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:
.config.gz
Description: application/gzip