* [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings
@ 2015-03-31 21:20 Mark Einon
2015-03-31 21:45 ` Borislav Petkov
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
0 siblings, 2 replies; 8+ messages in thread
From: Mark Einon @ 2015-03-31 21:20 UTC (permalink / raw)
To: x86; +Cc: tglx, linux-kernel, mingo, hpa, stuart.r.anderson, Mark Einon
Two static functions are only used if CONFIG_PCI is defined,so only build them
if this is the case. Fixes the build warnings:
arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
static void mem32_serial_out(unsigned long addr, int offset, int value)
^
arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
static unsigned int mem32_serial_in(unsigned long addr, int offset)
^
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
arch/x86/kernel/early_printk.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index f85e3fb..6a69625 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,6 +95,7 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
+#ifdef CONFIG_PCI
static void mem32_serial_out(unsigned long addr, int offset, int value)
{
uint32_t *vaddr = (uint32_t *)addr;
@@ -108,6 +109,7 @@ static unsigned int mem32_serial_in(unsigned long addr, int offset)
/* shift implied by pointer type */
return readl(vaddr + offset);
}
+#endif
static unsigned int io_serial_in(unsigned long addr, int offset)
{
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-03-31 21:20 [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings Mark Einon
@ 2015-03-31 21:45 ` Borislav Petkov
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
1 sibling, 0 replies; 8+ messages in thread
From: Borislav Petkov @ 2015-03-31 21:45 UTC (permalink / raw)
To: Mark Einon; +Cc: x86, tglx, linux-kernel, mingo, hpa, stuart.r.anderson
On Tue, Mar 31, 2015 at 10:20:12PM +0100, Mark Einon wrote:
> Two static functions are only used if CONFIG_PCI is defined,so only build them
> if this is the case. Fixes the build warnings:
>
> arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
> static void mem32_serial_out(unsigned long addr, int offset, int value)
> ^
> arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
> static unsigned int mem32_serial_in(unsigned long addr, int offset)
> ^
> Signed-off-by: Mark Einon <mark.einon@gmail.com>
> ---
> arch/x86/kernel/early_printk.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index f85e3fb..6a69625 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -95,6 +95,7 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
> #define DLL 0 /* Divisor Latch Low */
> #define DLH 1 /* Divisor latch High */
>
> +#ifdef CONFIG_PCI
> static void mem32_serial_out(unsigned long addr, int offset, int value)
> {
> uint32_t *vaddr = (uint32_t *)addr;
> @@ -108,6 +109,7 @@ static unsigned int mem32_serial_in(unsigned long addr, int offset)
> /* shift implied by pointer type */
> return readl(vaddr + offset);
> }
> +#endif
I'm sceptical we ever build x86 with CONFIG_PCI disabled but whatever.
Instead of adding another #ifdef CONFIG_PCI, please move those two
functions right over early_pci_serial_init() inside the #ifdef
CONFIG_PCI there.
Thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-03-31 21:20 [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings Mark Einon
2015-03-31 21:45 ` Borislav Petkov
@ 2015-03-31 22:07 ` Mark Einon
2015-04-01 7:54 ` Ingo Molnar
2015-04-01 21:32 ` [PATCH v3] " Mark Einon
1 sibling, 2 replies; 8+ messages in thread
From: Mark Einon @ 2015-03-31 22:07 UTC (permalink / raw)
To: x86; +Cc: tglx, bp, linux-kernel, mingo, hpa, stuart.r.anderson, Mark Einon
Two static functions are only used if CONFIG_PCI is defined,so only build them
if this is the case. Fixes the build warnings:
arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
static void mem32_serial_out(unsigned long addr, int offset, int value)
^
arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
static unsigned int mem32_serial_in(unsigned long addr, int offset)
^
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
v2 - Move code to another #ifdef instead of creating a new ifdef pair after
comment by Borislav Petkov <bp@alien8.de>.
arch/x86/kernel/early_printk.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index f85e3fb..cb2bab2 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
-static void mem32_serial_out(unsigned long addr, int offset, int value)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- writel(value, vaddr + offset);
-}
-
-static unsigned int mem32_serial_in(unsigned long addr, int offset)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- return readl(vaddr + offset);
-}
-
static unsigned int io_serial_in(unsigned long addr, int offset)
{
return inb(addr + offset);
@@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
}
#ifdef CONFIG_PCI
+static void mem32_serial_out(unsigned long addr, int offset, int value)
+{
+ uint32_t *vaddr = (uint32_t *)addr;
+ /* shift implied by pointer type */
+ writel(value, vaddr + offset);
+}
+
+static unsigned int mem32_serial_in(unsigned long addr, int offset)
+{
+ uint32_t *vaddr = (uint32_t *)addr;
+ /* shift implied by pointer type */
+ return readl(vaddr + offset);
+}
+
/*
* early_pci_serial_init()
*
@@ -375,6 +375,12 @@ static int __init setup_early_printk(char *buf)
if (!strncmp(buf, "xen", 3))
early_console_register(&xenboot_console, keep);
#endif
+#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
+ if (!strncmp(buf, "hsu", 3)) {
+ hsu_early_console_init(buf + 3);
+ early_console_register(&early_hsu_console, keep);
+ }
+#endif
#ifdef CONFIG_EARLY_PRINTK_EFI
if (!strncmp(buf, "efi", 3))
early_console_register(&early_efi_console, keep);
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
@ 2015-04-01 7:54 ` Ingo Molnar
2015-04-01 8:05 ` Mark Einon
2015-04-01 21:32 ` [PATCH v3] " Mark Einon
1 sibling, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2015-04-01 7:54 UTC (permalink / raw)
To: Mark Einon; +Cc: x86, tglx, bp, linux-kernel, mingo, hpa, stuart.r.anderson
* Mark Einon <mark.einon@gmail.com> wrote:
> Two static functions are only used if CONFIG_PCI is defined,so only build them
> if this is the case. Fixes the build warnings:
>
> arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
> static void mem32_serial_out(unsigned long addr, int offset, int value)
> ^
> arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
> static unsigned int mem32_serial_in(unsigned long addr, int offset)
> ^
>
> Signed-off-by: Mark Einon <mark.einon@gmail.com>
> ---
> v2 - Move code to another #ifdef instead of creating a new ifdef pair after
> comment by Borislav Petkov <bp@alien8.de>.
>
>
> arch/x86/kernel/early_printk.c | 34 ++++++++++++++++++++--------------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> index f85e3fb..cb2bab2 100644
> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
> #define DLL 0 /* Divisor Latch Low */
> #define DLH 1 /* Divisor latch High */
>
> -static void mem32_serial_out(unsigned long addr, int offset, int value)
> -{
> - uint32_t *vaddr = (uint32_t *)addr;
> - /* shift implied by pointer type */
> - writel(value, vaddr + offset);
> -}
> -
> -static unsigned int mem32_serial_in(unsigned long addr, int offset)
> -{
> - uint32_t *vaddr = (uint32_t *)addr;
> - /* shift implied by pointer type */
> - return readl(vaddr + offset);
> -}
> -
> static unsigned int io_serial_in(unsigned long addr, int offset)
> {
> return inb(addr + offset);
> @@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
> }
>
> #ifdef CONFIG_PCI
> +static void mem32_serial_out(unsigned long addr, int offset, int value)
> +{
> + uint32_t *vaddr = (uint32_t *)addr;
> + /* shift implied by pointer type */
> + writel(value, vaddr + offset);
> +}
> +
> +static unsigned int mem32_serial_in(unsigned long addr, int offset)
> +{
> + uint32_t *vaddr = (uint32_t *)addr;
> + /* shift implied by pointer type */
> + return readl(vaddr + offset);
> +}
btw., while at it, this should use 'u32'.
> +
> /*
> * early_pci_serial_init()
> *
> @@ -375,6 +375,12 @@ static int __init setup_early_printk(char *buf)
> if (!strncmp(buf, "xen", 3))
> early_console_register(&xenboot_console, keep);
> #endif
> +#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
> + if (!strncmp(buf, "hsu", 3)) {
> + hsu_early_console_init(buf + 3);
> + early_console_register(&early_hsu_console, keep);
> + }
> +#endif
> #ifdef CONFIG_EARLY_PRINTK_EFI
> if (!strncmp(buf, "efi", 3))
> early_console_register(&early_efi_console, keep);
huh?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-04-01 7:54 ` Ingo Molnar
@ 2015-04-01 8:05 ` Mark Einon
0 siblings, 0 replies; 8+ messages in thread
From: Mark Einon @ 2015-04-01 8:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Mark Einon, x86, tglx, bp, linux-kernel, mingo, hpa, stuart.r.anderson
On Wed, Apr 01, 2015 at 09:54:10AM +0200, Ingo Molnar wrote:
>
> * Mark Einon <mark.einon@gmail.com> wrote:
>
> > Two static functions are only used if CONFIG_PCI is defined,so only build them
> > if this is the case. Fixes the build warnings:
> >
> > arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
> > static void mem32_serial_out(unsigned long addr, int offset, int value)
> > ^
> > arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
> > static unsigned int mem32_serial_in(unsigned long addr, int offset)
> > ^
> >
> > Signed-off-by: Mark Einon <mark.einon@gmail.com>
> > ---
> > v2 - Move code to another #ifdef instead of creating a new ifdef pair after
> > comment by Borislav Petkov <bp@alien8.de>.
> >
> >
> > arch/x86/kernel/early_printk.c | 34 ++++++++++++++++++++--------------
> > 1 file changed, 20 insertions(+), 14 deletions(-)
> >
> > diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
> > index f85e3fb..cb2bab2 100644
> > --- a/arch/x86/kernel/early_printk.c
> > +++ b/arch/x86/kernel/early_printk.c
> > @@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
> > #define DLL 0 /* Divisor Latch Low */
> > #define DLH 1 /* Divisor latch High */
> >
> > -static void mem32_serial_out(unsigned long addr, int offset, int value)
> > -{
> > - uint32_t *vaddr = (uint32_t *)addr;
> > - /* shift implied by pointer type */
> > - writel(value, vaddr + offset);
> > -}
> > -
> > -static unsigned int mem32_serial_in(unsigned long addr, int offset)
> > -{
> > - uint32_t *vaddr = (uint32_t *)addr;
> > - /* shift implied by pointer type */
> > - return readl(vaddr + offset);
> > -}
> > -
> > static unsigned int io_serial_in(unsigned long addr, int offset)
> > {
> > return inb(addr + offset);
> > @@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
> > }
> >
> > #ifdef CONFIG_PCI
> > +static void mem32_serial_out(unsigned long addr, int offset, int value)
> > +{
> > + uint32_t *vaddr = (uint32_t *)addr;
> > + /* shift implied by pointer type */
> > + writel(value, vaddr + offset);
> > +}
> > +
> > +static unsigned int mem32_serial_in(unsigned long addr, int offset)
> > +{
> > + uint32_t *vaddr = (uint32_t *)addr;
> > + /* shift implied by pointer type */
> > + return readl(vaddr + offset);
> > +}
>
> btw., while at it, this should use 'u32'.
Sure, I can change this.
> > +
> > /*
> > * early_pci_serial_init()
> > *
> > @@ -375,6 +375,12 @@ static int __init setup_early_printk(char *buf)
> > if (!strncmp(buf, "xen", 3))
> > early_console_register(&xenboot_console, keep);
> > #endif
> > +#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
> > + if (!strncmp(buf, "hsu", 3)) {
> > + hsu_early_console_init(buf + 3);
> > + early_console_register(&early_hsu_console, keep);
> > + }
> > +#endif
> > #ifdef CONFIG_EARLY_PRINTK_EFI
> > if (!strncmp(buf, "efi", 3))
> > early_console_register(&early_efi_console, keep);
>
> huh?
Ah, my bad - looks like I patched the wrong branch before resending. I'll do a
v3 with the other change above.
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
2015-04-01 7:54 ` Ingo Molnar
@ 2015-04-01 21:32 ` Mark Einon
2015-04-02 4:35 ` Borislav Petkov
2015-04-03 14:06 ` [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef tip-bot for Mark Einon
1 sibling, 2 replies; 8+ messages in thread
From: Mark Einon @ 2015-04-01 21:32 UTC (permalink / raw)
To: x86; +Cc: tglx, mingo, bp, linux-kernel, hpa, stuart.r.anderson, Mark Einon
Two static functions are only used if CONFIG_PCI is defined,so only build them
if this is the case. Fixes the build warnings:
arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
static void mem32_serial_out(unsigned long addr, int offset, int value)
^
arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
static unsigned int mem32_serial_in(unsigned long addr, int offset)
^
Also convert a few related instances of uintXX_t to kernel specific uXX defines.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
v2 - Move code to another #ifdef instead of creating a new ifdef pair after
comment by Borislav Petkov <bp@alien8.de>.
v3 - Fixed commit errors from v2, changed some uintXX_t data types to equivalent uXX.
arch/x86/kernel/early_printk.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index f85e3fb..89427d8 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
-static void mem32_serial_out(unsigned long addr, int offset, int value)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- writel(value, vaddr + offset);
-}
-
-static unsigned int mem32_serial_in(unsigned long addr, int offset)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- return readl(vaddr + offset);
-}
-
static unsigned int io_serial_in(unsigned long addr, int offset)
{
return inb(addr + offset);
@@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
}
#ifdef CONFIG_PCI
+static void mem32_serial_out(unsigned long addr, int offset, int value)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ writel(value, vaddr + offset);
+}
+
+static unsigned int mem32_serial_in(unsigned long addr, int offset)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ return readl(vaddr + offset);
+}
+
/*
* early_pci_serial_init()
*
@@ -217,8 +217,8 @@ static __init void early_pci_serial_init(char *s)
unsigned divisor;
unsigned long baud = DEFAULT_BAUD;
u8 bus, slot, func;
- uint32_t classcode, bar0;
- uint16_t cmdreg;
+ u32 classcode, bar0;
+ u16 cmdreg;
char *e;
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3] x86, earlyprintk: Fix two 'defined but not used' compile warnings
2015-04-01 21:32 ` [PATCH v3] " Mark Einon
@ 2015-04-02 4:35 ` Borislav Petkov
2015-04-03 14:06 ` [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef tip-bot for Mark Einon
1 sibling, 0 replies; 8+ messages in thread
From: Borislav Petkov @ 2015-04-02 4:35 UTC (permalink / raw)
To: Mark Einon; +Cc: x86, tglx, mingo, linux-kernel, hpa, stuart.r.anderson
On Wed, Apr 01, 2015 at 10:32:04PM +0100, Mark Einon wrote:
> Two static functions are only used if CONFIG_PCI is defined,so only build them
> if this is the case. Fixes the build warnings:
>
> arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
> static void mem32_serial_out(unsigned long addr, int offset, int value)
> ^
> arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
> static unsigned int mem32_serial_in(unsigned long addr, int offset)
> ^
>
> Also convert a few related instances of uintXX_t to kernel specific uXX defines.
>
> Signed-off-by: Mark Einon <mark.einon@gmail.com>
> ---
> v2 - Move code to another #ifdef instead of creating a new ifdef pair after
> comment by Borislav Petkov <bp@alien8.de>.
>
> v3 - Fixed commit errors from v2, changed some uintXX_t data types to equivalent uXX.
>
> arch/x86/kernel/early_printk.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef
2015-04-01 21:32 ` [PATCH v3] " Mark Einon
2015-04-02 4:35 ` Borislav Petkov
@ 2015-04-03 14:06 ` tip-bot for Mark Einon
1 sibling, 0 replies; 8+ messages in thread
From: tip-bot for Mark Einon @ 2015-04-03 14:06 UTC (permalink / raw)
To: linux-tip-commits; +Cc: tglx, mark.einon, mingo, hpa, linux-kernel, bp
Commit-ID: 7f99f8b94c9355acdb14f1be28cb19aac741da68
Gitweb: http://git.kernel.org/tip/7f99f8b94c9355acdb14f1be28cb19aac741da68
Author: Mark Einon <mark.einon@gmail.com>
AuthorDate: Wed, 1 Apr 2015 22:32:04 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Apr 2015 15:21:56 +0200
x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef
Two static functions are only used if CONFIG_PCI is defined, so only
build them if this is the case. Fixes the build warnings:
arch/x86/kernel/early_printk.c:98:13: warning: ‘mem32_serial_out’ defined but not used [-Wunused-function]
static void mem32_serial_out(unsigned long addr, int offset, int value)
^
arch/x86/kernel/early_printk.c:105:21: warning: ‘mem32_serial_in’ defined but not used [-Wunused-function]
static unsigned int mem32_serial_in(unsigned long addr, int offset)
^
Also convert a few related instances of uintXX_t to kernel specific uXX
defines.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stuart.r.anderson@intel.com
Link: http://lkml.kernel.org/r/1427923924-22653-1-git-send-email-mark.einon@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/early_printk.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index a62536a..49ff55e 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -95,20 +95,6 @@ static unsigned long early_serial_base = 0x3f8; /* ttyS0 */
#define DLL 0 /* Divisor Latch Low */
#define DLH 1 /* Divisor latch High */
-static void mem32_serial_out(unsigned long addr, int offset, int value)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- writel(value, vaddr + offset);
-}
-
-static unsigned int mem32_serial_in(unsigned long addr, int offset)
-{
- uint32_t *vaddr = (uint32_t *)addr;
- /* shift implied by pointer type */
- return readl(vaddr + offset);
-}
-
static unsigned int io_serial_in(unsigned long addr, int offset)
{
return inb(addr + offset);
@@ -205,6 +191,20 @@ static __init void early_serial_init(char *s)
}
#ifdef CONFIG_PCI
+static void mem32_serial_out(unsigned long addr, int offset, int value)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ writel(value, vaddr + offset);
+}
+
+static unsigned int mem32_serial_in(unsigned long addr, int offset)
+{
+ u32 *vaddr = (u32 *)addr;
+ /* shift implied by pointer type */
+ return readl(vaddr + offset);
+}
+
/*
* early_pci_serial_init()
*
@@ -217,8 +217,8 @@ static __init void early_pci_serial_init(char *s)
unsigned divisor;
unsigned long baud = DEFAULT_BAUD;
u8 bus, slot, func;
- uint32_t classcode, bar0;
- uint16_t cmdreg;
+ u32 classcode, bar0;
+ u16 cmdreg;
char *e;
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-04-03 14:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 21:20 [PATCH] x86, earlyprintk: Fix two 'defined but not used' compile warnings Mark Einon
2015-03-31 21:45 ` Borislav Petkov
2015-03-31 22:07 ` [PATCH v2] " Mark Einon
2015-04-01 7:54 ` Ingo Molnar
2015-04-01 8:05 ` Mark Einon
2015-04-01 21:32 ` [PATCH v3] " Mark Einon
2015-04-02 4:35 ` Borislav Petkov
2015-04-03 14:06 ` [tip:x86/cleanups] x86/earlyprintk: Put CONFIG_PCI-only functions under the #ifdef tip-bot for Mark Einon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).