lkml.org 
[lkml]   [2015]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH]: MUX n_gsm debug print improvements
From
Date
Hi Gwenn,

> Please review the following patch:
>
> From 0ac5da0a4653f43ce4b0761a2be8073185c549bb Mon Sep 17 00:00:00 2001
> From: Gwenn Bourree <gwenn.bourree@intel.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@intel.com>
> Signed-off-by: Mustapha Ben Zoubeir <mustaphax.ben.zoubeir@intel.com>
> Signed-off-by: Nicolas LOUIS <nicolasx.louis@intel.com>
> Reviewed-by: Ravindran, Arun <arun.ravindran@intel.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



\
 
 \ /
  Last update: 2015-06-29 18:41    [W:0.042 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site