From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 A7A83C12002 for ; Fri, 16 Jul 2021 18:43:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DBEA613F7 for ; Fri, 16 Jul 2021 18:43:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbhGPSqn (ORCPT ); Fri, 16 Jul 2021 14:46:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:40862 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbhGPSql (ORCPT ); Fri, 16 Jul 2021 14:46:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10047"; a="232619639" X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="232619639" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 11:43:46 -0700 X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="497102536" Received: from mohalshu-mobl2.amr.corp.intel.com (HELO [10.212.40.103]) ([10.212.40.103]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 11:43:45 -0700 Subject: Re: [PATCH] ASoC: Intel: Handle device properties with software node API To: Heikki Krogerus , Mark Brown Cc: alsa-devel@alsa-project.org, Cezary Rojewski , Kai Vehmanen , linux-kernel@vger.kernel.org, Jie Yang , Takashi Iwai , Liam Girdwood , Hans de Goede , Bard Liao , Andy Shevchenko References: <20210322110638.2681-1-heikki.krogerus@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <050073c4-5ea0-183d-5bd0-7df388fcce33@linux.intel.com> Date: Fri, 16 Jul 2021 13:43:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210322110638.2681-1-heikki.krogerus@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Heikki, Going back to this initial patch, I have a doubt based on Andy Shevchenko's comment on an update [1] > The function device_add_properties() is going to be removed. > Replacing it with software node API equivalents. The replacement pattern takes this one line: > - ret = device_add_properties(sdw_dev, props); which gets replaced by > + fwnode = fwnode_create_software_node(props, NULL); > + if (IS_ERR(fwnode)) { > + return PTR_ERR(fwnode); > } > > + ret = device_add_software_node(sdw_dev, to_software_node(fwnode)); > + > + fwnode_handle_put(fwnode); is the fwnode_handle_put() actually required here? This seems to work fine in our tests but I wasn't able to find in the code a matching _get(). Thanks for any pointers/comments! -Pierre [1] https://github.com/thesofproject/linux/pull/3041#discussion_r671450168