All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Linux 2.4.17-pre5
@ 2001-12-06 20:44 Luca Montecchiani
  2001-12-07  0:12 ` Stephan von Krawczynski
  0 siblings, 1 reply; 8+ messages in thread
From: Luca Montecchiani @ 2001-12-06 20:44 UTC (permalink / raw)
  To: marcelo; +Cc: Linux Kernel

Hisax compile fix :

--- drivers/isdn/hisax/config.c.orig    Thu Dec  6 21:34:23 2001
+++ drivers/isdn/hisax/config.c Thu Dec  6 21:34:31 2001
@@ -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
-- 
----------------------------------------------------------
Luca Montecchiani <m.luca@iname.com>
http://www.geocities.com/montecchiani
SpeakFreely:sflwl -hlwl.fourmilab.ch luca@    ICQ:17655604
-------------------=(Linux since 1995)=-------------------

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

* Re: Linux 2.4.17-pre5
  2001-12-06 20:44 Linux 2.4.17-pre5 Luca Montecchiani
@ 2001-12-07  0:12 ` Stephan von Krawczynski
  2001-12-07  3:43   ` Keith Owens
  2001-12-07 11:55   ` Stephan von Krawczynski
  0 siblings, 2 replies; 8+ messages in thread
From: Stephan von Krawczynski @ 2001-12-07  0:12 UTC (permalink / raw)
  To: Luca Montecchiani; +Cc: marcelo, Linux Kernel

> Hisax compile fix :                                                 
>                                                                     
> --- drivers/isdn/hisax/config.c.orig    Thu Dec  6 21:34:23 2001    
> +++ drivers/isdn/hisax/config.c Thu Dec  6 21:34:31 2001            
> @@ -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 ... :-) 
                                                                      
                                                                      
                                                                      
                                                                      

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

* Re: Linux 2.4.17-pre5
  2001-12-07  0:12 ` Stephan von Krawczynski
@ 2001-12-07  3:43   ` Keith Owens
  2001-12-07 11:55   ` Stephan von Krawczynski
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Owens @ 2001-12-07  3:43 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: Luca Montecchiani, Linux Kernel

On Fri, 07 Dec 2001 01:12:53 +0100, 
Stephan von Krawczynski <skraw@ithnet.com> wrote:
>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.



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

* Re: Linux 2.4.17-pre5
  2001-12-07  0:12 ` Stephan von Krawczynski
  2001-12-07  3:43   ` Keith Owens
@ 2001-12-07 11:55   ` Stephan von Krawczynski
  2001-12-07 13:35     ` Keith Owens
                       ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Stephan von Krawczynski @ 2001-12-07 11:55 UTC (permalink / raw)
  To: Keith Owens; +Cc: m.luca, linux-kernel

On Fri, 07 Dec 2001 14:43:06 +1100
Keith Owens <kaos@ocs.com.au> wrote:

> On Fri, 07 Dec 2001 01:12:53 +0100, 
> Stephan von Krawczynski <skraw@ithnet.com> wrote:
> >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.

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

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

* Re: Linux 2.4.17-pre5
  2001-12-07 11:55   ` Stephan von Krawczynski
@ 2001-12-07 13:35     ` Keith Owens
  2001-12-07 14:25     ` Stephan von Krawczynski
  2001-12-07 16:39     ` Linux 2.4.17-pre5 / Have fun with make Stephan von Krawczynski
  2 siblings, 0 replies; 8+ messages in thread
From: Keith Owens @ 2001-12-07 13:35 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: m.luca, linux-kernel

On Fri, 7 Dec 2001 12:55:30 +0100, 
Stephan von Krawczynski <skraw@ithnet.com> wrote:
>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)

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.


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

* Re: Linux 2.4.17-pre5
  2001-12-07 11:55   ` Stephan von Krawczynski
  2001-12-07 13:35     ` Keith Owens
@ 2001-12-07 14:25     ` Stephan von Krawczynski
  2001-12-07 16:39     ` Linux 2.4.17-pre5 / Have fun with make Stephan von Krawczynski
  2 siblings, 0 replies; 8+ messages in thread
From: Stephan von Krawczynski @ 2001-12-07 14:25 UTC (permalink / raw)
  To: Keith Owens; +Cc: m.luca, linux-kernel

On Sat, 08 Dec 2001 00:35:14 +1100
Keith Owens <kaos@ocs.com.au> wrote:

> On Fri, 7 Dec 2001 12:55:30 +0100, 
> Stephan von Krawczynski <skraw@ithnet.com> wrote:
> >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)
> 
> 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.

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


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

* Re: Linux 2.4.17-pre5 / Have fun with make
  2001-12-07 11:55   ` Stephan von Krawczynski
  2001-12-07 13:35     ` Keith Owens
  2001-12-07 14:25     ` Stephan von Krawczynski
@ 2001-12-07 16:39     ` Stephan von Krawczynski
  2001-12-07 22:21       ` Keith Owens
  2 siblings, 1 reply; 8+ messages in thread
From: Stephan von Krawczynski @ 2001-12-07 16:39 UTC (permalink / raw)
  To: Keith Owens; +Cc: m.luca, linux-kernel, alan

On Sat, 08 Dec 2001 00:35:14 +1100
Keith Owens <kaos@ocs.com.au> wrote:
> 
> 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.

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


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

* Re: Linux 2.4.17-pre5 / Have fun with make
  2001-12-07 16:39     ` Linux 2.4.17-pre5 / Have fun with make Stephan von Krawczynski
@ 2001-12-07 22:21       ` Keith Owens
  0 siblings, 0 replies; 8+ messages in thread
From: Keith Owens @ 2001-12-07 22:21 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: m.luca, linux-kernel, alan

On Fri, 7 Dec 2001 17:39:54 +0100, 
Stephan von Krawczynski <skraw@ithnet.com> wrote:
>On Sat, 08 Dec 2001 00:35:14 +1100
>Keith Owens <kaos@ocs.com.au> wrote:
>> 
>> 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.
>
>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.

>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.


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

end of thread, other threads:[~2001-12-07 22:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06 20:44 Linux 2.4.17-pre5 Luca Montecchiani
2001-12-07  0:12 ` Stephan von Krawczynski
2001-12-07  3:43   ` Keith Owens
2001-12-07 11:55   ` Stephan von Krawczynski
2001-12-07 13:35     ` Keith Owens
2001-12-07 14:25     ` Stephan von Krawczynski
2001-12-07 16:39     ` Linux 2.4.17-pre5 / Have fun with make Stephan von Krawczynski
2001-12-07 22:21       ` Keith Owens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.