All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bezdeka, Florian" <florian.bezdeka@siemens.com>
To: "ksmola51@gmail.com" <ksmola51@gmail.com>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
Date: Mon, 24 Jan 2022 07:40:18 +0000	[thread overview]
Message-ID: <4d3e4269cc2358f3ef0864cd08ef3402cfe1b748.camel@siemens.com> (raw)
In-Reply-To: <20220123081859.3266-1-ksmola51@gmail.com>

On Sun, 2022-01-23 at 00:18 -0800, Konstantin Smola via Xenomai wrote:
> kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
> Signed-off-by: Konstantin Smola <ksmola51@gmail.com>
> ---
>  kernel/drivers/serial/16550A.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/drivers/serial/16550A.c b/kernel/drivers/serial/16550A.c
> index c9274fb19..325737f65 100644
> --- a/kernel/drivers/serial/16550A.c
> +++ b/kernel/drivers/serial/16550A.c
> @@ -31,6 +31,7 @@ MODULE_VERSION("1.5.2");
>  MODULE_LICENSE("GPL");
>  
>  #define RT_16550_DRIVER_NAME	"xeno_16550A"
> +static char mod_name[64]=RT_16550_DRIVER_NAME;

How about using RT_16550_DRIVER_NAME directly?

>  
>  #define MAX_DEVICES		8
>  
> @@ -1128,6 +1129,8 @@ int __init rt_16550_init(void)
>  		name = (char *)(dev + 1);
>  		ksformat(name, RTDM_MAX_DEVNAME_LEN, dev->label, i);
>  
> +		rtdm_printk("%s: %s io=0x%x irq=%d baud_base=%d\n", mod_name, name, (unsigned)rt_16550_base_addr(i),irq[i],baud_base[i]);
> +

I guess Jan will comment on that as well, not sure if we really need
such verbose outputs. Technically I wonder if that is the right
location. The initialization might still fail below. So maybe move it
to the place where the device is up and running?

>  		err = rt_16550_init_io(i, name);
>  		if (err)
>  			goto kfree_out;


  reply	other threads:[~2022-01-24  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-23  8:18 [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases Konstantin Smola
2022-01-24  7:40 ` Bezdeka, Florian [this message]
2022-01-24 17:32   ` Jan Kiszka

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=4d3e4269cc2358f3ef0864cd08ef3402cfe1b748.camel@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=ksmola51@gmail.com \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.