linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 02/11] amiserial: remove serial_* strings
Date: Wed, 14 Jul 2021 11:13:05 +0200	[thread overview]
Message-ID: <20210714091314.8292-2-jslaby@suse.cz> (raw)
In-Reply-To: <20210714091314.8292-1-jslaby@suse.cz>

Remove a print of serial_name and serial_version from the probe
function, i.e. show_serial_version() from amiga_serial_probe(). The
value of such a print is minimal.

Aside from that, the version is artificial (copied from the serial core
in 2.3.45pre2 and never increased). So inline the version into
seq_printf's format string in rs_proc_show() and remove both strings
completely.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/amiserial.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 08987c438408..b2ff5861ca78 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -40,8 +40,6 @@
 #include <linux/types.h>
 #include <linux/serial.h>
 #include <linux/serial_reg.h>
-static char *serial_version = "4.30";
-
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -91,7 +89,6 @@ struct serial_state {
 };
 
 #define custom amiga_custom
-static char *serial_name = "Amiga-builtin serial driver";
 
 static struct tty_driver *serial_driver;
 
@@ -1452,7 +1449,7 @@ static inline void line_info(struct seq_file *m, int line,
 
 static int rs_proc_show(struct seq_file *m, void *v)
 {
-	seq_printf(m, "serinfo:1.0 driver:%s\n", serial_version);
+	seq_printf(m, "serinfo:1.0 driver:4.30\n");
 	line_info(m, 0, &rs_table[0]);
 	return 0;
 }
@@ -1465,17 +1462,6 @@ static int rs_proc_show(struct seq_file *m, void *v)
  * ---------------------------------------------------------------------
  */
 
-/*
- * This routine prints out the appropriate serial driver version
- * number, and identifies which options were configured into this
- * driver.
- */
-static void show_serial_version(void)
-{
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
-}
-
-
 static const struct tty_operations serial_ops = {
 	.open = rs_open,
 	.close = rs_close,
@@ -1542,8 +1528,6 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
 	if (!serial_driver)
 		return -ENOMEM;
 
-	show_serial_version();
-
 	/* Initialize the tty_driver structure */
 
 	serial_driver->driver_name = "amiserial";
@@ -1628,7 +1612,6 @@ static int __exit amiga_serial_remove(struct platform_device *pdev)
 {
 	struct serial_state *state = platform_get_drvdata(pdev);
 
-	/* printk("Unloading %s: version %s\n", serial_name, serial_version); */
 	tty_unregister_driver(serial_driver);
 	put_tty_driver(serial_driver);
 	tty_port_destroy(&state->tport);
-- 
2.32.0


  reply	other threads:[~2021-07-14  9:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  9:13 [PATCH 01/11] amiserial: remove unused DBG_CNT Jiri Slaby
2021-07-14  9:13 ` Jiri Slaby [this message]
2021-07-14  9:13 ` [PATCH 03/11] amiserial: remove stale comment Jiri Slaby
2021-07-14  9:13 ` [PATCH 04/11] amiserial: remove serial_state::xmit_fifo_size Jiri Slaby
2021-07-14  9:13 ` [PATCH 05/11] amiserial: simplify rs_open Jiri Slaby
2021-07-14  9:13 ` [PATCH 06/11] amiserial: use memset to zero serial_state Jiri Slaby
2021-07-14  9:13 ` [PATCH 07/11] amiserial: expand serial_isroot Jiri Slaby
2021-07-14  9:13 ` [PATCH 08/11] amiserial: expand "custom" Jiri Slaby
2021-07-14  9:13 ` [PATCH 09/11] amiserial: pack and sort includes Jiri Slaby
2021-07-14  9:13 ` [PATCH 10/11] amiserial: switch rs_table to a single state Jiri Slaby
2021-07-14  9:13 ` [PATCH 11/11] amiserial: remove unused state from shutdown Jiri Slaby

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=20210714091314.8292-2-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.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 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).