All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: ambx1@neo.rr.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] PNP: use dev_printk for quirk messages
Date: Wed, 12 Mar 2008 14:22:31 -0700	[thread overview]
Message-ID: <20080312142231.cf6ecc46.akpm@linux-foundation.org> (raw)
In-Reply-To: <200803041647.28298.bjorn.helgaas@hp.com>

On Tue, 4 Mar 2008 16:47:27 -0700
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

> Convert quirk printks to dev_printk().
> 
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> 
> Index: linux-mm/drivers/pnp/quirks.c
> ===================================================================
> --- linux-mm.orig/drivers/pnp/quirks.c	2008-03-04 16:41:17.000000000 -0700
> +++ linux-mm/drivers/pnp/quirks.c	2008-03-04 16:44:00.000000000 -0700
> @@ -51,7 +51,8 @@
>  		port3->min += 0x800;
>  		port3->max += 0x800;
>  	}
> -	printk(KERN_INFO "pnp: AWE32 quirk - adding two ports\n");
> +	dev_info(&dev->dev, "AWE32 quirk - added ioports 0x%lx and 0x%lx\n",
> +		(unsigned long) port2->min, (unsigned long) port3->min);
>  }

drivers/pnp/quirks.c: In function 'quirk_awe32_resources':
drivers/pnp/quirks.c:25: warning: 'port3' may be used uninitialized in this function
drivers/pnp/quirks.c:25: warning: 'port2' may be used uninitialized in this function

the warning is correct, methinks.  If dev->dependent happens to be NULL,
we oops.

I'll just move the dev_info() inside the loop, which is more logical and
is actually correct.  The code at present will only print the last-added
ports?

  reply	other threads:[~2008-03-12 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 23:47 [PATCH] PNP: use dev_printk for quirk messages Bjorn Helgaas
2008-03-12 21:22 ` Andrew Morton [this message]
2008-03-12 21:44   ` Bjorn Helgaas

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=20080312142231.cf6ecc46.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ambx1@neo.rr.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    /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 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.