Linux 2.4.17-pre5
Hisax compile fix :
isdn/hisax/config.c Thu Dec 6 21:34:31 2001 renamed from isdn/hisax/config.c.orig Thu Dec 6 21:34:23 2001 +1 -1
@@ -485,7 +485,7 @@ if (strlen(str) < HISAX_IDSIZE) strcpy(HiSaxID, str); else - printk(KERN_WARNING "HiSax: ID too long!") + printk(KERN_WARNING "HiSax: ID too long!"); } else strcpy(HiSaxID, "HiSax");
ciao,
luca
Signature · 5 lines
---------------------------------------------------------- Luca Montecchiani <[email protected]> http://www.geocities.com/montecchiani SpeakFreely:sflwl -hlwl.fourmilab.ch luca@ ICQ:17655604 -------------------=(Linux since 1995)=-------------------
Quoted 6 lines
Hisax compile fix :
isdn/hisax/config.c Thu Dec 6 21:34:31 2001 line 491
Quoted 8 lines
isdn/hisax/config.c Thu Dec 6 21:34:31 2001 renamed from isdn/hisax/config.c.orig Thu Dec 6 21:34:23 2001 +1
-1@@ -485,7 +485,7 @@ if (strlen(str) < HISAX_IDSIZE) strcpy(HiSaxID, str); else - printk(KERN_WARNING "HiSax: ID too long!") + printk(KERN_WARNING "HiSax: ID too long!"); } else strcpy(HiSaxID, "HiSax");
Ah, shit. Thanks luca, this was my fault. Never cut'n'paste via mouse on important occasions.
Sorry guys, this was my fault, not Marcelo's.
BTW, for the further ongoing of this patch, I ran into the question if
MODULE_PARM(type, "1-(16)i");
would be a valid statement. I guess not. But if not, could some kind soul please explain to me how to get rid of the braces "(" ")" given in definitions from CONFIG stuff.
E.g.:
CONFIG_ME_BEING_DUMB (16)
entering above MODULE_PARM contruction via a definition. I searched the source tree a bit, but did not find any hints.
Regards,
Stephan
PS: I _will_ re-check the next patches several times, I swear ... :-)
Quoted 11 lines · Stephan von Krawczynski
BTW, for the further ongoing of this patch, I ran into the question if
MODULE_PARM(type, "1-(16)i");would be a valid statement. I guess not. But if not, could some kind soul please explain to me how to get rid of the braces "(" ")" given in definitions from CONFIG stuff.
E.g.:
CONFIG_ME_BEING_DUMB(16)
Don't do that. CONFIG numbers are expected to be plain numbers, not expressions, e.g. CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16, not (16). Given the fragility of CML1 I would not be surprised if (16) broke some of the shell scripts.
Quoted 10 lines · On Fri, 07 Dec 2001 14:43:06 +1100 Keith Owens <[email protected]> wrote:
Quoted 8 lines · Stephan von Krawczynski
BTW, for the further ongoing of this patch, I ran into the question if
MODULE_PARM(type, "1-(16)i");would be a valid statement. I guess not. But if not, could some kind soul please explain to me how to get rid of the braces "(" ")" given in definitions from CONFIG stuff.
Quoted 8 lines
Quoted 3 lines
E.g.:
CONFIG_ME_BEING_DUMB(16)Don't do that. CONFIG numbers are expected to be plain numbers, not expressions, e.g.
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16, not (16). Given the fragility of CML1 I would not be surprised if (16) broke some of the shell scripts.
Huh!!
There is a problem: I made a (really small) patch to Config.in saying:
int ' Maximum number of cards supported by HiSax' CONFIG_HISAX_MAX_CARDS 8
If I check this in the source, it gives me CONFIG_HISAX_MAX_CARDS as (8)
Can you check this out please. It doesn't look like I could do anything against this.
How do you make your CONFIG-definitions come back without "()" ?
Regards,
Stephan
Quoted 5 lines · Stephan von Krawczynski
There is a problem: I made a (really small) patch to Config.in saying:
int ' Maximum number of cards supported by HiSax'
CONFIG_HISAX_MAX_CARDS8If I check this in the source, it gives me
CONFIG_HISAX_MAX_CARDSas (8)
Yuck! CML1 outputs integers as #define CONFIG_foo (number) instead of just number. CML2 does not do that, I was looking at CML2. Add this to drivers/isdn/Makefile
CFLAGS_foo.o += -DMAX_CARDS=$(subst (,,$(subst ),,$(CONFIG_HISAX_MAX_CARDS)))
In foo.c, use MAX_CARDS instead of CONFIG_HISAX_MAX_CARDS. Change foo to the name of the object that you are working on. When you build, it should say -DMAX_CARDS=8.
Quoted 5 lines · On Sat, 08 Dec 2001 00:35:14 +1100 Keith Owens <[email protected]> wrote:
Quoted 3 lines · Stephan von Krawczynski
There is a problem: I made a (really small) patch to Config.in saying:
int ' Maximum number of cards supported by HiSax'
CONFIG_HISAX_MAX_CARDS 8
Quoted 7 lines
Quoted 2 lines
If I check this in the source, it gives me
CONFIG_HISAX_MAX_CARDSas (8)Yuck! CML1 outputs integers as #define
CONFIG_foo(number) instead of just number. CML2 does not do that, I was looking at CML2. Add this todrivers/isdn/Makefile
Quoted 5 lines
CFLAGS_foo.o += -DMAX_CARDS=$(subst (,,$(subst ),,$(CONFIG_HISAX_MAX_CARDS)))
In
foo.c, useMAX_CARDSinstead ofCONFIG_HISAX_MAX_CARDS. Change foo to the name of the object that you are working on. When you build, it should say -DMAX_CARDS=8.
Thanks for this hint, but it is not all that easy. Problem is the definition is needed for _all_ files in the hisax-subtree, to be more precise for all currently including hisax.h. I am not very fond of the idea to add additional conditions to the availability of the HISAX_MAX_CARDS symbol, especially if they are located in the Makefile.
Anyway, how would you generate this additional -D for all files inside a certain directory? Obviously the stuff should at least be put inside the hisax-Makefile, and not one layer above in isdn-Makefile.
I tried "CFLAGS += ..." but that does not work.
Thanks for help,
Stephan
Re: Linux 2.4.17-pre5 / Have fun with make
In reply to Keith OwensQuoted 6 lines · On Sat, 08 Dec 2001 00:35:14 +1100 Keith Owens <[email protected]> wrote:
CFLAGS_foo.o += -DMAX_CARDS=$(subst (,,$(subst ),,$(CONFIG_HISAX_MAX_CARDS)))
In
foo.c, useMAX_CARDSinstead ofCONFIG_HISAX_MAX_CARDS. Change foo to the name of the object that you are working on. When you build, it should say -DMAX_CARDS=8.
Keith, it is getting weird right now. Your above suggestion does not work, it does not even execute, because the braces obviously confuse it. Now I come up with a _working_ solution, but to be honest, I don't dare to give away the patch, because it looks like this:
EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(subst ,,$(CONFIG_HISAX_MAX_CARDS))
You read it right, no substition is going on. BUT my test shows this executes to e.g. "8" and not "(8)". This is what I wanted, but it looks like bs. Alan would you please tell me if this looks like clean make usage to you, or how you would drop "()" around integer definitions coming from CONFIG. Warning:
if you think this is ok, I will send the patch ;-) I only want a confirmation from "Mr. Clean Code" ;-))
Regards,
Stephan
Re: Linux 2.4.17-pre5 / Have fun with make
Quoted 11 lines · Stephan von Krawczynski
Quoted 6 lines · On Sat, 08 Dec 2001 00:35:14 +1100 Keith Owens <[email protected]> wrote:
CFLAGS_foo.o += -DMAX_CARDS=$(subst (,,$(subst ),,$(CONFIG_HISAX_MAX_CARDS)))
In
foo.c, useMAX_CARDSinstead ofCONFIG_HISAX_MAX_CARDS. Change foo to the name of the object that you are working on. When you build, it should say -DMAX_CARDS=8.Keith, it is getting weird right now. Your above suggestion does not work, it does not even execute, because the braces obviously confuse it.
That's what I get for typing code late at night and not testing it. The correct implementation of that line is probably
lp:=(
rp:=)
CFLAGS_foo.o += -DMAX_CARDS=$(subst $(lp),,$(subst $(rp),,$(CONFIG_HISAX_MAX_CARDS)))
But as you found, you don't need that anyway.
Quoted 4 lines
Now I come up with a _working_ solution, but to be honest, I don't dare to give away the patch, because it looks like this:
EXTRA_CFLAGS+= -DHISAX_MAX_CARDS=$(subst ,,$(CONFIG_HISAX_MAX_CARDS))
EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS)
will work just as well. The reason that you do not get '(8)' that way is because CML1 generates inconsistent output. In .config the line says CONFIG_HISAX_MAX_CARDS=8, in include/linux/autoconf.h it says #define CONFIG_HISAX_MAX_CARDS (8). The makefiles use .config, the source code uses autoconf.h.
Inconsistency of inconsistencies, saith the preacher; all is inconsistency.