Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307176
| Path | csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!border1.nntp.ams1.giganews.com!nntp.giganews.com!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jiri Slaby <jslaby@suse.cz> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] TTY: 8250_pnp, make checks bool |
| Date | Tue, 12 Jan 2016 11:00:02 +0100 |
| Message-ID | <qQ3U6-7AD-19@gated-at.bofh.it> (permalink) |
| References | <qQ3U6-7AD-21@gated-at.bofh.it> |
| X-Original-To | gregkh@linuxfoundation.org |
| X-Mailer | git-send-email 2.7.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 50 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby <jslaby@suse.cz> |
| X-Original-Date | Tue, 12 Jan 2016 10:52:49 +0100 |
| X-Original-Message-ID | <1452592370-24951-2-git-send-email-jslaby@suse.cz> |
| X-Original-References | <1452592370-24951-1-git-send-email-jslaby@suse.cz> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1307176 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 2/3] TTY: 8250_pnp, make checks bool Jiri Slaby <jslaby@suse.cz> - 2016-01-12 11:00 +0100
csiph-web