public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [TRIVIAL] drivers/input/serio/i8042-x86ia64.h
Date: Mon, 4 Jul 2005 16:35:01 +0200	[thread overview]
Message-ID: <20050704143501.GA1075@ucw.cz> (raw)
In-Reply-To: <42C6BCC5.8060809@keyaccess.nl>

On Sat, Jul 02, 2005 at 06:11:49PM +0200, Rene Herman wrote:
> Hi Andrew.
> 
> Non-trivial in that I'm unsure of original intent but trivial in that 
> it's just a printk()...
> 
> On bootup, I see:
> 
> pnp: the driver 'i8042 kbd' has been registered
> pnp: match found with the PnP device '00:05' and the driver 'i8042 kbd'
> pnp: the driver 'i8042 aux' has been registered
> PNP: PS/2 controller doesn't have AUX irq; using default 0xc
> PNP: PS/2 Controller [PNP0303] at 0x60,0x64 irq 112
> serio: i8042 AUX port at 0x60,0x64 irq 12
> serio: i8042 KBD port at 0x60,0x64 irq 1
> 
> That "irq 112" (last PNP: line) should read "irq 1,12" but is being run 
> together:
> 
> printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n",
> 	i8042_pnp_kbd_name,
> 	(result_kbd > 0 && result_aux > 0) ? "," : "",
> 	i8042_pnp_aux_name,
> 	i8042_data_reg,
> 	i8042_command_reg,
> 	i8042_kbd_irq,
> 	(result_aux > 0) ? "," : "", i8042_aux_irq);
> 
> That first 'foo ? "," : ""' construct there seems somewhat okay-ish 
> since i8042_pnp_aux_name is a 0-string when result_aux <= 0, but this 
> obviously does not work for i8042_aux_irq (an integer).

I've already fixed this part in my code, and will be pushing it upstream
as soon as the input GIT tree gets merged by Linus.

> In my case result_aux is 0 due to my BIOS not exporting a PS/2 mouse PNP 
> id after which the code just assigns the default irq 12 (the first PNP: 
> line above) but winds up printing "irq 112". Due to that default 
> assignment, the correct fix would seem to be to just have "%d,%d". 
> Attachment does this (and takes the opportunity to change two %#x format 
> specifiers for the IRQs to %d).
> 
> Did not know who to more specifically bother about this; hope that's okay.

> --- linux-2.6.12.2/drivers/input/serio/i8042-x86ia64io.h.orig	2005-07-02 16:49:16.000000000 +0200
> +++ linux-2.6.12.2/drivers/input/serio/i8042-x86ia64io.h	2005-07-02 16:51:17.000000000 +0200
> @@ -281,12 +281,12 @@
>  	}
>  
>  	if (!i8042_pnp_kbd_irq) {
> -		printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %#x\n", i8042_kbd_irq);
> +		printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n", i8042_kbd_irq);
>  		i8042_pnp_kbd_irq = i8042_kbd_irq;
>  	}
>  
>  	if (!i8042_pnp_aux_irq) {
> -		printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq);
> +		printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %d\n", i8042_aux_irq);
>  		i8042_pnp_aux_irq = i8042_aux_irq;
>  	}

And I'm fixing this now, too.

> @@ -300,10 +300,9 @@
>  	i8042_kbd_irq = i8042_pnp_kbd_irq;
>  	i8042_aux_irq = i8042_pnp_aux_irq;
>  
> -	printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n",
> +	printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d,%d\n",
>  		i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "", i8042_pnp_aux_name,
> -		i8042_data_reg, i8042_command_reg, i8042_kbd_irq,
> -		(result_aux > 0) ? "," : "", i8042_aux_irq);
> +		i8042_data_reg, i8042_command_reg, i8042_kbd_irq, i8042_aux_irq);
>  
>  	return 0;
>  }


-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

      reply	other threads:[~2005-07-04 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-02 16:11 [TRIVIAL] drivers/input/serio/i8042-x86ia64.h Rene Herman
2005-07-04 14:35 ` Vojtech Pavlik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050704143501.GA1075@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox