From patchwork Wed Apr 3 11:03:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13615922 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16EBC139CEF; Wed, 3 Apr 2024 11:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712142221; cv=none; b=JiWj9HmazYYGctgbpyQZJm07zuKTD3t1sEexzNspRQ7AbQiU+LOhURhEIoNg5ZlzXcjMBfkZZO+FItNRXVeleNbgL6RRDPgdMDYtcZDw4OVYn3yLQYbjGI2xC8aK8Xi9zUPqaGZxE+fRphpxvAhFvXuLxEQ94z7x0qH3grkYe68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712142221; c=relaxed/simple; bh=4yTkXgWSnlXEICWMvYYyIkFxasxVZm6D0444mIba/B4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cMesQhP0INig+YPthRkSFo8FEVlDbZJmN0D2sX21sRo5pI1/SUj2bTAVuv5+r24bUE9DZpn+9UwJJrfEXyuYHu5wDDblvsfxGIATy/WBHeEWKMB4zKpLd/wfVxcErFyfTlXPUlEmYPYZy2H0wzYuspcPEjmDg9rV4Hc9S53MFPc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=by+5wRSR; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="by+5wRSR" Received: by mail.gandi.net (Postfix) with ESMTPSA id B77E01C0007; Wed, 3 Apr 2024 11:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712142212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pmN9FWxWfo4FfQqYYNRGmlgSAPDgsVfTz5LUGIcfzDQ=; b=by+5wRSRnfJBKDqqT66tYSQAcqlC8jXmhK7AzBtk2vv4AUnq7YYuDTvIUIJdh5daYIqieP heCDmFhWKoFxlMnh19pzhI81MEM6mWeLqCzOu16T6mCHLYzbXc0qEZgBTwWyCod4NdXG7m 3unZnbH7b7X1KmUcZDtp/q0AtaNy9UFqoPOwU1Z31yr5dsM3+zE2OvY6hf3Jjc7MyE4nwO 2/aTKojuEC9Dknssr5ODHFssKwAOMjjDpJHHeyZ2xUVsCoR1XeLsaBTYFsYUprGMgISSHt BvTyWiQQ77Ey+hDjYdkTK6DGct5sUxSJk3jYdB+Y7LbAq0hEnfRY0IDYV8DWig== From: Luca Ceresoli Date: Wed, 03 Apr 2024 13:03:18 +0200 Subject: [PATCH v2 1/2] ASoC: codecs: rk3308: fix "defined but not used" warning on !OF Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com> References: <20240403-rk3308-audio-codec-fix-warning-v2-0-816bae4c1dc5@bootlin.com> In-Reply-To: <20240403-rk3308-audio-codec-fix-warning-v2-0-816bae4c1dc5@bootlin.com> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Cc: Thomas Petazzoni , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli , kernel test robot X-Mailer: b4 0.13.0 X-GND-Sasl: luca.ceresoli@bootlin.com Building with CONFIG_OF=n triggers: warning: 'rk3308_codec_of_match' defined but not used [-Wunused-const-variable=] warning: unused variable 'rk3308_codec_of_match' [-Wunused-const-variable] Even though OF is needed for probing, fix by declaring as __maybe_unused to still allow building on non-OF configurations for build testing. Fixes: 9fdd7b45da18 ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403271905.BYbGJiPi-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202403271907.0z0uuG5I-lkp@intel.com/ Signed-off-by: Luca Ceresoli --- sound/soc/codecs/rk3308_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c index 9d3e4691a7b5..74c3836995b1 100644 --- a/sound/soc/codecs/rk3308_codec.c +++ b/sound/soc/codecs/rk3308_codec.c @@ -953,7 +953,7 @@ static int rk3308_codec_platform_probe(struct platform_device *pdev) return 0; } -static const struct of_device_id rk3308_codec_of_match[] = { +static const struct of_device_id __maybe_unused rk3308_codec_of_match[] = { { .compatible = "rockchip,rk3308-codec", }, {}, }; From patchwork Wed Apr 3 11:03:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13615921 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16E7B136E3E; Wed, 3 Apr 2024 11:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712142221; cv=none; b=H67dKGFeWcbs/77axGCPWBWssCN22sgtnHWOSfTzPDaGeuwdcwKILHAgxp/6jFP2TMJHjJxJOCNOVySF9X1VnIpcvVar+LkNb5w2FJMiw0GXDbgJ/ATpbV9r9NZcjWgSVUFoboylRngoc2SrS8muoH37tD0NUOfKbf6YXqvsY1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712142221; c=relaxed/simple; bh=C1mMyUpYX6wiqaj1KKueawdDp6xbLRZvPGadLfNBjCY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E3SMdbboScF8rwYr2ODRX7s91tMfC4WvxJoYNSD/hDsVX3Zjeypt0yzDK5Zm5OtUrAQmXzWevYNZXmIeueodFDT/IOfq1cKIRqF/AZWqxMXd/xcT0B8qlEcXV2k08LDbYLpl3xupsxlYuFsZgbrGA1eNHkIH0ISJN/7HzOOWHz4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=PH9oOCug; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PH9oOCug" Received: by mail.gandi.net (Postfix) with ESMTPSA id 8C8701C0006; Wed, 3 Apr 2024 11:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712142213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NxM7m7iXQdCV00+C0efugqMkr8tvqMWbpq9aXMsNUhI=; b=PH9oOCugG1kEhsFe8oyieg1ZsBCVvR8TNUXCgT+67IQ3nV16N3USEHlkA+OyZwdOSCdZyj Tp8Q02g0a3ia/vCfxTmuDBka1lt0V87lwG6hxjHLQbr4whcwZ/FEENnhYNnYPvIVziDIYy wFfxYElRQItP7ZLE1eLgRb1YsEO0X84lQL2sVuJIs/uOA13osy1eghw4FxPLlkUp8DQOw7 pqyc2RYibNYiT79DCoRDwg8EHD1HGG9MLqj9Lzs5fYrecxYCRgoYsWNyOYvyZrB5LeQ84Y vyGhEmmg8BJY8WMBmbyP6zdoKCph8obl58PlDqk4wV2ThAO3aS8yxKcxJ+XMzg== From: Luca Ceresoli Date: Wed, 03 Apr 2024 13:03:19 +0200 Subject: [PATCH v2 2/2] ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240403-rk3308-audio-codec-fix-warning-v2-2-816bae4c1dc5@bootlin.com> References: <20240403-rk3308-audio-codec-fix-warning-v2-0-816bae4c1dc5@bootlin.com> In-Reply-To: <20240403-rk3308-audio-codec-fix-warning-v2-0-816bae4c1dc5@bootlin.com> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Cc: Thomas Petazzoni , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.13.0 X-GND-Sasl: luca.ceresoli@bootlin.com This codec is only known to exist in the RK3308 ARM64 SoC, so depend on it except for compile test cases. Note that the driver won't probe without CONFIG_OF, but ARM64 selects OF already so it is not needed. Suggested-by: Mark Brown Signed-off-by: Luca Ceresoli --- sound/soc/codecs/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 1752814fffdd..4e47bb6850aa 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1436,6 +1436,7 @@ config SND_SOC_PEB2466 config SND_SOC_RK3308 tristate "Rockchip RK3308 audio CODEC" + depends on ARM64 || COMPILE_TEST select REGMAP_MMIO help This is a device driver for the audio codec embedded in the