From patchwork Mon Sep 25 16:31:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 114179 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2809461qgf; Mon, 25 Sep 2017 09:41:12 -0700 (PDT) X-Google-Smtp-Source: AOwi7QChTCb75eNu5EglTY6kasuIzVe0Y/pTD8zAh/0904rhD3DArDHT2W3+5xtKe1nhZAuo/bQR X-Received: by 10.223.178.166 with SMTP id g35mr7094084wrd.262.1506357672587; Mon, 25 Sep 2017 09:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506357672; cv=none; d=google.com; s=arc-20160816; b=LLWUHfhCgpxB5Ahc+UDcQ0tjiyt+2vLd/Afhv/KzyN25yYMyjH8mvx1L6aVXprytL5 ZkTbzNzcxzkeG7y0JlK4H1+s8lI4/Q2fmbosEQgNCoiaqJpESbUkWB8dZDM6QSa6s1fp DdVuOaWgUfvxTW539nFz7hiS+ZYnezxzbVmNz3jyQyywF1HolavF3iINWw0idAHSYFVe tR6hVi9f8jahz2y/umkfn8EkBS7LMPWMJN0DXqQc6HcnMpz7ZTG94YC5gxFy7kLqarFM o9jwqawfeMEJeXRv/Zo9FBZJeefXiBu3V08vAmfpNfiYW98UXafBD+yiHVG0f3OQ/OfB urEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=BA/7EdgieG9XTYjNiqkMRKxd1sk8LjGysRuGT0yv1/4=; b=iwfyeLJrgfC5gHZpdb/dVxROIF5fqfXVe2lArpyBlra6smK4Ii8oahjPLp670oTrd4 J/KuOeWy/fPH8ewkJwnfQpITHC7kRpDX91GZiUTiTts84v+W9ir+5VhE8moHDtVNSwD4 fWyl+P5TMvYdvD6muF05istOF8asOP6S3koh8khuVn7pA744WuuULjUgwAhWTFJf/DaE 1LpmGJKm7siRrU+blHJWQV2sUKSnLu61is6QyF9n79LXOoHq3eUFNuTM4O6MAXp83HKw ohxxdiiO5UlCO2DtQrgf+1Yy8ubp4hZ55g68zOH9pNwwV2FE9NgQOSA+3u9XA10zcNNY rWfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=UuUHjeTx; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id d2si5347232wre.468.2017.09.25.09.39.51; Mon, 25 Sep 2017 09:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=UuUHjeTx; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BFC6E266FCC; Mon, 25 Sep 2017 18:36:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C9FDA266EDD; Mon, 25 Sep 2017 18:35:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 050C4266EEB for ; Mon, 25 Sep 2017 18:35:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=Lb2EjEx02n9C1j/ajHwEO9ZjabfQqdjoufbQ5Fd5+Tg=; b=UuUHjeTxoDAz LNgsUAN9zWzjJjDiuYo0nsWGkTyv1xwKhZxFC9kdZZqVe24S67lY/3SInDhXO/b0+GyBmCT1i8z+C KJijKbLQRiIAvlFg7ISA9AoYPiMSkGUHZuIAw98xX6mBHcJA/qXIHOnwSxL+tt6aTXFHiUWA0hJD7 RFfb8=; Received: from [70.35.39.2] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dwWIS-0001Wm-TN; Mon, 25 Sep 2017 16:31:53 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 93528440053; Mon, 25 Sep 2017 17:31:20 +0100 (BST) From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87h8vrpnsg.wl%kuninori.morimoto.gx@renesas.com> Message-Id: <20170925163120.93528440053@finisterre.ee.mobilebroadband> Date: Mon, 25 Sep 2017 17:31:20 +0100 (BST) Cc: alsa-devel@alsa-project.org, Mark Brown , Simon Subject: [alsa-devel] Applied "ASoC: remove unneeded dai->driver check" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: remove unneeded dai->driver check has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 464719255e095b0cc05a30b124f2cdc67a930d7f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 25 Sep 2017 01:38:34 +0000 Subject: [PATCH] ASoC: remove unneeded dai->driver check On soc_add_dai(), it is checking dai->driver->xxx, This means, dai->driver is mandatory, never been NULL. dai->driver check is not needed. This patch removes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 091ebe198194..e16220600e51 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2631,7 +2631,7 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls); int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { - if (dai->driver && dai->driver->ops->set_sysclk) + if (dai->driver->ops->set_sysclk) return dai->driver->ops->set_sysclk(dai, clk_id, freq, dir); return snd_soc_component_set_sysclk(dai->component, clk_id, 0, @@ -2699,7 +2699,7 @@ EXPORT_SYMBOL_GPL(snd_soc_component_set_sysclk); int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div) { - if (dai->driver && dai->driver->ops->set_clkdiv) + if (dai->driver->ops->set_clkdiv) return dai->driver->ops->set_clkdiv(dai, div_id, div); else return -EINVAL; @@ -2719,7 +2719,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_clkdiv); int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source, unsigned int freq_in, unsigned int freq_out) { - if (dai->driver && dai->driver->ops->set_pll) + if (dai->driver->ops->set_pll) return dai->driver->ops->set_pll(dai, pll_id, source, freq_in, freq_out); @@ -2785,7 +2785,7 @@ EXPORT_SYMBOL_GPL(snd_soc_component_set_pll); */ int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) { - if (dai->driver && dai->driver->ops->set_bclk_ratio) + if (dai->driver->ops->set_bclk_ratio) return dai->driver->ops->set_bclk_ratio(dai, ratio); else return -EINVAL; @@ -2859,7 +2859,7 @@ static int snd_soc_xlate_tdm_slot_mask(unsigned int slots, int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) { - if (dai->driver && dai->driver->ops->xlate_tdm_slot_mask) + if (dai->driver->ops->xlate_tdm_slot_mask) dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask); else @@ -2868,7 +2868,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, dai->tx_mask = tx_mask; dai->rx_mask = rx_mask; - if (dai->driver && dai->driver->ops->set_tdm_slot) + if (dai->driver->ops->set_tdm_slot) return dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask, slots, slot_width); else @@ -2892,7 +2892,7 @@ int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai, unsigned int tx_num, unsigned int *tx_slot, unsigned int rx_num, unsigned int *rx_slot) { - if (dai->driver && dai->driver->ops->set_channel_map) + if (dai->driver->ops->set_channel_map) return dai->driver->ops->set_channel_map(dai, tx_num, tx_slot, rx_num, rx_slot); else @@ -2909,7 +2909,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_channel_map); */ int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate) { - if (dai->driver && dai->driver->ops->set_tristate) + if (dai->driver->ops->set_tristate) return dai->driver->ops->set_tristate(dai, tristate); else return -EINVAL;