public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: add routing debug log accessible via debugfs
Date: Wed, 23 Jun 2010 17:17:27 +0200	[thread overview]
Message-ID: <201006231717.35877.sven.eckelmann@gmx.de> (raw)
In-Reply-To: <1277302839-20197-1-git-send-email-lindner_marek@yahoo.de>

[-- Attachment #1: Type: Text/Plain, Size: 1520 bytes --]

Marek Lindner wrote:
>  /*
>   *  Vis
> @@ -160,3 +148,20 @@ int choose_orig(void *data, int32_t size);
>  int is_my_mac(uint8_t *addr);
>  int is_bcast(uint8_t *addr);
>  int is_mcast(uint8_t *addr);
> +
> +#ifdef CONFIG_BATMAN_ADV_DEBUG
> +extern int debug;
> +
> +extern int bat_debug_type(int type);
> +extern int debug_log(struct bat_priv *bat_priv, char *fmt, ...);
> +
> +#define bat_dbg(type, bat_priv, fmt, arg...) do {		\
> +		if (bat_debug_type(type))			\
> +			debug_log(bat_priv, fmt, ## arg);	\
> +	}							\
> +	while (0)
> +#else /* !CONFIG_BATMAN_ADV_DEBUG */
> +#define bat_dbg(type, bat_priv, fmt, arg...) do {	\
> +	}						\
> +	while (0)
> +#endif

Can you please change that (at least the 'null' function) from a define to an 
static inline function? Otherwise there are a lot of "unused" warning when 
compiling without debug support.

static inline void bat_dbg(char type __attribute__((unused)),
			   struct bat_priv *bat_priv __attribute__((unused)),
			   char *fmt __attribute__((unused)), ...)
{ }

I will send a include guard patch later which is needed to get this working.

To you suggestion to add more information from kernel log to the debug log - 
it seems to be interesting, but we must ensure that those information are 
specific to a mesh device. I will sent a patch which modifies all printks 
later. Maybe we could discuss where it would be a benefit and where it is not 
needed (~54 printks are for discussion).

Best regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2010-06-23 15:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 14:20 [B.A.T.M.A.N.] batman-adv debug logging Marek Lindner
2010-06-23 14:20 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: add routing debug log accessible via debugfs Marek Lindner
2010-06-23 14:51   ` Andrew Lunn
2010-06-23 15:02     ` Marek Lindner
2010-06-23 15:12       ` Andrew Lunn
2010-06-23 15:53         ` Marek Lindner
2010-06-23 15:09   ` Andrew Lunn
2010-06-23 15:58     ` Marek Lindner
2010-06-23 16:12       ` Andrew Lunn
2010-06-23 15:17   ` Sven Eckelmann [this message]
2010-06-23 16:00     ` Marek Lindner
2010-06-23 15:23   ` Andrew Lunn
2010-06-23 16:03     ` Marek Lindner
2010-06-23 16:18       ` Andrew Lunn
2010-06-23 14:20 ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: add debug log support Marek Lindner
  -- strict thread matches above, loose matches on Subject: below --
2010-06-27  0:32 [B.A.T.M.A.N.] batman-adv debug logging (v2) Marek Lindner
2010-06-27  0:33 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: add routing debug log accessible via debugfs Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201006231717.35877.sven.eckelmann@gmx.de \
    --to=sven.eckelmann@gmx.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=lindner_marek@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox