Re: [PATCH]: MUX n_gsm debug print improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gwenn,

> Please review the following patch:
> 
> From 0ac5da0a4653f43ce4b0761a2be8073185c549bb Mon Sep 17 00:00:00 2001
> From: Gwenn Bourree <gwenn.bourree@xxxxxxxxx>
> 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@xxxxxxxxx>
> Signed-off-by: Mustapha Ben Zoubeir <mustaphax.ben.zoubeir@xxxxxxxxx>
> Signed-off-by: Nicolas LOUIS <nicolasx.louis@xxxxxxxxx>
> Reviewed-by: Ravindran, Arun <arun.ravindran@xxxxxxxxx
> 
> ---
> 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-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux