From patchwork Tue Jun 1 06:22:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 451355 Delivered-To: patch@linaro.org Received: by 2002:a02:c735:0:0:0:0:0 with SMTP id h21csp1474536jao; Mon, 31 May 2021 23:23:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwinXN/QURDp8DnTyoRbgytLyL1IrYGmqHWjm46nTjQvQoDc2RlXHIDy04k5A8H9hsm0dQs X-Received: by 2002:a05:6402:1111:: with SMTP id u17mr30249546edv.87.1622528586121; Mon, 31 May 2021 23:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622528586; cv=none; d=google.com; s=arc-20160816; b=N9aMkxUHWnmvy5hHSoxupgAzxoaUASnYCs96glkMMlvw3IlKTR8iufZoNlwM9V5TOJ XagMWCKe89I231uCEFmc3klSdFYgHWVI8ZPvE9NlHPb+vnq3RyrwBUd9q8QDecPUnruZ kNi1Y6/neOSao1v9ErROSkxbR/R+Mv7MpPeFC5pMHmzHWqbquCW0q+2OwPPYB5l0qNyD rlHau2hLVE9Jyds/6TSetvtvzCpp+K4jPC+nPzG6muOoL/opoqMK86y6pgn/GMav02CK ogqDaka/nM/EFQvRchERPtarcPKz6N5V2QvQQAxLn3xHY2WygCxsJaQDV6TMcC4ecwvs 7uDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=d2Uzcqt5MXJgf5JeLaWk0tUYeNMK5epdr0BY+eCsDrk=; b=eYm73Gefby5WHH/0U3+a8MAkHJSEjSmAaSyaEqeodXlRDgQoa71NZwaEa6ZNzA/6cu DoEyd6PuIEWYKfQr/HBdAoYefBkkrYco40boS5Op/TfVAMMdwHr6NTJCVp6J9tZ3JD4Z bY0LSZTgg9rVzAdxh7521Zdth5VoHBLRwDr9J+AvGKTt5Vj63d0zJZKEVqQ9FouOodZV t03qYKG0ST2a/6POWbEsZfMrfcaKmu012nazYnkLkQ90cvfhu7LybudLBzajcl5H4OJz tUxMArBGbM+UJKyZ4k1uPgs0ne1KogFBy0jy8WV7nzSaj5KMRZNf1e43SN/5BiDCH24c /P6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si15849252ejy.364.2021.05.31.23.23.05; Mon, 31 May 2021 23:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbhFAGYp (ORCPT + 7 others); Tue, 1 Jun 2021 02:24:45 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:3363 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbhFAGYn (ORCPT ); Tue, 1 Jun 2021 02:24:43 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FvMSQ16pDz67Qt; Tue, 1 Jun 2021 14:19:18 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:22:59 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:22:58 +0800 From: Zhen Lei To: Rob Herring , Frank Rowand , devicetree , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] of: unittest: Use DEFINE_RES_MEM() to simplify code Date: Tue, 1 Jun 2021 14:22:23 +0800 Message-ID: <20210601062223.9724-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org No functional change. Signed-off-by: Zhen Lei --- drivers/of/unittest.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 819a20acaa93986..8c056972a6ddc72 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1209,11 +1209,7 @@ static void __init of_unittest_match_node(void) } } -static struct resource test_bus_res = { - .start = 0xfffffff8, - .end = 0xfffffff9, - .flags = IORESOURCE_MEM, -}; +static struct resource test_bus_res = DEFINE_RES_MEM(0xfffffff8, 2); static const struct platform_device_info test_bus_info = { .name = "unittest-bus", };