Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2387529lqp; Sun, 24 Mar 2024 17:11:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvkclu8AFBggsVyVoSjtHcXZQzTWrNYVa23OzeFLHOf8/z4VwD5JrP4q7Ty9yidzpI7cwZ/vWp6fTPSdSkE1DFivhHqRejTXfvotGf/A== X-Google-Smtp-Source: AGHT+IF+Qf+E6pM5rs3BwBfyqZYSLMi91jDkGAPVqtOcNqZ0Vou3ZC6U7xlVX4yyTjZlho9fgiso X-Received: by 2002:a17:90b:189:b0:2a0:24a1:e358 with SMTP id t9-20020a17090b018900b002a024a1e358mr7236872pjs.13.1711325473472; Sun, 24 Mar 2024 17:11:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325473; cv=pass; d=google.com; s=arc-20160816; b=sH+PLYdCQYQvPyrfmhWub4YUkrljOKTewQb31eAYo7aNzDejxJsEJyWEKlXl67+YMk zouni1JgZTj4fuAemyX2kr+dRUF8R00x7vdme62Ya3zeYz1+3Yjw+Rxp3fA4PR0cTVUB E2ETarcqO6MH8xXWmZA7+vOW1oAvmBAPImmzEqBRHYiwztok+sqPXCdt83vpmW5EL1pv T8JK8bi7UFtB1lmIAVQ8f7+I7oGlAlvykIRtq0hWZhMsHdcI47mgkGUXx/s3cn8AdDSm HjMM4zPD3vRcOi8wkkZrYDHtItFnlBMdhTJTc3nXrxK1sZOut3ZcRz94sjORUuejrdG3 FIWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=wgycWcC2CrKak3t2BFufV5aHDUwovr5qwK4nYKiK22k=; fh=9ybQpsbzD9CDmvHZOWp0LY8QXAeYRwDeL/VXxyLw574=; b=KDmotsaNOF+s3AqocWR6wV7rB2E6syAIBbun2dEWzQ+XWwhTOY3F6DFbWjqrITjOPn gvPrS2SoOD7Sa5L19CXLx7Kr+LDpngtzHB0p0Am6gGmPVuTCLF3HL1/I34eX5zcN2eDA s+nEmLtJjpGLLSjw7nOmhbbiTBMiW+aal/vIsxxaUQ75BErsBNUGbf+ODZISMTn9d3T8 +HQqA99PlGS3b6gfMnNv39/BGRoj/YWrPP+/rmOu/gN9B6CdLQe7aoLTJoUfuSQpAlLl TzpHgDx7PGAXPrThnUsuCzti7tkyRxP9QSkuTsrKYRlu2oOaQrKS3tqzx2UobIZeAVI1 PiBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=id2qq5dA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113319-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lp11-20020a17090b4a8b00b002a077cb6875si94221pjb.34.2024.03.24.17.11.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=id2qq5dA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113319-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113319-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A528F280D4A for ; Mon, 25 Mar 2024 00:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59D06194671; Sun, 24 Mar 2024 22:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="id2qq5dA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 74BD26CDC0; Sun, 24 Mar 2024 22:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320121; cv=none; b=KgClQky/KhuOUajOBY87NqoYr0sauC9Bn0FWBOp4JR+oQ00Qxu9KsgTbiRvtdtjgj5iK2pk5g2q4TJoyhTBaGxLWFy9+IDzE2uIORuH0S5ixT3ckjOp3wD9Hcgw0aLXCTBiDTc7gLftzzBEV2ZWC3oprtMXxdM4+ECXo27QXtiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320121; c=relaxed/simple; bh=32Gku5sbfFWN/XgXjEhBLHodUGyYu8Wv1FUmnhm2HPQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FSaHWJBc2BDMoZ3JUNOVIHzN1qUTwHatpHYhQZkCsXUk0wL+Wc/QbNJ1uZBhXs/JKDbeSCg4Rsiu1jiFds8W93yvsG+lUWAYqIEl6Z+a+l+77sFki58n5Vr1XrE7XzUwdt3aHfiPwRYsJ7T3GUcgN51bmSlmOENplVqX8a5VDXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=id2qq5dA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40123C433F1; Sun, 24 Mar 2024 22:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320121; bh=32Gku5sbfFWN/XgXjEhBLHodUGyYu8Wv1FUmnhm2HPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=id2qq5dAT6bk+cnlaG2woNJjss+Mq5G78EtDu+p0PY3S+jxSL3OnZjekMGRd2vuHM 3B0IHZ1q5T2m1maGpAzLHVE2usuSCZiOQpp9M8TtQPniz6J+cRLy0wuk4oj3OkUXWE J4omCTKV+fSafPsW5DYCNNBa8PivybPMNTCkmaC+9djFHxG7CqZupTiz0oT+ZaPvGZ zotfRD2bUiL1EtOEbMHW4oXUY8RwzRWvlmA7b8hNgFlwHAGY3NHh4VN/CTzTqzFqko OrTlYQMWyUjK0B7dpVHY5rORFKtGhy9r2IJ1iR5ycJBbk2ytrdYn2HGAZGYi8ZSRZy /80UPqBx6zT1g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jerome Brunet , Arnd Bergmann , Justin Stitt , Mark Brown , Sasha Levin Subject: [PATCH 6.8 428/715] ASoC: meson: t9015: fix function pointer type mismatch Date: Sun, 24 Mar 2024 18:30:07 -0400 Message-ID: <20240324223455.1342824-429-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jerome Brunet [ Upstream commit 5ad992c71b6a8e8a547954addc7af9fbde6ca10a ] clang-16 warns about casting functions to incompatible types, as is done here to call clk_disable_unprepare: sound/soc/meson/t9015.c:274:4: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 274 | (void(*)(void *))clk_disable_unprepare, The pattern of getting, enabling and setting a disable callback for a clock can be replaced with devm_clk_get_enabled(), which also fixes this warning. Fixes: 33901f5b9b16 ("ASoC: meson: add t9015 internal DAC driver") Reported-by: Arnd Bergmann Signed-off-by: Jerome Brunet Reviewed-by: Justin Stitt Link: https://msgid.link/r/20240213215807.3326688-3-jbrunet@baylibre.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/t9015.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/sound/soc/meson/t9015.c b/sound/soc/meson/t9015.c index 9c6b4dac68932..571f65788c592 100644 --- a/sound/soc/meson/t9015.c +++ b/sound/soc/meson/t9015.c @@ -48,7 +48,6 @@ #define POWER_CFG 0x10 struct t9015 { - struct clk *pclk; struct regulator *avdd; }; @@ -249,6 +248,7 @@ static int t9015_probe(struct platform_device *pdev) struct t9015 *priv; void __iomem *regs; struct regmap *regmap; + struct clk *pclk; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -256,26 +256,14 @@ static int t9015_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, priv); - priv->pclk = devm_clk_get(dev, "pclk"); - if (IS_ERR(priv->pclk)) - return dev_err_probe(dev, PTR_ERR(priv->pclk), "failed to get core clock\n"); + pclk = devm_clk_get_enabled(dev, "pclk"); + if (IS_ERR(pclk)) + return dev_err_probe(dev, PTR_ERR(pclk), "failed to get core clock\n"); priv->avdd = devm_regulator_get(dev, "AVDD"); if (IS_ERR(priv->avdd)) return dev_err_probe(dev, PTR_ERR(priv->avdd), "failed to AVDD\n"); - ret = clk_prepare_enable(priv->pclk); - if (ret) { - dev_err(dev, "core clock enable failed\n"); - return ret; - } - - ret = devm_add_action_or_reset(dev, - (void(*)(void *))clk_disable_unprepare, - priv->pclk); - if (ret) - return ret; - ret = device_reset(dev); if (ret) { dev_err(dev, "reset failed\n"); -- 2.43.0