From patchwork Sun Jun 7 14:20:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 49604 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CE5322B3F for ; Sun, 7 Jun 2015 17:01:24 +0000 (UTC) Received: by wgv5 with SMTP id 5sf27663360wgv.0 for ; Sun, 07 Jun 2015 10:01:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=WKT701pFb9lKkJccN8VSC3JOxcJzFiahm6DpUqOoyZ0=; b=OQpGNhvUu3sOmuNSlZcj6NUSq/gQkw7a+bJfPsJixZ72tVSnkbOVPPpLV4yycxtGoZ SwKvZsNTHl+Jp2vuGZ0FLZ1Wg04RvrkDqNSgj8gDBh24odSkMQ4dorqKjlYM835nPMtf ZVwEV9DelOMlsRD2i7gdPKJ07shB1BIcJsAsCnnYcbNKKt9/O5Y09vRyi6LPmxmLu+PX 4QUsXUqx+kCBlTf/byzXZvkIbJIvSBFUeg2EDxkH5g1aahv9y61PBaIlljrIKXKvvVlz LQNLjKvViJ/0mQJLQILOI7F4L83RkP2a+pat6v8OPOeqRiMC08AR38zqxXGzPw/HI+PN G1JA== X-Gm-Message-State: ALoCoQkCEMTsOtgiDtV4UvpHLjs1XhGMyyPeg7EBc6CCihTV6PUZ2jZPwukfekh6uZv0LSkxPQXV X-Received: by 10.112.26.5 with SMTP id h5mr13174609lbg.4.1433696482984; Sun, 07 Jun 2015 10:01:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.227 with SMTP id kt3ls489474lac.18.gmail; Sun, 07 Jun 2015 10:01:22 -0700 (PDT) X-Received: by 10.152.25.198 with SMTP id e6mr12574822lag.83.1433696482706; Sun, 07 Jun 2015 10:01:22 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id lt6si193072lac.31.2015.06.07.10.01.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jun 2015 10:01:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbcmx3 with SMTP id mx3so68133592lbc.1 for ; Sun, 07 Jun 2015 10:01:22 -0700 (PDT) X-Received: by 10.112.155.197 with SMTP id vy5mr12518301lbb.29.1433696482612; Sun, 07 Jun 2015 10:01:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1263839lbb; Sun, 7 Jun 2015 10:01:21 -0700 (PDT) X-Received: by 10.68.113.194 with SMTP id ja2mr22288065pbb.163.1433696480877; Sun, 07 Jun 2015 10:01:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si260804pap.44.2015.06.07.10.01.20; Sun, 07 Jun 2015 10:01:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505AbbFGRBT (ORCPT + 7 others); Sun, 7 Jun 2015 13:01:19 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:34958 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266AbbFGQ7g (ORCPT ); Sun, 7 Jun 2015 12:59:36 -0400 Received: by wiga1 with SMTP id a1so63543115wig.0 for ; Sun, 07 Jun 2015 09:59:35 -0700 (PDT) X-Received: by 10.180.102.227 with SMTP id fr3mr14162609wib.19.1433696374944; Sun, 07 Jun 2015 09:59:34 -0700 (PDT) Received: from trevor.secretlab.ca (host81-159-186-103.range81-159.btcentralplus.com. [81.159.186.103]) by mx.google.com with ESMTPSA id di7sm4357144wib.23.2015.06.07.09.59.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jun 2015 09:59:34 -0700 (PDT) Received: by trevor.secretlab.ca (Postfix, from userid 1000) id 820D5C41E3E; Sun, 7 Jun 2015 23:20:15 +0900 (JST) From: Grant Likely To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Grant Likely , Pantelis Antoniou , Wolfram Sang , Rob Herring , Greg Kroah-Hartman , Ricardo Ribalda Delgado Subject: [PATCH 1/2] of/unittest: Show broken behaviour in the platform bus Date: Sun, 7 Jun 2015 15:20:10 +0100 Message-Id: <1433686811-12303-2-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433686811-12303-1-git-send-email-grant.likely@linaro.org> References: <1433686811-12303-1-git-send-email-grant.likely@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add a single resource to the test bus device to exercise the platform bus code a little more. This isn't strictly a devicetree test, but it is a corner case that the devicetree runs into. Until we've got platform device unittests, it can live here. It doesn't need to be an explicit text because the kernel will oops when it is wrong. Cc: Pantelis Antoniou Cc: Wolfram Sang Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Ricardo Ribalda Delgado Signed-off-by: Grant Likely --- drivers/of/unittest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 18016341d5a9..0a27b38c3041 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -753,6 +753,11 @@ static void __init of_unittest_match_node(void) } } +static struct resource test_bus_res = { + .start = 0xfffffff8, + .end = 0xfffffff9, + .flags = IORESOURCE_MEM, +}; static const struct platform_device_info test_bus_info = { .name = "unittest-bus", }; @@ -795,6 +800,7 @@ static void __init of_unittest_platform_populate(void) if (rc) return; test_bus->dev.of_node = np; + platform_device_add_resources(test_bus, &test_bus_res, 1); of_platform_populate(np, match, NULL, &test_bus->dev); for_each_child_of_node(np, child) {