public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sunil V L <sunilvl@ventanamicro.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_acpi_b2_v7_611_rc1_full 40/40] drivers/tty/serial/8250/8250_platform.c:111:33: error: initializer for aggregate with no elements requires explicit braces
Date: Wed, 31 Jul 2024 03:15:59 +0800	[thread overview]
Message-ID: <202407310329.UvSZglfK-lkp@intel.com> (raw)

tree:   https://github.com/avpatel/linux.git riscv_acpi_b2_v7_611_rc1_full
head:   4423be73ba644a89e48da1cebbdf901f04b801f3
commit: 4423be73ba644a89e48da1cebbdf901f04b801f3 [40/40] serial: 8250_platform: Enable generic 16550A platform devices
config: arm-aspeed_g4_defconfig (https://download.01.org/0day-ci/archive/20240731/202407310329.UvSZglfK-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project ccae7b461be339e717d02f99ac857cf0bc7d17fc)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240731/202407310329.UvSZglfK-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407310329.UvSZglfK-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/tty/serial/8250/8250_platform.c:17:
   In file included from include/linux/serial_8250.h:11:
   In file included from include/linux/serial_core.h:16:
   In file included from include/linux/tty.h:11:
   In file included from include/linux/tty_port.h:5:
   In file included from include/linux/kfifo.h:40:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/tty/serial/8250/8250_platform.c:111:33: error: initializer for aggregate with no elements requires explicit braces
     111 |         struct uart_8250_port uart = { 0 };
         |                                        ^
   1 warning and 1 error generated.


vim +111 drivers/tty/serial/8250/8250_platform.c

   104	
   105	/*
   106	 * Generic 16550A platform devices
   107	 */
   108	static int serial8250_platform_probe(struct platform_device *pdev)
   109	{
   110		struct device *dev = &pdev->dev;
 > 111		struct uart_8250_port uart = { 0 };
   112		struct resource *regs;
   113		unsigned char iotype;
   114		int ret, line;
   115	
   116		regs = platform_get_resource(pdev, IORESOURCE_IO, 0);
   117		if (regs) {
   118			uart.port.iobase = regs->start;
   119			iotype = UPIO_PORT;
   120		} else {
   121			regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   122			if (!regs) {
   123				dev_err(dev, "no registers defined\n");
   124				return -EINVAL;
   125			}
   126	
   127			uart.port.mapbase = regs->start;
   128			uart.port.mapsize = resource_size(regs);
   129			uart.port.flags = UPF_IOREMAP;
   130			iotype = UPIO_MEM;
   131		}
   132	
   133		/* Default clock frequency*/
   134		uart.port.uartclk = 1843200;
   135		uart.port.type = PORT_16550A;
   136		uart.port.dev = &pdev->dev;
   137		uart.port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
   138		ret = uart_read_and_validate_port_properties(&uart.port);
   139		/* no interrupt -> fall back to polling */
   140		if (ret == -ENXIO)
   141			ret = 0;
   142		if (ret)
   143			return ret;
   144	
   145		if (uart.port.mapbase) {
   146			uart.port.membase = devm_ioremap(dev, uart.port.mapbase, uart.port.mapsize);
   147			if (!uart.port.membase)
   148				return -ENOMEM;
   149		}
   150	
   151		/*
   152		 * The previous call may not set iotype correctly when reg-io-width
   153		 * property is absent and it doesn't support IO port resource.
   154		 */
   155		uart.port.iotype = iotype;
   156	
   157		line = serial8250_register_8250_port(&uart);
   158		if (line < 0)
   159			return -ENODEV;
   160	
   161		return 0;
   162	}
   163	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-07-30 19:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202407310329.UvSZglfK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup@brainfault.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sunilvl@ventanamicro.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox