linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: frowand.list@gmail.com, Rob Herring <robh+dt@kernel.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [Patch 1/5] dt: unittest: early return from test skips tests
Date: Fri, 27 Mar 2015 20:58:42 -0700	[thread overview]
Message-ID: <20150328035842.C5B62C40BA8@trevor.secretlab.ca> (raw)
In-Reply-To: <5503DBE4.8030006@gmail.com>

On Fri, 13 Mar 2015 23:57:40 -0700
, Frank Rowand <frowand.list@gmail.com>
 wrote:
> From: Frank Rowand <frank.rowand@sonymobile.com>
> 
> Fix bugs pointed out by checkpatch.
> 
> Mis-coding of two if statements caused early return from function.
> 
> Number of tests completed increased from 102 to 107.
> Number of tests failed increased from 0 to 2.

I was going to send this to Linus right away, but on second thought, it
isn't actually a regression fix. I'm going to queue it up for v4.1 with
the rest of the series instead.

I've also got a bug fix for the new warnings that I'll put in at the
same time.

g.

> 
> Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
> ---
>  drivers/of/unittest.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> Index: b/drivers/of/unittest.c
> ===================================================================
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -762,12 +762,14 @@ static void __init of_selftest_platform_
>  	irq = platform_get_irq(pdev, 0);
>  	selftest(irq < 0 && irq != -EPROBE_DEFER, "device parsing error failed - %d\n", irq);
>  
> -	if (selftest(np = of_find_node_by_path("/testcase-data/platform-tests"),
> -		     "No testcase data in device tree\n"));
> +	np = of_find_node_by_path("/testcase-data/platform-tests");
> +	selftest(np, "No testcase data in device tree\n");
> +	if (!np)
>  		return;
>  
> -	if (selftest(!(rc = device_register(&test_bus)),
> -		     "testbus registration failed; rc=%i\n", rc));
> +	rc = device_register(&test_bus);
> +	selftest(!rc, "testbus registration failed; rc=%i\n", rc);
> +	if (rc)
>  		return;
>  
>  	for_each_child_of_node(np, child) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2015-03-28 12:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14  5:25 [Patch 0/5] dt: unittest: fix breakage and warnings Frank Rowand
2015-03-14  6:57 ` [Patch 1/5] dt: unittest: early return from test skips tests Frank Rowand
2015-03-28  3:58   ` Grant Likely [this message]
2015-03-14  6:59 ` [Patch 2/5] dt: unittest: typo in error string Frank Rowand
2015-03-14  7:00 ` [Patch 3/5] dt: unittest: add const where needed Frank Rowand
2015-03-14  7:02 ` [Patch 4/5] dt: unittest: reduce checkpatch noise - line after declarations Frank Rowand
2015-03-14  7:04 ` [Patch 5/5] dt: unittest: breadcrumbs to reduce pain of future maintainers Frank Rowand
2015-03-28  2:55 ` [Patch 0/5] dt: unittest: fix breakage and warnings Grant Likely

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=20150328035842.C5B62C40BA8@trevor.secretlab.ca \
    --to=grant.likely@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.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).