From: Jiri Slaby <jirislaby@kernel.org>
To: Jacky Huang <ychuang570808@gmail.com>,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
lee@kernel.org, mturquette@baylibre.com, sboyd@kernel.org,
p.zabel@pengutronix.de, gregkh@linuxfoundation.org,
tmaimon77@gmail.com, catalin.marinas@arm.com, will@kernel.org
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org, arnd@arndb.de, soc@kernel.org,
schung@nuvoton.com, mjchen@nuvoton.com,
Jacky Huang <ychuang3@nuvoton.com>
Subject: Re: [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Tue, 30 May 2023 07:35:47 +0200 [thread overview]
Message-ID: <75747efd-2bfd-d1db-42d9-7a6c90240475@kernel.org> (raw)
In-Reply-To: <c9493f4d-8056-20a0-6ed2-161fbcc3d34e@gmail.com>
Hi,
On 30. 05. 23, 3:09, Jacky Huang wrote:
>>>> +
>>>> + if (options)
>>>> + uart_parse_options(options, &baud, &parity, &bits, &flow);
>>>> +
>>>> + return uart_set_options(port, co, baud, parity, bits, flow);
>>>> +}
>>>> +
>>>> +static struct console ma35d1serial_console = {
>>>> + .name = "ttyNVT",
>>>> + .write = ma35d1serial_console_write,
>>>> + .device = uart_console_device,
>>>> + .setup = ma35d1serial_console_setup,
>>>> + .flags = CON_PRINTBUFFER | CON_ENABLED,
>>>> + .index = -1,
>>>> + .data = &ma35d1serial_reg,
>>>
>>> I don't see console->data used anywhere in the driver?
>>>
>>
>> I will remove it.
>>
>
> I removed the " .data = &ma35d1serial_reg", but kernel crashed in
> 'drivers/tty/serial/serial_core.c'.
>
> The variable 'p' of uart_console_device() refer to a NULL, because
> co->data is NULL.
> As a result, kernel crashed at 'p->tty_driver'.
>
> struct tty_driver *uart_console_device(struct console *co, int *index)
> {
> struct uart_driver *p = co->data;
> *index = co->index;
> return p->tty_driver;
> }
>
> We seem to be unable to remove it.
> If there are no other considerations, I will keep it in the next version.
Ah, yeah. Sorry, my bad.
--
js
suse labs
prev parent reply other threads:[~2023-05-30 5:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 7:52 [PATCH v11 00/10] Introduce Nuvoton ma35d1 SoC Jacky Huang
2023-05-16 7:52 ` [PATCH v11 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform Jacky Huang
2023-05-16 7:52 ` [PATCH v11 02/10] arm64: defconfig: Add support for Nuvoton MA35 family SoCs Jacky Huang
2023-05-16 7:52 ` [PATCH v11 03/10] dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 04/10] dt-bindings: reset: nuvoton: Document ma35d1 reset control Jacky Huang
2023-05-16 7:52 ` [PATCH v11 05/10] dt-bindings: arm: Add initial bindings for Nuvoton platform Jacky Huang
2023-05-16 7:52 ` [PATCH v11 06/10] dt-bindings: serial: Document ma35d1 uart controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 07/10] arm64: dts: nuvoton: Add initial ma35d1 device tree Jacky Huang
2023-05-16 7:52 ` [PATCH v11 08/10] clk: nuvoton: Add clock driver for ma35d1 clock controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 09/10] reset: Add Nuvoton ma35d1 reset driver support Jacky Huang
2023-05-16 7:52 ` [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial " Jacky Huang
2023-05-24 7:42 ` Jiri Slaby
2023-05-24 8:34 ` Jacky Huang
2023-05-24 9:00 ` Arnd Bergmann
2023-05-25 5:48 ` Jiri Slaby
2023-05-30 1:09 ` Jacky Huang
2023-05-30 5:35 ` Jiri Slaby [this message]
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=75747efd-2bfd-d1db-42d9-7a6c90240475@kernel.org \
--to=jirislaby@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mjchen@nuvoton.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=schung@nuvoton.com \
--cc=soc@kernel.org \
--cc=tmaimon77@gmail.com \
--cc=will@kernel.org \
--cc=ychuang3@nuvoton.com \
--cc=ychuang570808@gmail.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;
as well as URLs for NNTP newsgroup(s).