Message ID | 1304348024-11681-1-git-send-email-lindner_marek@yahoo.de |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <lindner_marek@yahoo.de> Received: from nm18-vm0.bullet.mail.ukl.yahoo.com (nm18-vm0.bullet.mail.ukl.yahoo.com [217.146.183.95]) by open-mesh.org (Postfix) with SMTP id 1E2D5154212 for <b.a.t.m.a.n@lists.open-mesh.org>; Mon, 2 May 2011 16:54:21 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.211] by nm18.bullet.mail.ukl.yahoo.com with NNFMP; 02 May 2011 14:54:20 -0000 Received: from [77.238.184.67] by tm4.bullet.mail.ukl.yahoo.com with NNFMP; 02 May 2011 14:54:20 -0000 Received: from [127.0.0.1] by smtp136.mail.ukl.yahoo.com with NNFMP; 02 May 2011 14:54:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1304348060; bh=S6Ym3wgip3hFK4ZgaHGnBl16mMOMeYpZHdiyZTVsbKA=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer; b=Gj3syvNb5/tX7tlf8GpbkoVDSELKgkN2Jevbt24pvUJBknXusSfL3Ppfi8WGLqAPOhEW2KPC0rJ9kUhnty0JXc++fEgmcfsxvY6IIeA9yPcxCdhIE+2PNbf3tWGdQ5DwiVil1mO6TUEk/xN1FFgSX8sPS/3ZpsqNbLn79nl29O8= X-Yahoo-Newman-Id: 556726.86115.bm@smtp136.mail.ukl.yahoo.com Received: from localhost (lindner_marek@90.61.189.28 with plain) by smtp136.mail.ukl.yahoo.com with SMTP; 02 May 2011 14:54:20 +0000 GMT X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-YMail-OSG: 2i62hHsVM1mwf6gWACrAirQNZI5q9Yd3xKFyI3Q4A33ujtC 9LYG5dRZSSAb.8c2zJw7eSoEAAgRt6yRke_Cqpzf2KFgBbXprKcSJ68XN_ax qtOtCsfgRw.MED_UPyScalHQtv7sOvlE.kQF9Rx0lrHeapGj4DZTyWUBOQhr yC4zJKcENDyXIdRqWMYm5Freq_AY15Q7Op7Z70JpvTBbQhgBz00SvSk5OA35 9_MXJtjfqP66zp2_ttGEalbAkwregIN43u6fR07O0dzXv5JcYGnyHspjOYpK D.wHDZU3omUSQINd6yPAd8IWMubjrHAeHCUX0t_C6piLPqsr66pixmEu2wl6 Fk5qqLA-- X-Yahoo-Newman-Property: ymail-3 From: Marek Lindner <lindner_marek@yahoo.de> To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 2 May 2011 16:53:44 +0200 Message-Id: <1304348024-11681-1-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.2.3 Cc: Marek Lindner <lindner_marek@yahoo.de> Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: purge unnecessary include X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> X-List-Received-Date: Mon, 02 May 2011 14:54:21 -0000 |
Commit Message
Marek Lindner
May 2, 2011, 2:53 p.m. UTC
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
compat.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
Comments
On Monday 02 May 2011 16:53:44 Marek Lindner wrote: > Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> [,,,,] > #include <linux/version.h> /* LINUX_VERSION_CODE */ > -#include "bat_sysfs.h" /* struct bat_attribute */ This is necessary for kernels older than 2.6.24 make -C /home/batman/build_test/linux-build/linux-2.6.23/ REVISION=v2011.1.0-81-g89079ae-dirty M=/home/batman/batman-adv PWD=/home/batman/batman-adv -j 1 modules make[1]: Entering directory `/home/batman/build_test/linux-build/linux-2.6.23' CC [M] /home/batman/batman-adv/aggregation.o In file included from /home/batman/batman-adv/main.h:117, from /home/batman/batman-adv/aggregation.c:22: /home/batman/batman-adv/compat.h: In function ‘bat_wrapper_show’: /home/batman/batman-adv/compat.h:112: error: dereferencing pointer to incomplete type /home/batman/batman-adv/compat.h:112: warning: type defaults to ‘int’ in declaration of ‘__mptr’ /home/batman/batman-adv/compat.h:112: warning: initialization from incompatible pointer type /home/batman/batman-adv/compat.h:112: error: invalid use of undefined type ‘struct bat_attribute’ /home/batman/batman-adv/compat.h:114: error: dereferencing pointer to incomplete type /home/batman/batman-adv/compat.h:115: error: dereferencing pointer to incomplete type /home/batman/batman-adv/compat.h: In function ‘bat_wrapper_store’: /home/batman/batman-adv/compat.h:124: error: dereferencing pointer to incomplete type /home/batman/batman-adv/compat.h:124: warning: type defaults to ‘int’ in declaration of ‘__mptr’ /home/batman/batman-adv/compat.h:124: warning: initialization from incompatible pointer type /home/batman/batman-adv/compat.h:124: error: invalid use of undefined type ‘struct bat_attribute’ /home/batman/batman-adv/compat.h:126: error: dereferencing pointer to incomplete type /home/batman/batman-adv/compat.h:127: error: dereferencing pointer to incomplete type make[2]: *** [/home/batman/batman-adv/aggregation.o] Error 1 make[1]: *** [_module_/home/batman/batman-adv] Error 2 make[1]: Leaving directory `/home/batman/build_test/linux-build/linux-2.6.23' make: *** [all] Error 2
On Monday 02 May 2011 17:02:32 Sven Eckelmann wrote: > On Monday 02 May 2011 16:53:44 Marek Lindner wrote: > > Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> > > [,,,,] > > > #include <linux/version.h> /* LINUX_VERSION_CODE */ > > > > -#include "bat_sysfs.h" /* struct bat_attribute */ > > This is necessary for kernels older than 2.6.24 Aarrrgh, I was afraid of something like that. We are running into an include dependency issue as soon as bat_sysfs.h contains something like "struct bat_priv" which is likely to come soon ... Any better idea how to fix this ? Regards, Marek
On Monday 02 May 2011 17:09:31 Marek Lindner wrote: > On Monday 02 May 2011 17:02:32 Sven Eckelmann wrote: > > On Monday 02 May 2011 16:53:44 Marek Lindner wrote: > > > Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> > > > > [,,,,] > > > > > #include <linux/version.h> /* LINUX_VERSION_CODE */ > > > > > > -#include "bat_sysfs.h" /* struct bat_attribute */ > > > > This is necessary for kernels older than 2.6.24 > > Aarrrgh, I was afraid of something like that. We are running into an > include dependency issue as soon as bat_sysfs.h contains something like > "struct bat_priv" which is likely to come soon ... > Any better idea how to fix this ? Declaring everything below 2.6.24 as obsolete? Other solutions can be developed after arriving at home. Kind regards, Sven
On Monday 02 May 2011 17:09:31 Marek Lindner wrote: > On Monday 02 May 2011 17:02:32 Sven Eckelmann wrote: > > On Monday 02 May 2011 16:53:44 Marek Lindner wrote: > > > Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> > > > > [,,,,] > > > > > #include <linux/version.h> /* LINUX_VERSION_CODE */ > > > > > > -#include "bat_sysfs.h" /* struct bat_attribute */ > > > > This is necessary for kernels older than 2.6.24 > > Aarrrgh, I was afraid of something like that. We are running into an > include dependency issue as soon as bat_sysfs.h contains something like > "struct bat_priv" which is likely to come soon ... > Any better idea how to fix this ? Wait a second - why do you want to have a struct bat_priv in bat_sysfs.h? Isn't it possible to use 'struct bat_priv*" for a function declaration? 'struct bat_priv;' can be used as forward declaration and used below in a function declaration. struct bat_priv; void test(struct bat_priv* a) { } Kind regards, Sven
On Mon, May 02, 2011 at 05:27:36PM +0200, Sven Eckelmann wrote: > On Monday 02 May 2011 17:09:31 Marek Lindner wrote: > > On Monday 02 May 2011 17:02:32 Sven Eckelmann wrote: > > > On Monday 02 May 2011 16:53:44 Marek Lindner wrote: > > > > Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> > > > > > > [,,,,] > > > > > > > #include <linux/version.h> /* LINUX_VERSION_CODE */ > > > > > > > > -#include "bat_sysfs.h" /* struct bat_attribute */ > > > > > > This is necessary for kernels older than 2.6.24 > > > > Aarrrgh, I was afraid of something like that. We are running into an > > include dependency issue as soon as bat_sysfs.h contains something like > > "struct bat_priv" which is likely to come soon ... > > Any better idea how to fix this ? > > Wait a second - why do you want to have a struct bat_priv in bat_sysfs.h? > Isn't it possible to use 'struct bat_priv*" for a function declaration? > 'struct bat_priv;' can be used as forward declaration and used below in a > function declaration. > > struct bat_priv; > void test(struct bat_priv* a) > { > } > Just tested and it works! Thank you Sven Regards,
diff --git a/compat.h b/compat.h index 0c5ad82..bddf7e2 100644 --- a/compat.h +++ b/compat.h @@ -26,7 +26,6 @@ #define _NET_BATMAN_ADV_COMPAT_H_ #include <linux/version.h> /* LINUX_VERSION_CODE */ -#include "bat_sysfs.h" /* struct bat_attribute */ #ifndef IPPROTO_UDP #define IPPROTO_UDP 17