Re: [PATCH]: remove warnings on promlib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18 Dec 2002, Juan Quintela wrote:

> Index: arch/mips/lib/promlib.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/lib/promlib.c,v
> retrieving revision 1.1.2.1
> diff -u -r1.1.2.1 promlib.c
> --- arch/mips/lib/promlib.c	28 Sep 2002 22:28:38 -0000	1.1.2.1
> +++ arch/mips/lib/promlib.c	18 Dec 2002 00:49:18 -0000
> @@ -1,3 +1,7 @@
> +
> +#include <asm/sgialib.h>
> +#include <linux/kernel.h>
> +
>  #include <stdarg.h>
>  
>  void prom_printf(char *fmt, ...)

 A few comments:

1. <linux> includes first, <asm> ones following (hmm, shouldn't that be
obvious...).

2. <linux/kernel.h> is obviously OK for vsprintf().

3. I would hesitate using <asm/sgialib.h> here being too much platform
specific.  Either a separate generic <asm/prom.h> should be created for
primitives like prom_putchar(), prom_getchar(), etc. or a private
conservative declaration should be used here.  The reason is the functions
are much platform-specific, e.g. they may be pointers or even macros --
see <asm/dec/prom.h> for a not-so-trivial example (luckily, DECstations
support prom_printf() directly, so they don't have to use promlib.c).

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux