mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] of: unittest: Use platform_get_irq_optional() for non-existing interrupt
Date: Thu, 17 Oct 2019 12:17:11 -0500	[thread overview]
Message-ID: <d4b336ab-3a80-be4b-7a56-88cf98eb19aa@gmail.com> (raw)
In-Reply-To: <CAL_JsqL9YPowxntVPax868hi+sN3vgCa2aSSySzjg==--c7aDA@mail.gmail.com>

On 10/17/2019 07:51, Rob Herring wrote:
> On Thu, Oct 17, 2019 at 1:59 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>
>> Hi Stephen,
>>
>> On Thu, Oct 17, 2019 at 1:23 AM Stephen Boyd <swboyd@chromium.org> wrote:
>>> Quoting Geert Uytterhoeven (2019-10-16 07:31:42)
>>>> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
>>>> index 9efae29722588a35..34da22f8b0660989 100644
>>>> --- a/drivers/of/unittest.c
>>>> +++ b/drivers/of/unittest.c
>>>> @@ -1121,7 +1121,7 @@ static void __init of_unittest_platform_populate(void)
>>>>                 np = of_find_node_by_path("/testcase-data/testcase-device2");
>>>>                 pdev = of_find_device_by_node(np);
>>>>                 unittest(pdev, "device 2 creation failed\n");
>>>> -               irq = platform_get_irq(pdev, 0);
>>>> +               irq = platform_get_irq_optional(pdev, 0);
>>>>                 unittest(irq < 0 && irq != -EPROBE_DEFER,
>>>
>>> This is a test to make sure that irq failure doesn't return probe defer.
>>> Do we want to silence the error message that we're expecting to see?

No, we do not want to silence an error message that we are expecting to see.


>>
>> I think so.  We're not interested in error messages for expected failures,
>> only in error messages for unittest() failures.

platform_get_irq() is precisely the function that we are trying to test here.


> 
> The unittests start with a warning that error messages will be seen.
> OTOH, we didn't get a message here before.
Getting error messages from places outside of unittest.c is just the
nature of the devicetree selftest beast.

-Frank

> 
> Rob
> 


      reply	other threads:[~2019-10-17 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 14:31 Geert Uytterhoeven
2019-10-16 23:23 ` Stephen Boyd
2019-10-17  6:59   ` Geert Uytterhoeven
2019-10-17 12:51     ` Rob Herring
2019-10-17 17:17       ` Frank Rowand [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=d4b336ab-3a80-be4b-7a56-88cf98eb19aa@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.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

Powered by JetHome