* [PATCH 1/3] TTY: 8250_pnp, constify tables
@ 2016-01-12 9:52 Jiri Slaby
2016-01-12 9:52 ` [PATCH 2/3] TTY: 8250_pnp, make checks bool Jiri Slaby
2016-01-12 9:52 ` [PATCH 3/3] TTY: xtensa/iss/console, remove unused _INLINE_ definition Jiri Slaby
0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2016-01-12 9:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby
Make modem_names and base static const.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/serial/8250/8250_pnp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 658b392d1170..e813a874c26f 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -380,16 +380,16 @@ static const struct pnp_device_id pnp_dev_table[] = {
MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
-static char *modem_names[] = {
+static const char *modem_names[] = {
"MODEM", "Modem", "modem", "FAX", "Fax", "fax",
"56K", "56k", "K56", "33.6", "28.8", "14.4",
"33,600", "28,800", "14,400", "33.600", "28.800", "14.400",
"33600", "28800", "14400", "V.90", "V.34", "V.32", NULL
};
-static int check_name(char *name)
+static int check_name(const char *name)
{
- char **tmp;
+ const char **tmp;
for (tmp = modem_names; *tmp; tmp++)
if (strstr(name, *tmp))
@@ -400,7 +400,7 @@ static int check_name(char *name)
static int check_resources(struct pnp_dev *dev)
{
- resource_size_t base[] = {0x2f8, 0x3f8, 0x2e8, 0x3e8};
+ static const resource_size_t base[] = {0x2f8, 0x3f8, 0x2e8, 0x3e8};
int i;
for (i = 0; i < ARRAY_SIZE(base); i++) {
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] TTY: 8250_pnp, make checks bool
2016-01-12 9:52 [PATCH 1/3] TTY: 8250_pnp, constify tables Jiri Slaby
@ 2016-01-12 9:52 ` Jiri Slaby
2016-01-12 9:52 ` [PATCH 3/3] TTY: xtensa/iss/console, remove unused _INLINE_ definition Jiri Slaby
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2016-01-12 9:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby
Since check_name and check_resources return only 0/1, switch them to
bool/true/false.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/serial/8250/8250_pnp.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index e813a874c26f..f6332de4e3e3 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -387,28 +387,28 @@ static const char *modem_names[] = {
"33600", "28800", "14400", "V.90", "V.34", "V.32", NULL
};
-static int check_name(const char *name)
+static bool check_name(const char *name)
{
const char **tmp;
for (tmp = modem_names; *tmp; tmp++)
if (strstr(name, *tmp))
- return 1;
+ return true;
- return 0;
+ return false;
}
-static int check_resources(struct pnp_dev *dev)
+static bool check_resources(struct pnp_dev *dev)
{
static const resource_size_t base[] = {0x2f8, 0x3f8, 0x2e8, 0x3e8};
- int i;
+ unsigned int i;
for (i = 0; i < ARRAY_SIZE(base); i++) {
if (pnp_possible_config(dev, IORESOURCE_IO, base[i], 8))
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/*
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] TTY: xtensa/iss/console, remove unused _INLINE_ definition
2016-01-12 9:52 [PATCH 1/3] TTY: 8250_pnp, constify tables Jiri Slaby
2016-01-12 9:52 ` [PATCH 2/3] TTY: 8250_pnp, make checks bool Jiri Slaby
@ 2016-01-12 9:52 ` Jiri Slaby
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2016-01-12 9:52 UTC (permalink / raw)
To: gregkh
Cc: linux-serial, linux-kernel, Jiri Slaby, Chris Zankel,
Max Filippov, linux-xtensa
This is a remnant from the dark age. Nobody uses the macro now, so
remove.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: <linux-xtensa@linux-xtensa.org>
---
arch/xtensa/platforms/iss/console.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 70cb408bc20d..c54505dcf4db 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -28,10 +28,6 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>
-#ifdef SERIAL_INLINE
-#define _INLINE_ inline
-#endif
-
#define SERIAL_MAX_NUM_LINES 1
#define SERIAL_TIMER_VALUE (HZ / 10)
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-12 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 9:52 [PATCH 1/3] TTY: 8250_pnp, constify tables Jiri Slaby
2016-01-12 9:52 ` [PATCH 2/3] TTY: 8250_pnp, make checks bool Jiri Slaby
2016-01-12 9:52 ` [PATCH 3/3] TTY: xtensa/iss/console, remove unused _INLINE_ definition Jiri Slaby
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).