Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3926933pxu; Tue, 20 Oct 2020 04:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDFMuxXMCCa1iPXmStizuI+AC21Qo3F9OJ8I5yB4pCr8rjA9uwIsJnlNX4hhY+fd8L73f4 X-Received: by 2002:a50:ef0a:: with SMTP id m10mr2295026eds.116.1603192865327; Tue, 20 Oct 2020 04:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603192865; cv=none; d=google.com; s=arc-20160816; b=HBd6UFJL+zELDLzNm3AkO2PAJ4AaJ74YK5Ti6Cb7SPNp0qyDuGGHicxvCzDboFhzNW wSsSTGMLdLfNbVCLNlMtXbA8iKVkoR189KgpKNiHnsh/y4Tx5z/Bw9Msd+DbzGKUVzPs 2TxnVm0N7jNLIpVOyWBbrDkozZ4wpK9rQ/9+UMw6YrT/KJa07x71wRWEPsiwCKqtLw8l XgakNdgwqtdPxtRca7tbBV3KHgLhTxdKnJYmFwfgwPXYd/SP6XSXJJFFGpzl8gHi3Nog VmmTmwxzqNRORBYssNGTuPONiy7e7SBya2gI0Bh8UNa0ySo4bGEqgd4pX50QR85zY+8a eVoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=1bvg84KoFKjp2cqE6QEmlprOfoW9pno+RkXV7s3ZQfk=; b=0xn/4PDmscygoiudX5umP+K+gBDxPhzvmLkBTyxJVgI+I6WiuqH6RnwQ6n3bTtuems WQXEegzjFtOArE9ollExPXjX+VCBajkpLMobtScMKMaZUgLQv4Z8Ygrz8P6Mqjxtn2wL CXHAhzX7n8xW/HtmXO7DS4wMcXTiye+y/7Fh0KZqfPYZuf6xuKoS/yo5DGCry6Iaw6y+ MabNkWBS0NdkH8y7ZxiJlf4euNKSsknFbgFnUPIcOEYMfLWaH9jhXzEbWhJtR32yWDpN 0Whzr2hy/OYX55SN15RZS+P31efRHuJ+Cxx+q8w9CvOgc+aHoxfPgooqeRu1shfbhlxm 2UvQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rk14si905868ejb.56.2020.10.20.04.20.42; Tue, 20 Oct 2020 04:21:05 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392691AbgJTJTh (ORCPT + 99 others); Tue, 20 Oct 2020 05:19:37 -0400 Received: from mga01.intel.com ([192.55.52.88]:37770 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391238AbgJTJTg (ORCPT ); Tue, 20 Oct 2020 05:19:36 -0400 IronPort-SDR: C3pWNGRvUuDpZZg/5T5Tm5I4Ix4p62xCUKwf+gP4yr3sztTaja13o2wqg8oidTjNxDLkGG77YY bBzaD+fO1w+A== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="184806176" X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="184806176" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 02:19:35 -0700 IronPort-SDR: MBMaReXSxVI2+i/+rV6T1h29ulVH47nCz0OBwZqMIg8CsWZcsQrZlv94cV5/8CnQshTDJuYTj/ Bte/ehOOiJvA== X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="315968920" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 02:19:30 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kUnol-00BJvE-Ng; Tue, 20 Oct 2020 12:20:31 +0300 Date: Tue, 20 Oct 2020 12:20:31 +0300 From: Andy Shevchenko To: Daniel Scally Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux.walleij@linaro.org, prabhakar.mahadev-lad.rj@bp.renesas.com, heikki.krogerus@linux.intel.com, dmitry.torokhov@gmail.com, laurent.pinchart+renesas@ideasonboard.com, kieran.bingham+renesas@ideasonboard.com, jacopo+renesas@jmondi.org, robh@kernel.org, davem@davemloft.net, linux@rasmusvillemoes.dk, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, pmladek@suse.com, mchehab@kernel.org, tian.shu.qiu@intel.com, bingbu.cao@intel.com, sakari.ailus@linux.intel.com, yong.zhi@intel.com, rafael@kernel.org, gregkh@linuxfoundation.org, kitakar@gmail.com, dan.carpenter@oracle.org Subject: Re: [RFC PATCH v3 2/9] lib/test_printf.c: Use helper function to unwind array of software_nodes Message-ID: <20201020092031.GD4077@smile.fi.intel.com> References: <20201019225903.14276-1-djrscally@gmail.com> <20201019225903.14276-3-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019225903.14276-3-djrscally@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 11:58:56PM +0100, Daniel Scally wrote: > Use the new software_node_unregister_nodes_reverse() function to > unwind this array in a cleaner way. Reviewed-by: Andy Shevchenko > Suggested-by: Andriy Shevchenko > Signed-off-by: Daniel Scally > --- > Changes in v3: > - patch introduced. > > 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 7ac87f18a..c63365570 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_reverse(softnodes); > } > > static void __init > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko