From patchwork Wed Oct 9 15:36:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 175630 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp924549ill; Wed, 9 Oct 2019 08:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZL5y1DINiwOE406VYQuL0qoXvNFVrHRM0UjCLqMQxBatTCps6pNJbERUPT+2swJ+RG6P7 X-Received: by 2002:aa7:dc47:: with SMTP id g7mr3557392edu.153.1570635383990; Wed, 09 Oct 2019 08:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570635383; cv=none; d=google.com; s=arc-20160816; b=o/SE6vQo5rZp8CxM/BGwGAa7e5QJGBY4aTp/6mTrDKEv4IokEtycA/efJxCn/MQ7NZ ClTFRUdKa6zworCSVn7opepUfnr0nISg2ZtAkOQW4dNID0VSdOZO7U+aFMIx1xuQaAmg DRWovGRR8rW+vJbIyFqpBzPLIy6CqmTAhDIbRyqWHka7aBLcEMC/c/jfgWSSKOSJ8NO6 cOW14daf2hu51IdG7iOxiTsZLuv1q2cO1FMosG69hW4D01zTBkR9EGCxAIlZMO5ZePsK i3Rgxws9pJ/dgx+8wA+bmsM7P8WPm2TZkWuIL37dQQd4ELmtZNyVivCM0ZCJLwttkF60 TChA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Kn87cMPhZfFJVBHJAEEZIX/y9LLr6Y7iM6LRBEs/HaA=; b=gUBn91zuL+txsBOKN8ah6B0/T1xjfy/tYBR3rX6Pdj6lVMqooHoMMXvuFIpx1xCklE /uAAz7tB1ddsYmoJ7iRMPCTNeT93hdA+RlsHBr7klbdb2BgXjEIVvIaDekSMgs8saHD3 2KtxN2okSRVQDMbgfqBTchnqy8zCbkaBMyJffNYYfipnDOGbT06RTkHVLq7r3GUdKxau nL40S5UhgXD+pskrnZSGwgkciokgZSMf3CrY43LZL/bDndr7TgFjV3s+DWyoI6V4xXKr 8ZShz1dVzCac6H1bTTfZ/hSrGAv+yWsprX5au90DJqTbHGhDSk2kv+8JPnkExvBk3x/j NLTw== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h23si1407651ejc.1.2019.10.09.08.36.23; Wed, 09 Oct 2019 08:36:23 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731338AbfJIPgT (ORCPT + 26 others); Wed, 9 Oct 2019 11:36:19 -0400 Received: from inva021.nxp.com ([92.121.34.21]:42650 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729883AbfJIPgT (ORCPT ); Wed, 9 Oct 2019 11:36:19 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C8BB92001E1; Wed, 9 Oct 2019 17:36:17 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BB4D12001D5; Wed, 9 Oct 2019 17:36:17 +0200 (CEST) Received: from fsr-ub1864-103.ea.freescale.net (fsr-ub1864-103.ea.freescale.net [10.171.82.17]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 289AC2060B; Wed, 9 Oct 2019 17:36:17 +0200 (CEST) From: Daniel Baluta To: perex@perex.cz, tiwai@suse.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kuninori.morimoto.gx@renesas.com, Daniel Baluta Subject: [PATCH 1/2] ASoC: simple_card_utils.h: Add missing include Date: Wed, 9 Oct 2019 18:36:14 +0300 Message-Id: <20191009153615.32105-2-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009153615.32105-1-daniel.baluta@nxp.com> References: <20191009153615.32105-1-daniel.baluta@nxp.com> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When debug is enabled compiler cannot find the definition of clk_get_rate resulting in the following error: ./include/sound/simple_card_utils.h:168:40: note: previous implicit declaration of ‘clk_get_rate’ was here dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); ./include/sound/simple_card_utils.h:168:3: note: in expansion of macro ‘dev_dbg’ dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); Fix this by including the appropriate header. Fixes: 0580dde59438686d ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Daniel Baluta --- include/sound/simple_card_utils.h | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 985a5f583de4..293ff8115960 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -8,6 +8,7 @@ #ifndef __SIMPLE_CARD_UTILS_H #define __SIMPLE_CARD_UTILS_H +#include #include #define asoc_simple_init_hp(card, sjack, prefix) \ From patchwork Wed Oct 9 15:36:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 175631 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp924560ill; Wed, 9 Oct 2019 08:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqygpn8T5HGTkTirmWfKUxJLVfa/M5EmrJfKuHEP6LO1NQaMya0B5uAkf3VSzMwiaWvQ7Llk X-Received: by 2002:a05:6402:1b1a:: with SMTP id by26mr3609698edb.178.1570635384436; Wed, 09 Oct 2019 08:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570635384; cv=none; d=google.com; s=arc-20160816; b=kqjoA/ImsjK8iPP4mg4WBnVeruhMpQl79IGz+3AAKN1STHKfdxIKirfGnx09rQj+1X O1U+F0bTgq/G0v5/ngjS53O6X8eftamC4OmwgRFIo2S29cFBTid37Xe5AT17sWBMiy0f t2LtwkLZbkj7o8DXrtjkrwxoO02OiW5FWvVMuPr6Bc0XoUu6GZ64nqY71+ZEsqyETpt5 rZYkgRnOjtE6OxUn0ELRs4DLfy6poICsE9/Yf+KT+G+KHGvYQ+Q1BWF+X7PGk1dx/QIr 8rTSqM28abBYtTTSHPBisXWh6mYregllh9IHVhNo0fvdZfji0kYtFfwyixTPnVQaJp6T gWsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=/gk/d5QaeWGMTSFszywioKEiAUARWXcfmeq01wmLbzw=; b=oLr8YRVkXF+/FMNlzaoN4qQ2Sgb4DXHzi06PBqKmHQgFyAimKCrw/ZA/yRzr2vqS5H zA0HxmKICF/RXRNFpzAPBEdCIFRdChqBCGsByMOMab8lDvCVSUiGsPhz1zNgGPpKm2KF KmWBHpICH04RLeb2wwcqEJ3qUDriDc187lUbeRtpBhA4DqqVALVnBbUjmhhHHQio94tO LsZF95OLDps7hKlpZDVd5hoI2YHsyeZMnea4Xx6SjXjUELXbwEIUn0KYKyZejQWNr14F OwmHynBbvfQqQkQTuDk0p37E7gxM/tiYFwPK/8xr8jQVpdvhyABWFQO05OWNrb+uvb/4 OpTQ== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h23si1407651ejc.1.2019.10.09.08.36.24; Wed, 09 Oct 2019 08:36:24 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730256AbfJIPgX (ORCPT + 26 others); Wed, 9 Oct 2019 11:36:23 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49886 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730546AbfJIPgU (ORCPT ); Wed, 9 Oct 2019 11:36:20 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 523FB1A01A2; Wed, 9 Oct 2019 17:36:18 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 463731A0084; Wed, 9 Oct 2019 17:36:18 +0200 (CEST) Received: from fsr-ub1864-103.ea.freescale.net (fsr-ub1864-103.ea.freescale.net [10.171.82.17]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id D2A8B2060B; Wed, 9 Oct 2019 17:36:17 +0200 (CEST) From: Daniel Baluta To: perex@perex.cz, tiwai@suse.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kuninori.morimoto.gx@renesas.com, Daniel Baluta Subject: [PATCH 2/2] ASoC: simple_card_utils.h: Fix potential multiple redefinition error Date: Wed, 9 Oct 2019 18:36:15 +0300 Message-Id: <20191009153615.32105-3-daniel.baluta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191009153615.32105-1-daniel.baluta@nxp.com> References: <20191009153615.32105-1-daniel.baluta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org asoc_simple_debug_info and asoc_simple_debug_dai must be static otherwise we might a compilation error if the compiler decides not to inline the given function. Fixes: 0580dde59438686d ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Daniel Baluta --- include/sound/simple_card_utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 293ff8115960..bbdd1542d6f1 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -136,9 +136,9 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv, struct link_info *li); #ifdef DEBUG -inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, - char *name, - struct asoc_simple_dai *dai) +static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, + char *name, + struct asoc_simple_dai *dai) { struct device *dev = simple_priv_to_dev(priv); @@ -168,7 +168,7 @@ inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, dev_dbg(dev, "%s clk %luHz\n", name, clk_get_rate(dai->clk)); } -inline void asoc_simple_debug_info(struct asoc_simple_priv *priv) +static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv) { struct snd_soc_card *card = simple_priv_to_card(priv); struct device *dev = simple_priv_to_dev(priv);