All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: hans-christian.egtvedt@atmel.com, linux-kernel@vger.kernel.org,
	Kay Sievers <kay.sievers@vrfy.org>,
	Haavard Skinnemoen <hskinnemoen@atmel.com>,
	Huang Weiyi <weiyi.huang@gmail.com>
Subject: Re: [PATCH 1/1] atmel-ssc: fix misuse of dev_dbg when requested ssc instance is not found
Date: Thu, 29 Jan 2009 15:50:42 -0800	[thread overview]
Message-ID: <20090129155042.e0ea148d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090129174655.1f440f3e@hcegtvedt>

On Thu, 29 Jan 2009 17:46:55 +0100
Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> wrote:

> On Mon, 19 Jan 2009 13:57:56 +0100
> Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> wrote:
> > This patch replaces the dev_dbg(...) with a pr_err since the ssc
> > pointer is not valid when the id is not found in the list.
> > 
> > Signed-off-by: Hans-Christian Egtvedt
> > <hans-christian.egtvedt@atmel.com> ---
> >  drivers/misc/atmel-ssc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
> > index 6b35874..6cff1bb 100644
> > --- a/drivers/misc/atmel-ssc.c
> > +++ b/drivers/misc/atmel-ssc.c
> > @@ -35,7 +35,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
> >  
> >  	if (!ssc_valid) {
> >  		spin_unlock(&user_lock);
> > -		dev_dbg(&ssc->pdev->dev, "could not find requested device\n");
> > +		pr_err("ssc: ssc%d platform device is missing\n", ssc_num);
> >  		return ERR_PTR(-ENODEV);
> >  	}
> >  
> 
> Bump, or did I miss the merge window?
> 

(Top-posting repaired.  Please don't do that!  It makes it horrid to
reply to you)

(Suitable cc's added - this was why your patch got lost)

The patch seems reasonable but the changelog seems to be quite
misleading.  I did this:

   The ssc pointer is not valid when the id is not found in the
   list.  Convert the message from a debug one into an error message
   and avoid dereferencing the bad pointer.

OK?

  reply	other threads:[~2009-01-29 23:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 12:57 [PATCH 1/1] atmel-ssc: fix misuse of dev_dbg when requested ssc instance is not found Hans-Christian Egtvedt
2009-01-29 16:46 ` Hans-Christian Egtvedt
2009-01-29 23:50   ` Andrew Morton [this message]
2009-01-30  8:20     ` Hans-Christian Egtvedt
2009-01-30  8:35       ` Andrew Morton
2009-01-30  9:26 ` Haavard Skinnemoen
2009-01-30  9:36   ` Andrew Morton
2009-01-30  9:50     ` Hans-Christian Egtvedt
2009-01-30 12:54       ` Mark Brown

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=20090129155042.e0ea148d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hans-christian.egtvedt@atmel.com \
    --cc=hskinnemoen@atmel.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyi.huang@gmail.com \
    /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.