From: kernel test robot <lkp@intel.com>
To: Binbin Zhou <zhoubinbin@loongson.cn>,
Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Haowei Zheng <zhenghaowei@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev, Xuerui Wang <kernel@xen0n.name>,
loongarch@lists.linux.dev, devicetree@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: Re: [PATCH v4 2/3] serial: 8250: Add Loongson uart driver support
Date: Wed, 10 Sep 2025 19:05:23 +0800 [thread overview]
Message-ID: <202509101843.2PXpHVfr-lkp@intel.com> (raw)
In-Reply-To: <91ae8cd4f903ac452e337e4662bbabf8a412b061.1757318368.git.zhoubinbin@loongson.cn>
Hi Binbin,
kernel test robot noticed the following build errors:
[auto build test ERROR on b601e1f41edd4667062aa7cccb4e5199814979a3]
url: https://github.com/intel-lab-lkp/linux/commits/Binbin-Zhou/dt-bindings-serial-Add-Loongson-UART-controller/20250909-201640
base: b601e1f41edd4667062aa7cccb4e5199814979a3
patch link: https://lore.kernel.org/r/91ae8cd4f903ac452e337e4662bbabf8a412b061.1757318368.git.zhoubinbin%40loongson.cn
patch subject: [PATCH v4 2/3] serial: 8250: Add Loongson uart driver support
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20250910/202509101843.2PXpHVfr-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250910/202509101843.2PXpHVfr-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/202509101843.2PXpHVfr-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/tty/serial/8250/8250_loongson.c: In function 'loongson_uart_probe':
>> drivers/tty/serial/8250/8250_loongson.c:102:9: error: implicit declaration of function 'device_property_read_u32' [-Wimplicit-function-declaration]
102 | device_property_read_u32(dev, "clock-frequency", &uart.port.uartclk);
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/8250/8250_loongson.c:117:28: error: implicit declaration of function 'device_get_match_data'; did you mean 'device_match_any'? [-Wimplicit-function-declaration]
117 | flags = (uintptr_t)device_get_match_data(dev);
| ^~~~~~~~~~~~~~~~~~~~~
| device_match_any
drivers/tty/serial/8250/8250_loongson.c: At top level:
>> drivers/tty/serial/8250/8250_loongson.c:179:34: error: array type has incomplete element type 'struct of_device_id'
179 | static const struct of_device_id loongson_uart_of_ids[] = {
| ^~~~~~~~~~~~~~~~~~~~
vim +/device_property_read_u32 +102 drivers/tty/serial/8250/8250_loongson.c
80
81 static int loongson_uart_probe(struct platform_device *pdev)
82 {
83 struct device *dev = &pdev->dev;
84 struct uart_8250_port uart = {};
85 struct loongson_uart_data *ddata;
86 struct resource *res;
87 unsigned int flags;
88 int ret;
89
90 ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
91 if (!ddata)
92 return -ENOMEM;
93
94 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
95 if (!res)
96 return -ENODEV;
97
98 uart.port.irq = platform_get_irq(pdev, 0);
99 if (uart.port.irq < 0)
100 return -EINVAL;
101
> 102 device_property_read_u32(dev, "clock-frequency", &uart.port.uartclk);
103
104 spin_lock_init(&uart.port.lock);
105 uart.port.flags = UPF_SHARE_IRQ | UPF_FIXED_PORT | UPF_FIXED_TYPE | UPF_IOREMAP;
106 uart.port.iotype = UPIO_MEM;
107 uart.port.regshift = 0;
108 uart.port.dev = dev;
109 uart.port.type = PORT_LOONGSON;
110 uart.port.private_data = ddata;
111
112 uart.port.mapbase = res->start;
113 uart.port.mapsize = resource_size(res);
114 uart.port.serial_in = loongson_serial_in;
115 uart.port.serial_out = loongson_serial_out;
116
> 117 flags = (uintptr_t)device_get_match_data(dev);
118
119 if (flags & LOONGSON_UART_HAS_FRAC) {
120 uart.port.get_divisor = loongson_frac_get_divisor;
121 uart.port.set_divisor = loongson_frac_set_divisor;
122 }
123
124 if (flags & LOONGSON_UART_QUIRK_MCR)
125 ddata->mcr_invert |= (UART_MCR_RTS | UART_MCR_DTR);
126
127 if (flags & LOONGSON_UART_QUIRK_MSR)
128 ddata->msr_invert |= (UART_MSR_CTS | UART_MSR_DSR);
129
130 ddata->rst = devm_reset_control_get_optional_shared(dev, NULL);
131 if (IS_ERR(ddata->rst))
132 return PTR_ERR(ddata->rst);
133
134 ret = reset_control_deassert(ddata->rst);
135 if (ret)
136 return ret;
137
138 ret = serial8250_register_8250_port(&uart);
139 if (ret < 0) {
140 reset_control_assert(ddata->rst);
141 return ret;
142 }
143
144 ddata->line = ret;
145 platform_set_drvdata(pdev, ddata);
146
147 return 0;
148 }
149
150 static void loongson_uart_remove(struct platform_device *pdev)
151 {
152 struct loongson_uart_data *ddata = platform_get_drvdata(pdev);
153
154 serial8250_unregister_port(ddata->line);
155 reset_control_assert(ddata->rst);
156 }
157
158 static int loongson_uart_suspend(struct device *dev)
159 {
160 struct loongson_uart_data *ddata = dev_get_drvdata(dev);
161
162 serial8250_suspend_port(ddata->line);
163
164 return 0;
165 }
166
167 static int loongson_uart_resume(struct device *dev)
168 {
169 struct loongson_uart_data *data = dev_get_drvdata(dev);
170
171 serial8250_resume_port(data->line);
172
173 return 0;
174 }
175
176 static DEFINE_SIMPLE_DEV_PM_OPS(loongson_uart_pm_ops, loongson_uart_suspend,
177 loongson_uart_resume);
178
> 179 static const struct of_device_id loongson_uart_of_ids[] = {
180 { .compatible = "loongson,ls2k0500-uart", .data = (void *)LS2K0500_UART_FLAG },
181 { .compatible = "loongson,ls2k1500-uart", .data = (void *)LS2K1500_UART_FLAG },
182 { /* sentinel */ },
183 };
184 MODULE_DEVICE_TABLE(of, loongson_uart_of_ids);
185
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-09-10 11:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 12:11 [PATCH v4 0/3] uart: Introduce uart driver for the Loongson family Binbin Zhou
2025-09-09 12:11 ` [PATCH v4 1/3] dt-bindings: serial: Add Loongson UART controller Binbin Zhou
2025-09-10 8:26 ` Krzysztof Kozlowski
2025-09-10 8:28 ` Krzysztof Kozlowski
2025-09-12 6:06 ` Binbin Zhou
2025-09-09 12:11 ` [PATCH v4 2/3] serial: 8250: Add Loongson uart driver support Binbin Zhou
2025-09-10 11:05 ` kernel test robot [this message]
2025-09-10 11:26 ` kernel test robot
2025-09-09 12:11 ` [PATCH v4 3/3] LoongArch: dts: Add uart new compatible string Binbin Zhou
2025-09-10 8:27 ` Krzysztof Kozlowski
2025-09-11 7:55 ` Binbin Zhou
2025-09-11 9:00 ` Krzysztof Kozlowski
2025-09-12 6:22 ` Binbin Zhou
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=202509101843.2PXpHVfr-lkp@intel.com \
--to=lkp@intel.com \
--cc=chenhuacai@loongson.cn \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel@xen0n.name \
--cc=krzk@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@kernel.org \
--cc=zhenghaowei@loongson.cn \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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