public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: early_printk.c trivial sparse fixes
@ 2008-08-18 23:56 Harvey Harrison
  2008-08-19  0:14 ` Ingo Molnar
  2008-08-29  5:19 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-08-18 23:56 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: H. Peter Anvin, LKML

arch/x86/kernel/early_printk.c:404:13: warning: incorrect type in assignment (different base types)
arch/x86/kernel/early_printk.c:404:13:    expected restricted __le16 [assigned] [usertype] wValue
arch/x86/kernel/early_printk.c:404:13:    got int [signed] value
arch/x86/kernel/early_printk.c:405:13: warning: incorrect type in assignment (different base types)
arch/x86/kernel/early_printk.c:405:13:    expected restricted __le16 [assigned] [usertype] wIndex
arch/x86/kernel/early_printk.c:405:13:    got int [signed] index
arch/x86/kernel/early_printk.c:406:14: warning: incorrect type in assignment (different base types)
arch/x86/kernel/early_printk.c:406:14:    expected restricted __le16 [assigned] [usertype] wLength
arch/x86/kernel/early_printk.c:406:14:    got int [signed] size
arch/x86/kernel/early_printk.c:845:16: warning: Using plain integer as NULL pointer
arch/x86/kernel/early_printk.c:992:13: warning: symbol 'enable_debug_console' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
On top of next-20080818

 arch/x86/kernel/early_printk.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 28155ac..825e913 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -401,9 +401,9 @@ static int dbgp_control_msg(unsigned devnum, int requesttype, int request,
 	/* Compute the control message */
 	req.bRequestType = requesttype;
 	req.bRequest = request;
-	req.wValue = value;
-	req.wIndex = index;
-	req.wLength = size;
+	req.wValue = cpu_to_le16(value);
+	req.wIndex = cpu_to_le16(index);
+	req.wLength = cpu_to_le16(size);
 
 	pids = DBGP_PID_SET(USB_PID_DATA0, USB_PID_SETUP);
 	addr = DBGP_EPADDR(devnum, 0);
@@ -842,7 +842,7 @@ static int __init early_dbgp_init(char *s)
 	ret = ehci_setup();
 	if (ret < 0) {
 		dbgp_printk("ehci_setup failed\n");
-		ehci_debug = 0;
+		ehci_debug = NULL;
 
 		return -1;
 	}
@@ -989,7 +989,7 @@ static int __init setup_early_printk(char *buf)
 	return 0;
 }
 
-void __init enable_debug_console(char *buf)
+static void __init enable_debug_console(char *buf)
 {
 #ifdef DBGP_DEBUG
 	struct console *old_early_console = NULL;
-- 
1.6.0.274.g8aacc




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

* Re: [PATCH] x86: early_printk.c trivial sparse fixes
  2008-08-18 23:56 [PATCH] x86: early_printk.c trivial sparse fixes Harvey Harrison
@ 2008-08-19  0:14 ` Ingo Molnar
  2008-08-29  5:19 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-08-19  0:14 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: H. Peter Anvin, LKML


* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> arch/x86/kernel/early_printk.c:404:13: warning: incorrect type in assignment (different base types)
> arch/x86/kernel/early_printk.c:404:13:    expected restricted __le16 [assigned] [usertype] wValue
> arch/x86/kernel/early_printk.c:404:13:    got int [signed] value
> arch/x86/kernel/early_printk.c:405:13: warning: incorrect type in assignment (different base types)
> arch/x86/kernel/early_printk.c:405:13:    expected restricted __le16 [assigned] [usertype] wIndex
> arch/x86/kernel/early_printk.c:405:13:    got int [signed] index
> arch/x86/kernel/early_printk.c:406:14: warning: incorrect type in assignment (different base types)
> arch/x86/kernel/early_printk.c:406:14:    expected restricted __le16 [assigned] [usertype] wLength
> arch/x86/kernel/early_printk.c:406:14:    got int [signed] size
> arch/x86/kernel/early_printk.c:845:16: warning: Using plain integer as NULL pointer
> arch/x86/kernel/early_printk.c:992:13: warning: symbol 'enable_debug_console' was not declared. Should it be static?
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

applied to tip/x86/early-printk - thanks Harvey!

	Ingo

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

* Re: [PATCH] x86: early_printk.c trivial sparse fixes
  2008-08-18 23:56 [PATCH] x86: early_printk.c trivial sparse fixes Harvey Harrison
  2008-08-19  0:14 ` Ingo Molnar
@ 2008-08-29  5:19 ` Andrew Morton
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2008-08-29  5:19 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Ingo Molnar, H. Peter Anvin, LKML, Yinghai Lu

On Mon, 18 Aug 2008 16:56:29 -0700 Harvey Harrison <harvey.harrison@gmail.com> wrote:

> --- a/arch/x86/kernel/early_printk.c
> +++ b/arch/x86/kernel/early_printk.c
> @@ -989,7 +989,7 @@ static int __init setup_early_printk(char *buf)
>  	return 0;
>  }
>  
> -void __init enable_debug_console(char *buf)
> +static void __init enable_debug_console(char *buf)
>  {
>  #ifdef DBGP_DEBUG
>  	struct console *old_early_console = NULL;

umm,

arch/x86/kernel/early_printk.c:993: warning: 'enable_debug_console' defined but not used

enable_debug_console() never has been used afaict.  If it was supposed
to be a __setup function then it'll need documentation in
Documentation/kernel-parameters.txt too, please.


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

end of thread, other threads:[~2008-08-29  5:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 23:56 [PATCH] x86: early_printk.c trivial sparse fixes Harvey Harrison
2008-08-19  0:14 ` Ingo Molnar
2008-08-29  5:19 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox