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] [day] [month] [year] [list]
Date:	Mon, 29 Jun 2015 18:11:18 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Gwenn Bourrée <gwenn.bourree@...el.com>
Cc:	gregkh@...uxfoundation.org, jslaby@...e.cz,
	linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: MUX n_gsm debug print improvements

Hi Gwenn,

> Please review the following patch:
> 
> From 0ac5da0a4653f43ce4b0761a2be8073185c549bb Mon Sep 17 00:00:00 2001
> From: Gwenn Bourree <gwenn.bourree@...el.com>
> Date: Mon, 29 Jun 2015 16:09:06 +0200
> Subject: [PATCH] Add Debug define
> 
> Improve the debug print out and make be clearest
> 
> Signed-off-by: Gwenn Bourree <gwenn.bourree@...el.com>
> Signed-off-by: Mustapha Ben Zoubeir <mustaphax.ben.zoubeir@...el.com>
> Signed-off-by: Nicolas LOUIS <nicolasx.louis@...el.com>
> Reviewed-by: Ravindran, Arun <arun.ravindran@...el.com
> 
> ---
> drivers/tty/n_gsm.c | 49
> ++++++++++++++++++++++++++++---------------------
> 1 file changed, 28 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 382d3fc..d6e0ea0 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -66,17 +66,18 @@
> static int debug;
> module_param(debug, int, 0600);
> 
> -/* Defaults: these are from the specification */
> +#define GSMDBG_VERBOSE_PACKET_REPORT(x) ((x) &  1)
> +#define GSMDBG_FORCE_CARRIER(x)         ((x) &  2)
> +#define GSMDBG_DATA_FULL_REPORT(x)      ((x) &  4)
> +#define GSMDBG_DLCI_STREAM_REPORT(x)    ((x) &  8)
> +#define GSMDBG_DLCI_DATA_REPORT(x)      ((x) & 16)
> +#define GSMDBG_DATA_LEN_REPORT(x)       ((x) & 32)

what is actually wrong with just using dynamic debug. That lets you easily switch on certain debug statements. I would actually remove all of this and rely completely on dynamic debug instead.

Anyway, there are also BIT(0), BIT(1) etc. choices that would be a lot clearer than 1, 2, 4 etc.

Regards

Marcel

--
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