public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kristoffer Glembo <kristoffer@gaisler.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH] [OOPS] apbuart.c: Two problems related to 	grlib_apbuart_configure()
Date: Tue, 11 May 2010 09:11:53 +0200	[thread overview]
Message-ID: <4BE90339.8080304@gaisler.com> (raw)
In-Reply-To: <AANLkTikatJDpPHw8WeE7XwLVgeg4A1Atd2ARoJxomzzl@mail.gmail.com>

Miguel Ojeda wrote:
> On Sat, May 8, 2010 at 11:58 PM, Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
>> Hi,
>>
>> I found two problems using the Simics' sunfire target, so maybe the
>> following does not occur in real machines.
>>
>> 1. At grlib_apbuart_configure() in apbuart.c, prop can be NULL if
>> "clock-frequency" doesn't exist in the OF tree:
>>
>>        /* Get bus frequency */
>>        rp = of_find_node_by_path("/");
>>        rp = of_get_next_child(rp, NULL);
>>        prop = of_get_property(rp, "clock-frequency", NULL);
>>        freq_khz = *prop;
>>
>> 2. In addition, apbuart.c does not check if there aren't any ports
>> configured after calls to grlib_apbuart_configure(), so other oops will
>> occur if no port was configured (e.g. uart_set_options() because of
>> port->ops).
>>
>> In order to solve that, I added a check after both of the calls to
>> grlib_apbuart_configure().
>>
>> The patch that I provide below prevents both problems in the Simics'
>> sunfire target.
>>
>> Tested against 2.6.33.3. Please review.
>>
>> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>


Thanks for the patch, it looks fine to me. 

Acked-by: Kristoffer Glembo <kristoffer@gaisler.com>



  reply	other threads:[~2010-05-11  8:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-08 21:58 [PATCH] [OOPS] apbuart.c: Two problems related to grlib_apbuart_configure() Miguel Ojeda
2010-05-10 13:20 ` Miguel Ojeda
2010-05-11  7:11   ` Kristoffer Glembo [this message]
2010-05-11 13:38 ` Miguel Ojeda
2010-05-11 13:42   ` Kristoffer Glembo
2010-05-20 19:52 ` [alternative-merged] serial-apbuartc-fix-two-problems-related-to-grlib_apbuart_configure.patch removed from -mm tree Miguel Ojeda
2010-05-20 20:09   ` Miguel Ojeda

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=4BE90339.8080304@gaisler.com \
    --to=kristoffer@gaisler.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox