From patchwork Fri Nov 18 18:56:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 22470 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360074wrr; Fri, 18 Nov 2022 11:03:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf7FbhAYaMac7aDsYzcdxO6ICu8dTxZM0q9J/+Yh37RSV5ahGAaSiAE5mpFg3BmvguJIZmpD X-Received: by 2002:a17:906:6681:b0:7ae:732d:bc51 with SMTP id z1-20020a170906668100b007ae732dbc51mr7096995ejo.549.1668798180357; Fri, 18 Nov 2022 11:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798180; cv=none; d=google.com; s=arc-20160816; b=FXwmEPdOtmT0DrISJqhgr7/PEXrdFtLEgVzbnF/lExRqdhnRpVw0LbIxT+oPcb2a20 J9jsa72tsUs5FYjsQGfYzmODO7wLE0Iy4UQ6JagVNtfUthDHW1x1OVFJLKVdXvFGm+Kp JLZfPEFI9FwNKBEYJCyTrsXoGV18koC5lzYTi+nnc9IrWrdjINFPPvHjH6k4i6tJMi3G wcZY5O0NFLrt9yeXJcnkzTqHKxAfqeLd7u+jRlfoAyNSBKJBKAfAK3c5Z5qxGkSM1snB rTrfaS7YhROf49bipgDbkFYxgdotyr+BrilCi0M4SnJQPLZZvbMZ8mArhSD2pTE86UUs 4qsg== 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:dkim-signature; bh=PTEsdUGRcEQ2qtzzQIOOXBYkAkibEUt9wt/nHVDoSmA=; b=oBiX0WAhr0qEhH6aXFNVPhgoJMeeRTbW/HhCc8dgczwsuujJRpk5jT12NxWN2a7a0/ 86Kle1UP1Xi+jH+9s5RagRJS2MOd1RPpSyvLiSoI32NpomqM36LZJ5Twe0BdX93SB6+Y 74bErA45WsrHrDL6kBvN8FiAjQ3DhKAB0dAnMMBpdrPxV+ar6onMdCn5Czy4S2cUw5Ve pO0h/Tt0wn+LLlP08X/TzvglZNeYwJTUwdYOY/VbTFpFB6dEU56zIBiwJ/1SIWJz7aZx ICpRse2w/HjfwW9Vh9enkbMSMavu94kB2+Xtf5vekYrln606Itmf/bqvQCbXEA9m0f0t qDIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ib0lef1d; 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 qa17-20020a170907869100b0078239e3f846si4167215ejc.1.2022.11.18.11.02.25; Fri, 18 Nov 2022 11:03:00 -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=Ib0lef1d; 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 S242863AbiKRTBe (ORCPT + 99 others); Fri, 18 Nov 2022 14:01:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242339AbiKRTBI (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 0C826233A2; 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:mime-version: content-transfer-encoding; bh=WvZ7SWFh8KHhZL+jsKQNukYdJbXBUPn1qpeTKkRZRVM=; b=Ib0lef1dWTXH8EXl5URnBFrezCwDAZkrJqeaXRjaSTcvEHJlbuCY5JKq jN9/qUkusoXO/Mc7PqS6U1BNvdD6Exl+fRSJR63Ki2EGFdt0oJ3Gaqr1g mnvT9Ghqipa9Yjy+Lq3Q+UFOQpMeEaKKuSrQPbWndUY4nc+GD963gOt3l xyMj2D6HEZM3kU00sChj/OjCh1DahdoxgYKMbkx7cNsTxE0IEnUQfuvYP DCLIJvdg8LmGuu2J5o0wo9Uh4NVC9dL75hyM06YTrHUpU9qxFfyFD0RrJ V21ddroO0wygthtzYBOzK9euXp80zg0jX3HWe+FE0ngCjcH2jCeeB+Mcl Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="315028382" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="315028382" 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="746106506" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="746106506" 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 4968910E; 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 1/4] media: ipu3-cio2: Don't dereference fwnode handle Date: Fri, 18 Nov 2022 20:56:14 +0200 Message-Id: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 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?1749861720378618031?= X-GMAIL-MSGID: =?utf-8?q?1749861720378618031?= Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, which is a better coding practice. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus --- drivers/media/pci/intel/ipu3/cio2-bridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c index df6c94da2f6a..18974a72e94a 100644 --- a/drivers/media/pci/intel/ipu3/cio2-bridge.c +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.c @@ -263,7 +263,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, struct cio2_bridge *bridge, struct pci_dev *cio2) { - struct fwnode_handle *fwnode; + struct fwnode_handle *fwnode, *primary; struct cio2_sensor *sensor; struct acpi_device *adev; acpi_status status; @@ -322,7 +322,9 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, } sensor->adev = acpi_dev_get(adev); - adev->fwnode.secondary = fwnode; + + primary = acpi_fwnode_handle(adev); + primary->secondary = fwnode; cio2_bridge_instantiate_vcm_i2c_client(sensor); From patchwork Fri Nov 18 18:56:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 22476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp360645wrr; Fri, 18 Nov 2022 11:03:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4q//VuDSXsUy9RMqKVn2F8hxMRc+YxuMXl+fFA3PdcB49YdgU6ldeViSCjuidFNwqKlQpX X-Received: by 2002:a17:906:c449:b0:7ae:cbae:af1 with SMTP id ck9-20020a170906c44900b007aecbae0af1mr7158069ejb.31.1668798235739; Fri, 18 Nov 2022 11:03:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798235; cv=none; d=google.com; s=arc-20160816; b=DPJCPYaIjJzhUzAq9RorILmr/hkQeXuCCSh0wpreu136KspQKnELKzLWpfP2FvgLAT ppk28EBhXgKJAorrQ5IuC0GL7TIeelZQzfxcvIQFWtM2IjV7PqfCAZg8/X/QhlTciYMN qlxUIbH/42xNTyheQ7wxashd4HgHjdi381cAI4sf13XX8eSNvQJBqaLImT0yxdTaAnZ0 bJOjLjg+Pgr18J3vF9X4mb7pyWvrPuEipjAHoiee+bS6WVFkjUYI29zDGpHgnkeR0Lj+ 59sS547hlpfQ3Da3qFAjVUxGlatzACAYo4QNKzI/6o2AU+iGd4bALmj7asFQoZ75mZno io0g== 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=GC/PSfosxe+dnMkqX1RpbszXNGurp+QKV4GNyFUeOBY=; b=iq+MQ6CY11+DtqTifxGSxFbZF558eK/Wfi9dEL7sHB7oUle8ejd9oBsB6SrO0dZCo7 lwkSiXEZj5KzFpRJE4LVIMs5AX6L3TmxeSEiL0qwd2wSxK9d/VXbfyc/x6UgK5hOzJAd wTMOvuTa2SpgP8vGlJt+I0vZXtjqs+Qwo44es47IWVdkDmX9YkyVcnFWSKtd5ggMOH3f wjtu6cqf160d5q+Nn4ADVD/eVpOnZda5JxLiXTNSTqg7+8Lwl6CxxM3aJ4NsZHV7zmmC gm/vCVuK2VolgMuFK8mIJ6jnb1/45I/6ubhZ1AqXn7Nru61sRhD3I+R2F5MBjoJ9D9Gz zB3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TC70AVf5; 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 fk23-20020a056402399700b0045d15f39bf4si3642843edb.479.2022.11.18.11.03.30; Fri, 18 Nov 2022 11:03:55 -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=TC70AVf5; 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 S242805AbiKRTBP (ORCPT + 99 others); Fri, 18 Nov 2022 14:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235537AbiKRTBH (ORCPT ); Fri, 18 Nov 2022 14:01:07 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9AA821893; Fri, 18 Nov 2022 11:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668798065; x=1700334065; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aq3/ktfxVCsNfWJmCnwfAtRp32P9/TQ7EV+b3b0e5zQ=; b=TC70AVf5MoqKCAaXp+pkp22t3jTmXgbZ+c0wsOCqD8rEWDyRpjTN90NE GXidDxovqxg2MPnaY1qkujXoDETqyaZs0YydzBUt7VgZEvtiLpd3Le2Q1 y91rJgD9W2huFyQ7yG3cVuhjqtcndIMMgsYTdseLwsNzhEjsMb4jhT5UD MYL5siOX/npmFg2QXiwEJJ2bBw/9REfWXNuIV23MKorrea6Bk2A+CRlVU 8VX3dVcEpX+XsMnoNu2zkWXzr87jn3DNtI4kJOq3yYScWbNWqXby+pSSl Vk9zrFnsf4zhq8Rdkp26tMs8T1ZOmyToy07OuyV8sWUZaHE2i7b0taM9l A==; X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="315028380" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="315028380" 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="746106507" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="746106507" 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 5539284; 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 2/4] media: ipu3-cio2: Convert to use software_node_register_node_group() Date: Fri, 18 Nov 2022 20:56:15 +0200 Message-Id: <20221118185617.33908-2-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?1749861779026426823?= X-GMAIL-MSGID: =?utf-8?q?1749861779026426823?= The currently used software_node_register_nodes() is going to be removed. Prepare driver by switchich to new API. Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Tested-by: Daniel Scally --- drivers/media/pci/intel/ipu3/cio2-bridge.c | 21 ++++++++++++++++++--- drivers/media/pci/intel/ipu3/cio2-bridge.h | 5 +++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c index 18974a72e94a..dfefe0d8aa95 100644 --- a/drivers/media/pci/intel/ipu3/cio2-bridge.c +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.c @@ -195,6 +195,19 @@ static void cio2_bridge_init_swnode_names(struct cio2_sensor *sensor) SWNODE_GRAPH_ENDPOINT_NAME_FMT, 0); /* And endpoint 0 */ } +static void cio2_bridge_init_swnode_group(struct cio2_sensor *sensor) +{ + struct software_node *nodes = sensor->swnodes; + + sensor->group[SWNODE_SENSOR_HID] = &nodes[SWNODE_SENSOR_HID]; + sensor->group[SWNODE_SENSOR_PORT] = &nodes[SWNODE_SENSOR_PORT]; + sensor->group[SWNODE_SENSOR_ENDPOINT] = &nodes[SWNODE_SENSOR_ENDPOINT]; + sensor->group[SWNODE_CIO2_PORT] = &nodes[SWNODE_CIO2_PORT]; + sensor->group[SWNODE_CIO2_ENDPOINT] = &nodes[SWNODE_CIO2_ENDPOINT]; + if (sensor->ssdb.vcmtype) + sensor->group[SWNODE_VCM] = &nodes[SWNODE_VCM]; +} + static void cio2_bridge_create_connection_swnodes(struct cio2_bridge *bridge, struct cio2_sensor *sensor) { @@ -219,6 +232,8 @@ static void cio2_bridge_create_connection_swnodes(struct cio2_bridge *bridge, if (sensor->ssdb.vcmtype) nodes[SWNODE_VCM] = NODE_VCM(cio2_vcm_types[sensor->ssdb.vcmtype - 1]); + + cio2_bridge_init_swnode_group(sensor); } static void cio2_bridge_instantiate_vcm_i2c_client(struct cio2_sensor *sensor) @@ -252,7 +267,7 @@ static void cio2_bridge_unregister_sensors(struct cio2_bridge *bridge) for (i = 0; i < bridge->n_sensors; i++) { sensor = &bridge->sensors[i]; - software_node_unregister_nodes(sensor->swnodes); + software_node_unregister_node_group(sensor->group); ACPI_FREE(sensor->pld); acpi_dev_put(sensor->adev); i2c_unregister_device(sensor->vcm_i2c_client); @@ -310,7 +325,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, cio2_bridge_create_fwnode_properties(sensor, bridge, cfg); cio2_bridge_create_connection_swnodes(bridge, sensor); - ret = software_node_register_nodes(sensor->swnodes); + ret = software_node_register_node_group(sensor->group); if (ret) goto err_free_pld; @@ -337,7 +352,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg, return 0; err_free_swnodes: - software_node_unregister_nodes(sensor->swnodes); + software_node_unregister_node_group(sensor->group); err_free_pld: ACPI_FREE(sensor->pld); err_put_adev: diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.h b/drivers/media/pci/intel/ipu3/cio2-bridge.h index 4418cbd08208..b93b749c65bd 100644 --- a/drivers/media/pci/intel/ipu3/cio2-bridge.h +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.h @@ -117,8 +117,9 @@ struct cio2_sensor { struct acpi_device *adev; struct i2c_client *vcm_i2c_client; - /* SWNODE_COUNT + 1 for terminating empty node */ - struct software_node swnodes[SWNODE_COUNT + 1]; + /* SWNODE_COUNT + 1 for terminating NULL */ + const struct software_node *group[SWNODE_COUNT + 1]; + struct software_node swnodes[SWNODE_COUNT]; struct cio2_node_names node_names; struct cio2_sensor_ssdb ssdb; From patchwork Fri Nov 18 18:56:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 22468 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp359552wrr; Fri, 18 Nov 2022 11:02:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf7sS4OGz2uCeLsUZVfPzAYUZDKIOaVvMimTvxAOjPIIkOMI+CurVpaVN5hzF495kK/yAmTX X-Received: by 2002:a17:906:cf85:b0:78d:b66d:749f with SMTP id um5-20020a170906cf8500b0078db66d749fmr6878277ejb.566.1668798131698; Fri, 18 Nov 2022 11:02:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668798131; cv=none; d=google.com; s=arc-20160816; b=njWp7Ja/sDBBmGzM7uPqudG0mtnobWkfavHZ+afn9qCzTKA+MeNwEzv0d5srV/NQG1 1dsKJBf/ofktdLmWyjfP8wFyslRZTuZib1JdpJbh6i3BkJuA8EAabDnO8Dnt/t6x5j7p XY2qasK4/kVeZgYBtM4muobLar7aA8pfOApE+feaNM9UljIv4m/7bizfqS3C4rvWyuWK Cm4+5luLlul2kOr+95bG5Ip3VTnbKRBnu59EswamOfLa2PkCo6wpR4Bd1wLT5+0nQP/c fprF/98KJeW5ADZVKXsQRWYQ5mKbVaIMepzgVR+SEJn7D8Bqmux4+UQQsdxiS/xbHWxI 6ovA== 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=ojlEPmD35/ye1Zi4fy3UeA4XhiK2Kk+OZo3eOlrNs2M=; b=vBmeUn7sNECK2zmtYZjlHXFvx61uuzRfgYC282P410Toip9SHN/Cfn6j/JyQN9eFuw m7L6oNymtd7yMPCYUwUIAwOQ6Xbeh8sPjdh23BPmhLV6SOfukj1Dii60PtiaZPab9srS 32kCX92o5LHhuVdXxLe8I66BsZoHBoyLbFtp9ADp3Nh1C56o0QeME/DOrkgYsUJcWyeo KIPoVrnrmdjX2gJOjk8ltEUkXEeHwm6U9SdrBcbOyJm1FLAVxCfJDaGw2czepe41S4DZ DalHBFLQFRPBaQ+pgXM8FEvUeyjoMCJuFC8W5+8U5BEb3LvMLUbbQS8x5lN29b+NdnH5 WsWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FVZ8ueyr; 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 g10-20020a1709067c4a00b007309e8d567fsi3013907ejp.145.2022.11.18.11.01.37; Fri, 18 Nov 2022 11:02:11 -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=FVZ8ueyr; 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 S242488AbiKRTBK (ORCPT + 99 others); Fri, 18 Nov 2022 14:01:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235499AbiKRTBH (ORCPT ); Fri, 18 Nov 2022 14:01:07 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A5B10E9; Fri, 18 Nov 2022 11:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668798065; x=1700334065; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bxz54gOygFD+2N524o4eOo4LHia2SzsQwfOA3UPhtPM=; b=FVZ8ueyrMLZZZeR+TF+eDvc4zOVDDC1ds47AspOC+cUrIBEZ1orsZaoe nRE88bnMUEPYBUNc1KFO+YBL8Wnx6QA3PcLrV6q3RJt606kIHzY225GrF K9nhLECfrh+nW7zkifz+k07Lg+3j/QIrBHyG7hqxrERdZ1m4j9yoMOkTL xkrZxiCf9tLWfZr7DBbNVhZk79oiAA9+FN6dXapK0rCSxfgwTupiS1/P9 PDSocuIBhPq4lCs9j+Gih3UCkjfN9piU3u/3ecVlzXciFqO4O+PWzO4T2 pB/WBiwQhi53j2droYd8G+ezuJYY17qW2vg8koWwy1GgAnHga4wtvagC7 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10535"; a="311912178" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="311912178" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.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="815018698" X-IronPort-AV: E=Sophos;i="5.96,175,1665471600"; d="scan'208";a="815018698" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 18 Nov 2022 11:01:01 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6043A2F3; 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 3/4] software node: Switch property entry test to new API Date: Fri, 18 Nov 2022 20:56:16 +0200 Message-Id: <20221118185617.33908-3-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?1749861669591833672?= X-GMAIL-MSGID: =?utf-8?q?1749861669591833672?= Switch property entry test to use software_node_register_node_group() API. The current one is going to be removed soon. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman --- drivers/base/test/property-entry-test.c | 30 ++++++++++++------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/base/test/property-entry-test.c b/drivers/base/test/property-entry-test.c index 6071d5bc128c..dd2b606d76a3 100644 --- a/drivers/base/test/property-entry-test.c +++ b/drivers/base/test/property-entry-test.c @@ -405,20 +405,18 @@ static void pe_test_move_inline_str(struct kunit *test) /* Handling of reference properties */ static void pe_test_reference(struct kunit *test) { - static const struct software_node nodes[] = { - { .name = "1", }, - { .name = "2", }, - { } - }; + static const struct software_node node1 = { .name = "1" }; + static const struct software_node node2 = { .name = "2" }; + static const struct software_node *group[] = { &node1, &node2, NULL }; static const struct software_node_ref_args refs[] = { - SOFTWARE_NODE_REFERENCE(&nodes[0]), - SOFTWARE_NODE_REFERENCE(&nodes[1], 3, 4), + SOFTWARE_NODE_REFERENCE(&node1), + SOFTWARE_NODE_REFERENCE(&node2, 3, 4), }; const struct property_entry entries[] = { - PROPERTY_ENTRY_REF("ref-1", &nodes[0]), - PROPERTY_ENTRY_REF("ref-2", &nodes[1], 1, 2), + PROPERTY_ENTRY_REF("ref-1", &node1), + PROPERTY_ENTRY_REF("ref-2", &node2, 1, 2), PROPERTY_ENTRY_REF_ARRAY("ref-3", refs), { } }; @@ -427,7 +425,7 @@ static void pe_test_reference(struct kunit *test) struct fwnode_reference_args ref; int error; - error = software_node_register_nodes(nodes); + error = software_node_register_node_group(group); KUNIT_ASSERT_EQ(test, error, 0); node = fwnode_create_software_node(entries, NULL); @@ -436,7 +434,7 @@ static void pe_test_reference(struct kunit *test) error = fwnode_property_get_reference_args(node, "ref-1", NULL, 0, 0, &ref); KUNIT_ASSERT_EQ(test, error, 0); - KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[0]); + KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node1); KUNIT_EXPECT_EQ(test, ref.nargs, 0U); /* wrong index */ @@ -447,7 +445,7 @@ static void pe_test_reference(struct kunit *test) error = fwnode_property_get_reference_args(node, "ref-2", NULL, 1, 0, &ref); KUNIT_ASSERT_EQ(test, error, 0); - KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[1]); + KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node2); KUNIT_EXPECT_EQ(test, ref.nargs, 1U); KUNIT_EXPECT_EQ(test, ref.args[0], 1LLU); @@ -455,7 +453,7 @@ static void pe_test_reference(struct kunit *test) error = fwnode_property_get_reference_args(node, "ref-2", NULL, 3, 0, &ref); KUNIT_ASSERT_EQ(test, error, 0); - KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[1]); + KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node2); KUNIT_EXPECT_EQ(test, ref.nargs, 3U); KUNIT_EXPECT_EQ(test, ref.args[0], 1LLU); KUNIT_EXPECT_EQ(test, ref.args[1], 2LLU); @@ -470,14 +468,14 @@ static void pe_test_reference(struct kunit *test) error = fwnode_property_get_reference_args(node, "ref-3", NULL, 0, 0, &ref); KUNIT_ASSERT_EQ(test, error, 0); - KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[0]); + KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node1); KUNIT_EXPECT_EQ(test, ref.nargs, 0U); /* second reference in the array */ error = fwnode_property_get_reference_args(node, "ref-3", NULL, 2, 1, &ref); KUNIT_ASSERT_EQ(test, error, 0); - KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &nodes[1]); + KUNIT_EXPECT_PTR_EQ(test, to_software_node(ref.fwnode), &node2); KUNIT_EXPECT_EQ(test, ref.nargs, 2U); KUNIT_EXPECT_EQ(test, ref.args[0], 3LLU); KUNIT_EXPECT_EQ(test, ref.args[1], 4LLU); @@ -488,7 +486,7 @@ static void pe_test_reference(struct kunit *test) KUNIT_EXPECT_NE(test, error, 0); fwnode_remove_software_node(node); - software_node_unregister_nodes(nodes); + software_node_unregister_node_group(group); } static struct kunit_case property_entry_test_cases[] = { 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);