From patchwork Fri Nov 18 18:56:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 22475 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360563wrr; Fri, 18 Nov 2022 11:03:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf6AGU7JpwC9icdt+pKo6RCi6pbeMV6PSDgDYfPy6wdLzP2dg2NKkHtuPjVoccTJrGie3jc1 X-Received: by 2002:a17:906:49d0:b0:79f:e0b3:3b9b with SMTP id w16-20020a17090649d000b0079fe0b33b9bmr7046001ejv.378.1668798227963; Fri, 18 Nov 2022 11:03:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798227; cv=none; d=google.com; s=arc-20160816; b=aVCaYRaBIlp/fannsFA/OMmauPPyTtyx5UC28uHZWN3orW7dwJesD3LuZS+O4wcewG PbKolYSduSEGKO6YOMguMKuAnklFkwcrScMQX1HuqDe2DVGW3lK2mE8p63zAhj9NTshn QMvqQkdyxtBnChwWEHPNd17grHWz9/lg0mf2g620JarJ1+IOTEjAy9OSxWKJs3lzMZQr 2dg8jlc5JFTK1qaiaiaE2lpgAXJMr8S4hoxYfmaKrEX4azuddctgh0U2Nhh5Dsx4MThP pm1bxY77YiYm6jw1RT4ixGBmGaOj7hVymFIjFJJ0Gt1epGZre269H2tKzupksk6NnOow JIBA== 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=/qO5wAx2TouzWcUhuef6hnuurVRfqB6YJrj4lA1vERw=; b=fgDkCYZpGeurT8+jzNIwPtT2JGeTfePkA0JeWC8ttedyV+B3NUiHbdzdes2TfVJyQN GU4PlRS2Uy13MGy9TbGiqgHYzSybcO21OuvrTThZOF2uYrzbL3LXdgE2wIIVHlxkycX/ VEYPuk0RVdIpganqpVzDdMm5abZVgfkB4y7c1V6GO3N1ZlhqCdnFfRr9EBRUSaA3cRuH qclekZ6rjCkoQwSRMwgf9WMWWVz8Y+HnjO9/QwT/I60LnJ56f29tR6vCXFGdQ+7IBp5V gJlpwSf50ZdafAL9yX2bCKAXYYnlCQh4Itit+bCYetOMF2MlboVjJhlTQpMCyP3sUBOn Uqpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DW578NaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a056402321700b0046327da0dacsi3723408eda.232.2022.11.18.11.03.22; Fri, 18 Nov 2022 11:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DW578NaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235437AbiKRTBV (ORCPT + 99 others); Fri, 18 Nov 2022 14:01:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242452AbiKRTBI (ORCPT ); Fri, 18 Nov 2022 14:01:08 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C997248DF; Fri, 18 Nov 2022 11:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668798068; x=1700334068; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S0djLZmcrNqY8QD73MZqcbQdK/zdWeegfqfcb+t5Trc=; b=DW578NaYPyWz+MXiEI/aOuHDHpk5BXWlj66ygjIOxjYtCFV/D9XsHgYj sVLBHPGbRyd+qREQTMSZTEHTL3jdQztCCfQIdJPiCWEAhLwUn69ieGOPE O6vK0icWcr+kfn/ZhxMv4mtXQj1ICsnFow+Dx81e5mIN0iKN+7pEAhljM i+DRvXu9IbUH+ZJaaN6XpwEvUe2ZnsRZ/Sc5nd/m0N2V6ulqmnTEDNqXA zWZPxZZoMoR35Z9JsyV8EZcFGCwUXUGCY8ccL5tJUgalmyYB0DmbPEuUh jSbSd8WGLIxcVIjmQHZUDGY+0Jp4ZDoPI471Q596YChxAybQcOFpZTjX4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="315028383" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="315028383" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2022 11:01:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="746106508" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="746106508" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 18 Nov 2022 11:01:01 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 67A85385; Fri, 18 Nov 2022 21:01:26 +0200 (EET) From: Andy Shevchenko To: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Andy Shevchenko , Sakari Ailus , Mauro Carvalho Chehab , Hans de Goede , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Daniel Scally , Heikki Krogerus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Yong Zhi , Bingbu Cao , Tianshu Qiu Subject: [PATCH v1 4/4] software node: Remove unused APIs Date: Fri, 18 Nov 2022 20:56:17 +0200 Message-Id: <20221118185617.33908-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com> References: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749861770291610120?= X-GMAIL-MSGID: =?utf-8?q?1749861770291610120?= There are no more users of software_node_register_nodes() and software_node_unregister_nodes(). Remove them. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman --- drivers/base/swnode.c | 61 ---------------------------------------- include/linux/property.h | 3 -- 2 files changed, 64 deletions(-) diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 0a482212c7e8..da3c1c2cb9a8 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -819,67 +819,6 @@ swnode_register(const struct software_node *node, struct swnode *parent, return &swnode->fwnode; } -/** - * software_node_register_nodes - Register an array of software nodes - * @nodes: Zero terminated array of software nodes to be registered - * - * Register multiple software nodes at once. If any node in the array - * has its .parent pointer set (which can only be to another software_node), - * then its parent **must** have been registered before it is; either outside - * of this function or by ordering the array such that parent comes before - * child. - */ -int software_node_register_nodes(const struct software_node *nodes) -{ - int ret; - int i; - - for (i = 0; nodes[i].name; i++) { - const struct software_node *parent = nodes[i].parent; - - if (parent && !software_node_to_swnode(parent)) { - ret = -EINVAL; - goto err_unregister_nodes; - } - - ret = software_node_register(&nodes[i]); - if (ret) - goto err_unregister_nodes; - } - - return 0; - -err_unregister_nodes: - software_node_unregister_nodes(nodes); - return ret; -} -EXPORT_SYMBOL_GPL(software_node_register_nodes); - -/** - * software_node_unregister_nodes - Unregister an array of software nodes - * @nodes: Zero terminated array of software nodes to be unregistered - * - * Unregister multiple software nodes at once. If parent pointers are set up - * in any of the software nodes then the array **must** be ordered such that - * parents come before their children. - * - * NOTE: If you are uncertain whether the array is ordered such that - * parents will be unregistered before their children, it is wiser to - * remove the nodes individually, in the correct order (child before - * parent). - */ -void software_node_unregister_nodes(const struct software_node *nodes) -{ - unsigned int i = 0; - - while (nodes[i].name) - i++; - - while (i--) - software_node_unregister(&nodes[i]); -} -EXPORT_SYMBOL_GPL(software_node_unregister_nodes); - /** * software_node_register_node_group - Register a group of software nodes * @node_group: NULL terminated array of software node pointers to be registered diff --git a/include/linux/property.h b/include/linux/property.h index 5d840299146d..6870abe12dc5 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -492,9 +492,6 @@ const struct software_node * software_node_find_by_name(const struct software_node *parent, const char *name); -int software_node_register_nodes(const struct software_node *nodes); -void software_node_unregister_nodes(const struct software_node *nodes); - int software_node_register_node_group(const struct software_node **node_group); void software_node_unregister_node_group(const struct software_node **node_group);