All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh.kumar@st.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] using amba_pl08x driver for s3c64xx SoCs
Date: Mon, 8 Aug 2011 09:39:35 +0530	[thread overview]
Message-ID: <4E3F617F.3070508@st.com> (raw)
In-Reply-To: <CAGOxZ53edhKA=VbhJJKG--LoG6P8Y+ubKdH5-4woDgBEbTdtVQ@mail.gmail.com>

On 08/05/2011 04:40 PM, Alim Akhtar wrote:
>>> >> @@ -1953,7 +2048,7 @@ static int pl08x_probe(struct amba_device *adev,
>>> >> const struct amba_id *id)
>>> >>                spin_lock_init(&ch->lock);
>>> >>                ch->serving = NULL;
>>> >>                ch->signal = -1;
>>> >> -               dev_info(&adev->dev,
>>> >> +               dev_dbg(&adev->dev,
>>> >>                         "physical channel %d is %s\n", i,
>>> >>                         pl08x_phy_channel_busy(ch) ? "BUSY" : "FREE");
>>> >>        }
>> >
>> > Check Russells and Vireshs recent patches, I think they have already
>> > fixed up a lot of debug prints.

Yes I already updated this to dev_dbg in my patchset.

> I have a concern here, let say if the dev_dbg is enabled, first call
> to pl08x_phy_channel_busy() with ch->serving=NULL will give me NULL
> pointer dereferencing crash.
> please see pl08x_phy_channel_busy() definition.

Sorry, but i couldn't get why will we get a crash here.

pl08x_phy_channel_busy() looks like this:

static int pl08x_phy_channel_busy(struct pl08x_phy_chan *ch)
{
	unsigned int val;

	val = readl(ch->base + PL080_CH_CONFIG);
	return val & PL080_CONFIG_ACTIVE;
}

ch->base is already initialized and clock is enabled by amba layer.

Sorry if I am missing something Obvious.

-- 
viresh

      parent reply	other threads:[~2011-08-08  4:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGOxZ50Rz3ynmkuoJb9Pgc0b1pG++-CB9kUtU92zKYtfP3jtRg@mail.gmail.com>
2011-08-05  8:48 ` [RFC] using amba_pl08x driver for s3c64xx SoCs Linus Walleij
2011-08-05 11:10   ` Alim Akhtar
2011-08-05 13:19     ` Linus Walleij
2011-08-08  4:25       ` viresh kumar
2011-08-08  4:51         ` Alim Akhtar
2011-08-11 15:04           ` Linus Walleij
2011-08-08  4:09     ` viresh kumar [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=4E3F617F.3070508@st.com \
    --to=viresh.kumar@st.com \
    --cc=linux-arm-kernel@lists.infradead.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.