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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 138FBC433C1 for ; Tue, 23 Mar 2021 07:38:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 789C2619C2 for ; Tue, 23 Mar 2021 07:38:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 789C2619C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0A87486F; Tue, 23 Mar 2021 08:37:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A87486F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1616485120; bh=sGWQWXCZmoy4ECjGmTkT6fZzN3SkK/zgrN3oibUa1Pw=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iclR/rdoetrCkGlIavj/cfoh26O1gtAziUIA6oZpORK1al8rEzkeHnodbIRk2sQXC k+CnT8y8shzLdxe6Xt3ZOH45ojd2RskNTvckprm5fkch0CafoQ5tCS5qnXgeq/cKJ2 ulYA8bTwuZBfGZArzeGz3f6ujn+mgkY3R65VUSjg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CB5FFF80257; Tue, 23 Mar 2021 08:37:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16D23F8025F; Tue, 23 Mar 2021 08:37:47 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 948DDF80104 for ; Tue, 23 Mar 2021 08:37:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 948DDF80104 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="X7AgwW1H" Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D66D619BA; Tue, 23 Mar 2021 07:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616485050; bh=sGWQWXCZmoy4ECjGmTkT6fZzN3SkK/zgrN3oibUa1Pw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X7AgwW1H5OVlYQS0jbEtK+PHcYdmKpowf9Gv10uB6TXnGd4sr0A6ZVo2V7fiG7IJj EN2gxi7y3Gngk/zqB0SJxnXV4894vtzdHK38qPOIBoNJBH7wBC3z+EYMNHUVIdN+4a w0ftjS8YqLFinLP459eHqRG2KW3nBKnZYjPPcfTs= Date: Tue, 23 Mar 2021 08:37:27 +0100 From: Greg KH To: Bard Liao Subject: Re: [PATCH] soundwire: intel: move to auxiliary bus Message-ID: References: <20210323004325.19727-1-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323004325.19727-1-yung-chuan.liao@linux.intel.com> Cc: alsa-devel@alsa-project.org, vinod.koul@linaro.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, hui.wang@canonical.com, vkoul@kernel.org, srinivas.kandagatla@linaro.org, sanyog.r.kale@intel.com, rander.wang@linux.intel.com, bard.liao@intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, Mar 23, 2021 at 08:43:25AM +0800, Bard Liao wrote: > From: Pierre-Louis Bossart > > Now that the auxiliary_bus exists, there's no reason to use platform > devices as children of a PCI device any longer. > > This patch refactors the code by extending a basic auxiliary device > with Intel link-specific structures that need to be passed between > controller and link levels. This refactoring is much cleaner with no > need for cross-pointers between device and link structures. > > Note that the auxiliary bus API has separate init and add steps, which > requires more attention in the error unwinding paths. The main loop > needs to deal with kfree() and auxiliary_device_uninit() for the > current iteration before jumping to the common label which releases > everything allocated in prior iterations. The init/add steps can be moved together in the aux bus code if that makes this usage simpler. Please do that instead. thanks, greg k-h