From: Paul Fulghum <paulkf@microgate.com>
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/char/synclink drivers/pcmcia/synclink - BOOLEAN to bool conversion
Date: Sun, 09 Mar 2008 09:06:30 -0600 [thread overview]
Message-ID: <47D3FCF6.70908@microgate.com> (raw)
In-Reply-To: <1205046574.656.37.camel@localhost>
Joe Perches wrote:
> Remove more TRUE/FALSE defines and uses
> Remove == TRUE tests
> Convert BOOLEAN to bool
> Convert int to bool where appropriate
>
> Signed-off-by: Joe Perches <joe@perches.com>
>
> include/linux/synclink.h | 4 -
> drivers/char/pcmcia/synclink_cs.c | 125 +++++++++---------
> drivers/char/synclink.c | 258 ++++++++++++++++++-------------------
> drivers/char/synclink_gt.c | 88 +++++++-------
> drivers/char/synclinkmp.c | 157 +++++++++++-----------
> 5 files changed, 312 insertions(+), 320 deletions(-)
>
...
> diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
...
> @@ -4475,14 +4476,13 @@ static void reset_rbufs(struct slgt_info *info)
> /*
> * pass receive HDLC frame to upper layer
> *
> - * return 1 if frame available, otherwise 0
> + * return true if frame available, otherwise false
> */
> static int rx_get_frame(struct slgt_info *info)
> {
> unsigned int start, end;
> unsigned short status;
> unsigned int framesize = 0;
> - int rc = 0;
> unsigned long flags;
> struct tty_struct *tty = info->tty;
> unsigned char addr_field = 0xff;
> @@ -4606,10 +4606,10 @@ check_again:
> }
> }
> free_rbufs(info, start, end);
> - rc = 1;
> + return true;
>
> cleanup:
> - return rc;
> + return false;
> }
If you return bool values from this function
it would make sense to also change the return value
of the function declaration to bool.
Overall the patch seems reasonable. I need to spend
time tomorrow going over it more carefully,
compiling it, and testing it with hardware.
You may wish to shorten the subject line to:
[PATCH] synclink drivers bool conversion
It is more readable and covers all of the
patch changes including int to bool conversions.
--
Paul
next prev parent reply other threads:[~2008-03-09 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-09 7:09 [PATCH] drivers/char/synclink drivers/pcmcia/synclink - BOOLEAN to bool conversion Joe Perches
2008-03-09 15:06 ` Paul Fulghum [this message]
2008-03-09 19:49 ` [PATCH] synclink drivers " Joe Perches
2008-03-10 2:05 ` Joe Perches
2008-03-10 21:26 ` Paul Fulghum
2008-03-10 21:03 ` Joe Perches
2008-03-10 22:17 ` Paul Fulghum
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=47D3FCF6.70908@microgate.com \
--to=paulkf@microgate.com \
--cc=joe@perches.com \
--cc=linux-kernel@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