Hi Gwenn,

> Please review the following patch:
> 
> From 0ac5da0a4653f43ce4b0761a2be8073185c549bb Mon Sep 17 00:00:00 2001
> From: Gwenn Bourree <[email protected]>
> 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 <[email protected]>
> Signed-off-by: Mustapha Ben Zoubeir <[email protected]>
> Signed-off-by: Nicolas LOUIS <[email protected]>
> Reviewed-by: Ravindran, Arun <[email protected]
> 
> ---
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to