lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47D3FCF6.70908@microgate.com>
Date:	Sun, 09 Mar 2008 09:06:30 -0600
From:	Paul Fulghum <paulkf@...rogate.com>
To:	Joe Perches <joe@...ches.com>
CC:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/char/synclink drivers/pcmcia/synclink - BOOLEAN
 to	bool conversion

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@...ches.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ