From patchwork Thu Dec 24 01:09:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 351960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CBCEC43603 for ; Thu, 24 Dec 2020 01:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02CB622517 for ; Thu, 24 Dec 2020 01:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728773AbgLXBKq (ORCPT ); Wed, 23 Dec 2020 20:10:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728754AbgLXBKp (ORCPT ); Wed, 23 Dec 2020 20:10:45 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3541C0611C5; Wed, 23 Dec 2020 17:09:33 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id r3so855081wrt.2; Wed, 23 Dec 2020 17:09:33 -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=nrWZ4vmWcGXVMa9R5napfQoQ5FKRFGqI2Uo6ZMQnL+A=; b=pDz5hfUnX3AukEgHxPyP0Yq8OUi6Zp/bNcXsxPhO66zFsjLrP1fV/j1eUNX6voZ4i7 DMEaFgPx2i2cmSkfqbfZHy11gGvhRYHw5ajKseo36FYzexoqyI/SThOrnYzyAZd4Qn2O nXVQtKVQenYpSz9nrEiC/eq7UWkm+R3ngLOQXyjNQksjy/9wBuAbLifh3AVnlT0a7Ysv D7RRpuXbE5L+JspyD5vwzlC7l2vIytcbPg6EvCcdzkg0/8CedztiWlqcGJkcAla/Dvu+ jn288IWVoFBt+RMD6ibjfecPCYfvHYuXSUK27jzxPKATJ7l+AQSZ468egv4RprYP7/up dCzQ== 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=nrWZ4vmWcGXVMa9R5napfQoQ5FKRFGqI2Uo6ZMQnL+A=; b=XNE885t3+UvxJM0wNyemLnrCWAOalRN9YF5s2b56BEclx+mVQfV6HK60XFKLiOZX4g UJCnWXa3ffFbOMVg2BxQhJmaQOj5v6hICfWTDb3//JIti1HHbdabYvjI3kdVAIkKH65o s+x4oaPdXAWFWiWHIxOinzLroWTpynfCRsn542j2ul03D+9NHeJIslhsZCiWV5Z6JR7v 5nWrFg0463P/f62F5kg5N75juoNMZh5fDB/f56gNcYmN+B7KcTmEkid/mOczb3p76qud VSNoExUvrwdLBhjWH47uDqlNBA2iQW8pdgH5QxVnAXyEvyhTovY0glC+k4wrfm91EgGe la8g== X-Gm-Message-State: AOAM531tuRsAJ5ni1lDCMa+PxLpIo86X+r4vpytyHMMOqgTu6/nWFUEI l8PzL25OxNyY1lNBiS9CowyDFiUQz0YvMCfP X-Google-Smtp-Source: ABdhPJxITjMGrsegwYlQ4qrtkCCofATTFjbq1HCR2i/1CDLo89l6mdFEp2nUewaJ590N3Ndjh0wEGg== X-Received: by 2002:adf:e443:: with SMTP id t3mr31495512wrm.366.1608772172496; Wed, 23 Dec 2020 17:09:32 -0800 (PST) Received: from valhalla.home ([2.31.224.116]) by smtp.gmail.com with ESMTPSA id b200sm1598653wmb.10.2020.12.23.17.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 17:09:32 -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, hverkuil-cisco@xs4all.nl, m.felsch@pengutronix.de, niklas.soderlund+renesas@ragnatech.se, slongerbeam@gmail.com, heikki.krogerus@linux.intel.com, linus.walleij@linaro.org, Laurent Pinchart Subject: [PATCH v3 08/14] lib/test_printf.c: Use helper function to unwind array of software_nodes Date: Thu, 24 Dec 2020 01:09:01 +0000 Message-Id: <20201224010907.263125-9-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201224010907.263125-1-djrscally@gmail.com> References: <20201224010907.263125-1-djrscally@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 v3 - 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