Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1661985pxu; Thu, 17 Dec 2020 15:47:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJypqNDG8ouH7fVSRHc3Dx4TqE4C1wFVIy2Jo0qRONJNIErs7xplsL6pN514uJ3phM5fTiDL X-Received: by 2002:a17:906:351a:: with SMTP id r26mr1432134eja.204.1608248860771; Thu, 17 Dec 2020 15:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608248860; cv=none; d=google.com; s=arc-20160816; b=AzTR4eUFVCBZwVBrZ93OsAA/IUJ8mbZHmiKrbXA2CxZZAxGFhzeN88xfD8KUFXfUe0 ff2YAZZrZJZYhAapkEjfOhURa3AGNMD9S5H2p3/cMoLTb4UcFAdc0dA2hcszo/oP7JUQ 5/P6jMg35vaL87TdYw/t491dJDDmKhHgzNZWt/drG4m2iXygUcHqbuoP5vsH1ekE/Jw6 /EQjtotojm0zsSepgmNS3i+c8AMVdllXP2n34ULUahTDR0k8KPxor2TQGOznEDcysMM4 Pq+fMVees2Ts2AWMp5/2dOFPXriNPEU6WEO6BCqrfrSqp8B99cXfXM2J8voupMnxIqfy m6zQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NhV0D9xuOLKxtzOWkibLn3uvxzcSBCPiXhXcwXUTilM=; b=RB9qXjiIgBkvOcKlnaWkCyVo+IaWtK6hm+wrEKKrzjMPXuHnFYcdMCpJp6sRld8Wr9 22efzCzX6S5FM5BzIJBNKHncbvF32Ey9JbZHlgoGp91DcVHhNOY/9rxmCuq3NDfXV6II WI4/LHA116GtTPkbVKlWvnU/y26WU6djfNKY3+o9UZ56AEOU5TwCqf0sLW0d2veR+Ppo HSmNBnkcqEcumSehoB5FCy/71CjQgmsEA6DChnKYuyab24prLn045bslcMKEEM3HbDar eMDawhRvbeHoGuwCLz/m32Py6q6ynUYPcsKv3lWvwen5HqX6F926xu1xWgpcOdFrjLjr DueQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g2TSU9X4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si5112870edt.142.2020.12.17.15.47.18; Thu, 17 Dec 2020 15:47:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g2TSU9X4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732440AbgLQXpT (ORCPT + 99 others); Thu, 17 Dec 2020 18:45:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732404AbgLQXpP (ORCPT ); Thu, 17 Dec 2020 18:45:15 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B017CC061257; Thu, 17 Dec 2020 15:44:02 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id y23so572821wmi.1; Thu, 17 Dec 2020 15:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NhV0D9xuOLKxtzOWkibLn3uvxzcSBCPiXhXcwXUTilM=; b=g2TSU9X4omWopl89Jo0LZ6GhwCl0vy3NOdWDxlgJzd9MJ4kD23p2lAXsB1ak/v9AYP p6bRMhpmRYZBdJeolDOkLPzHHvX/pTgW9VVmlM0Wu+bgvzoCI25B2SAJ5/o+0DDFRUH0 H3I86/Y7jKjQwjjWJ/Ph6ltdqzuWCO90o56tQ3/3YuuLvtuhL8SLBKO2rZVzzFzsp+b0 z88YNdTY+tW0TrDTHOfkgXS8to2MevQ3b4iZTRzqOyQKHVWs8x2xRrFqkjfxPPIqqbpP FVOuj99pHEpHNo+sT8r8SjpA6v9iNRevjFEd65ABKnSmx2wBIDucrf29f/+CM3svwdIl Z+1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NhV0D9xuOLKxtzOWkibLn3uvxzcSBCPiXhXcwXUTilM=; b=P5nO0nCbqTZ6IhFN9TdP9s7xMW76l/UtEtE39oBW6VWhX/I6w5IzcHcyTx/2TXpA3F BZ3deKqAIC3WTlpzfVt4z0CoEJ/sDxs4+hNGt6NsNt27/ND0vJET9TAT8rp/ZlBgeW8A 9hrP4CqPXU1IIN+QdnRcK+jKguhIvUjZ7W/t2uHJSaGSQRnSdfDpjQwkZbw0hvwztLZb xZn+kNf3moBhTvljLPv0uVveH/ho9A1io2lBWqj4OLkKM6Dh6r+3Gl9iSy6HoCPkK4HG Pph2yvFme2W8ZXr2fSOQ7prgNQD+a3HbB9KgcjZjGmm8/lyn/hlhhFxq/gg+JKLvicK8 nZog== X-Gm-Message-State: AOAM532pZEihYpKRu6QJuz9qH89m6gTscCy+qMW5ypFd0XY1oOrkuxeN ZT6A+n0ruLyUpDk8axy5zww47ENtpdJ9qn/9 X-Received: by 2002:a1c:6446:: with SMTP id y67mr1580311wmb.144.1608248641472; Thu, 17 Dec 2020 15:44:01 -0800 (PST) Received: from valhalla.home ([2.29.208.56]) by smtp.gmail.com with ESMTPSA id o3sm1873575wrc.93.2020.12.17.15.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 15:44:00 -0800 (PST) From: Daniel Scally To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-media@vger.kernel.org, devel@acpica.org Cc: rjw@rjwysocki.net, lenb@kernel.org, gregkh@linuxfoundation.org, yong.zhi@intel.com, sakari.ailus@linux.intel.com, bingbu.cao@intel.com, tian.shu.qiu@intel.com, mchehab@kernel.org, robert.moore@intel.com, erik.kaneda@intel.com, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk, laurent.pinchart+renesas@ideasonboard.com, jacopo+renesas@jmondi.org, kieran.bingham+renesas@ideasonboard.com, linus.walleij@linaro.org, heikki.krogerus@linux.intel.com, kitakar@gmail.com, jorhand@linux.microsoft.com, Laurent Pinchart Subject: [PATCH v2 07/12] lib/test_printf.c: Use helper function to unwind array of software_nodes Date: Thu, 17 Dec 2020 23:43:32 +0000 Message-Id: <20201217234337.1983732-8-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201217234337.1983732-1-djrscally@gmail.com> References: <20201217234337.1983732-1-djrscally@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the software_node_unregister_nodes() helper function to unwind this array in a cleaner way. Acked-by: Petr Mladek Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Reviewed-by: Sergey Senozhatsky Suggested-by: Andy Shevchenko Signed-off-by: Daniel Scally --- Changes in v2: - None lib/test_printf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/test_printf.c b/lib/test_printf.c index 7ac87f18a10f..7d60f24240a4 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -644,9 +644,7 @@ static void __init fwnode_pointer(void) test(second_name, "%pfwP", software_node_fwnode(&softnodes[1])); test(third_name, "%pfwP", software_node_fwnode(&softnodes[2])); - software_node_unregister(&softnodes[2]); - software_node_unregister(&softnodes[1]); - software_node_unregister(&softnodes[0]); + software_node_unregister_nodes(softnodes); } static void __init -- 2.25.1