Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

kernel test robot
2021-02-05T02:21:26Z

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

Hi Hector,

I love your patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on robh/for-next linus/master v5.11-rc6 next-20210125]
[cannot apply to tip/irq/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Hector-Martin/Apple-M1-SoC-platform-bring-up/20210205-045228
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c3bf64138f141e20577083d30e0542004c194a20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hector-Martin/Apple-M1-SoC-platform-bring-up/20210205-045228
git checkout c3bf64138f141e20577083d30e0542004c194a20
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/tty/serial/samsung_tty.c:60: warning: "NO_IRQ" redefined
60 | #define NO_IRQ -1
|
In file included from arch/arm/include/asm/hardirq.h:5,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from include/linux/serial_core.h:13,
from drivers/tty/serial/samsung_tty.c:36:
arch/arm/include/asm/irq.h:22: note: this is the location of the previous definition
22 | #define NO_IRQ ((unsigned int)(-1))
|
drivers/tty/serial/samsung_tty.c: In function 's3c24xx_serial_resume_noirq':
>> drivers/tty/serial/samsung_tty.c:2309:4: error: a label can only be part of a statement and a declaration is not a statement
2309 | unsigned int ucon;
| ^~~~~~~~
drivers/tty/serial/samsung_tty.c:2334:4: error: a label can only be part of a statement and a declaration is not a statement
2334 | unsigned int uintm = 0xf;
| ^~~~~~~~

vim +2309 drivers/tty/serial/samsung_tty.c

2299
2300 static int s3c24xx_serial_resume_noirq(struct device *dev)
2301 {
2302 struct uart_port *port = s3c24xx_dev_to_port(dev);
2303 struct s3c24xx_uart_port *ourport = to_ourport(port);
2304
2305 if (port) {
2306 /* restore IRQ mask */
2307 switch (s3c24xx_irq_type(port)) {
2308 case IRQ_APPLE:
> 2309 unsigned int ucon;
2310
2311 clk_prepare_enable(ourport->clk);
2312 if (!IS_ERR(ourport->baudclk))
2313 clk_prepare_enable(ourport->baudclk);
2314
2315 ucon = rd_regl(port, S3C2410_UCON);
2316
2317 ucon &= ~(APPLE_UCON_TXTHRESH_ENA_MSK |
2318 APPLE_UCON_RXTHRESH_ENA_MSK |
2319 APPLE_UCON_RXTO_ENA_MSK);
2320
2321 if (ourport->tx_enabled)
2322 ucon |= APPLE_UCON_TXTHRESH_ENA_MSK;
2323 if (ourport->rx_enabled)
2324 ucon |= APPLE_UCON_RXTHRESH_ENA_MSK |
2325 APPLE_UCON_RXTO_ENA_MSK;
2326
2327 wr_regl(port, S3C2410_UCON, ucon);
2328
2329 if (!IS_ERR(ourport->baudclk))
2330 clk_disable_unprepare(ourport->baudclk);
2331 clk_disable_unprepare(ourport->clk);
2332 break;
2333 case IRQ_S3C6400:
2334 unsigned int uintm = 0xf;
2335
2336 if (ourport->tx_enabled)
2337 uintm &= ~S3C64XX_UINTM_TXD_MSK;
2338 if (ourport->rx_enabled)
2339 uintm &= ~S3C64XX_UINTM_RXD_MSK;
2340 clk_prepare_enable(ourport->clk);
2341 if (!IS_ERR(ourport->baudclk))
2342 clk_prepare_enable(ourport->baudclk);
2343 wr_regl(port, S3C64XX_UINTM, uintm);
2344 if (!IS_ERR(ourport->baudclk))
2345 clk_disable_unprepare(ourport->baudclk);
2346 clk_disable_unprepare(ourport->clk);
2347 break;
2348 }
2349 }
2350
2351 return 0;
2352 }
2353

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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