Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12032192ybi; Fri, 26 Jul 2019 03:40:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9ZNyjdSGFC941Mz/iBkfZFP7LsAuZkf/j6hMGyifg60xkkeqqLhPDBU6r+D2gOX6Kn5Xx X-Received: by 2002:a17:902:4283:: with SMTP id h3mr92968747pld.15.1564137654499; Fri, 26 Jul 2019 03:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564137654; cv=none; d=google.com; s=arc-20160816; b=xGfMgqOsC3RdxWmtzFB+1Rt3wVP/EpKXfAj0MarCDcVM7zbb6ny1FNO0FTMM7xBoqa BgJ1Z8Y/ZgwBfBe7oIHokO4Pj7VpKhtc5Im1jf9C+Asbk4DosKhGXX/fs1/N0srBmb2A T59pDtzoeYhszP2cldBmcS4UQBh6NGy3j7Napa5UJc9tm3Ka2zYv+3tVX2+9KxbTR3xf S4a2Fh0fManiuoros5/elWUo+c6RCBLodVgDJQZJH68yAKaNVVPqS4Q56qsQwnQPsWb9 Z/N6ydFUExfoa//8puKD77N8HFNZA2c8+zBuZOIP8Vlls7wg8UWUxhAL4Lu522K2JxuQ J44A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Y6wNulDKVn/XBlvozbbCFM2kc5PGsaKslj9PUZqTYOA=; b=JhcQ58pvRHYiAjnLZAp/GnOa/kuylim+yfgkApjAgHt9uQZXeRMmpl2vh17aU2/7Qb ojqCE5CABAwMPR5b3b7SNIpMMRF2Ciihj3GJTc3D2qXtoKH8DeMDZJ/mO8iZAXYOrfes FSTlmmpmmcutDlCwwbS5dGQeajwTazu65yy1Jkat44gdOXo9RM8hNWJXu3snt5Yuja9C CuadqgEEvh2i/IhzqA98VW/T6IThen3+vVgPzrBtVsZA5mhOjrW1LYvukJoSP6R/O3ao cg189riD+GCJrbaMGibleIGVyhso+XDarhF/e8gedmtdMIL8JxE4/qgzdQI7du444zzA EktQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y19si21620764pll.326.2019.07.26.03.40.38; Fri, 26 Jul 2019 03:40:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726562AbfGZKiS (ORCPT + 99 others); Fri, 26 Jul 2019 06:38:18 -0400 Received: from mga06.intel.com ([134.134.136.31]:53121 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfGZKiR (ORCPT ); Fri, 26 Jul 2019 06:38:17 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 03:38:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="175557788" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.251.89.116]) ([10.251.89.116]) by orsmga006.jf.intel.com with ESMTP; 26 Jul 2019 03:38:11 -0700 Subject: Re: [RFC PATCH 31/40] soundwire: intel: move shutdown() callback and don't export symbol To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-32-pierre-louis.bossart@linux.intel.com> From: Cezary Rojewski Message-ID: <39318aab-b1b4-2cce-c408-792a5cc343dd@intel.com> Date: Fri, 26 Jul 2019 12:38:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190725234032.21152-32-pierre-louis.bossart@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-07-26 01:40, Pierre-Louis Bossart wrote: > +void intel_shutdown(struct snd_pcm_substream *substream, > + struct snd_soc_dai *dai) > +{ > + struct sdw_cdns_dma_data *dma; > + > + dma = snd_soc_dai_get_dma_data(dai, substream); > + if (!dma) > + return; > + > + snd_soc_dai_set_dma_data(dai, substream, NULL); > + kfree(dma); > +} Correct me if I'm wrong, but do we really need to _get_dma_ here? _set_dma_ seems bulletproof, same for kfree.