public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: use DBG_ALL in log_level sysfs definition
@ 2012-05-09  7:50 Antonio Quartulli
  2012-05-11 19:40 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2012-05-09  7:50 UTC (permalink / raw)
  To: b.a.t.m.a.n

Each time a new log level is added the developer must change either the DBG_ALL
enum definition and the hard coded value in the bat_sysfs.c for the log_level
attribute max value. This is extremely error prone.
With this patch the code directly uses DBG_ALL in the sysfs definition

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 bat_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bat_sysfs.c b/bat_sysfs.c
index 6ba3d89..dc1edbe 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -445,7 +445,7 @@ BAT_ATTR_SIF_UINT(gw_sel_class, S_IRUGO | S_IWUSR, 1, TQ_MAX_VALUE,
 static BAT_ATTR(gw_bandwidth, S_IRUGO | S_IWUSR, show_gw_bwidth,
 		store_gw_bwidth);
 #ifdef CONFIG_BATMAN_ADV_DEBUG
-BAT_ATTR_SIF_UINT(log_level, S_IRUGO | S_IWUSR, 0, 31, NULL);
+BAT_ATTR_SIF_UINT(log_level, S_IRUGO | S_IWUSR, 0, DBG_ALL, NULL);
 #endif
 
 static struct bat_attribute *mesh_attrs[] = {
-- 
1.7.9.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use DBG_ALL in log_level sysfs definition
  2012-05-09  7:50 [B.A.T.M.A.N.] [PATCH] batman-adv: use DBG_ALL in log_level sysfs definition Antonio Quartulli
@ 2012-05-11 19:40 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2012-05-11 19:40 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Wednesday, May 09, 2012 15:50:45 Antonio Quartulli wrote:
> Each time a new log level is added the developer must change either the
> DBG_ALL enum definition and the hard coded value in the bat_sysfs.c for
> the log_level attribute max value. This is extremely error prone.
> With this patch the code directly uses DBG_ALL in the sysfs definition

Applied in revision 3806f0f.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-11 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09  7:50 [B.A.T.M.A.N.] [PATCH] batman-adv: use DBG_ALL in log_level sysfs definition Antonio Quartulli
2012-05-11 19:40 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox