linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: aisheng.dong@freescale.com (Dong Aisheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] pinctrl: fix pinmux_check_ops error checking
Date: Mon, 9 Apr 2012 17:09:22 +0800	[thread overview]
Message-ID: <20120409090920.GA28029@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <4F8257F7.60302@st.com>

On Mon, Apr 09, 2012 at 11:31:03AM +0800, Viresh Kumar wrote:
> On 4/6/2012 9:02 PM, Stephen Warren wrote:
> > On 04/06/2012 06:18 AM, Dong Aisheng wrote:
> >> > From: Dong Aisheng <dong.aisheng@linaro.org>
> >> > 
> >> > Do not use get_functions_count before checking.
> >> > 
> >> > Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
> > Acked-by: Stephen Warren <swarren@wwwdotorg.org>
> > 
> > IIRC, Viresh added some other get_*_count() functions in the same patch.
> > Do we need any more fixes similar to the this for those too?
> 
> Might not be required as this patch handles the pinmux_check_ops() routine.
> At other places ops is guaranteed to have correct value.
> 
Yes, core can guarantee it after pinmux_check_ops.
But i noticed for user interfaces, we may still need add some error checking
to avoid kernel oops like pinctrl_get_* and debugfs interfaces in case
the mux or config function is not supported by driver.
I'm going to send one more patch to fix it.

Regards
Dong Aisheng

      reply	other threads:[~2012-04-09  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 12:18 [PATCH 1/1] pinctrl: fix pinmux_check_ops error checking Dong Aisheng
2012-04-06 15:32 ` Stephen Warren
2012-04-09  3:31   ` Viresh Kumar
2012-04-09  9:09     ` Dong Aisheng [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=20120409090920.GA28029@shlinux2.ap.freescale.net \
    --to=aisheng.dong@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).