Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2580322lqp; Mon, 25 Mar 2024 03:24:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8cSnhHr3RaQE1sjbUK9HJYhku6kge7nKE99k51kYzgQynmTWFvBJjIQBKBLDyS0y7hdE9mWsMC4wFLBY4Vut563nMoVXSbB1qzQWhtw== X-Google-Smtp-Source: AGHT+IGzF5lARFMZQaNpEUd7z3KZIgsGu79vssA7r9U9rQOuRylGSDFjJsUKtuHxZ4bXlVuQXMJG X-Received: by 2002:a17:907:a088:b0:a4a:3414:d33f with SMTP id hu8-20020a170907a08800b00a4a3414d33fmr1726802ejc.37.1711362267742; Mon, 25 Mar 2024 03:24:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711362267; cv=pass; d=google.com; s=arc-20160816; b=kNMGSae4Zi+XWxOe0yixGT6/sVmssEvFL3l5x6Qwek+oUW2pXWiqPqx6e2TG7M1fTb yvSTM74fp4/bEER6r/MmFxT7UXmJ2FElZIIXCaHHrhi9sizEDMAIDH4avWv9k6jJF7bv jOkz7VXcI/yzjM8yNFgiTyrg4sgYsyGl8eL3o3nYUVIPcUU0K71rL49tZ1jofvdiuBKz jMl2qBCu1A3RQntvdhg5hKyCUGkMTfb+kv375JlbkOTqPalGDEpE2Pk3dnHo1RZs5RB2 8caPP7hMazngLnVZElZfro1ZxRzM1/b8xm6mTVNwT5byMHVmlJ5jHzH96LX2/d4kHzAZ pmdQ== 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=s90QkTQHltI/BF4erhWCuumSbtY37MI9PE/VOyVNKJA=; fh=9ybQpsbzD9CDmvHZOWp0LY8QXAeYRwDeL/VXxyLw574=; b=y+oH26Mg6Q23V1N7FMmKxSqm3WY8nxaHYL3DCEP+Rl3qOGXY76juEpUfIVXYGul9ba u6ue9R/b74HMRYmp3HMrMhA2x+EbvJVgZ9WZC/p1LF66pnLaBq8YKVDixXZ3QcaAu3fz nD2kHIz+cg9nMuvCiqYTTodn2/phdNdXJ8Omonys0LbSGdgGjcKDlwZhZbtXjOav77eQ yD7QnluZgz61c1b27JnkmwXCZR+QHJ5wZQIhAe/c399SSsyoWWv/xcYeH9KA6avIwlGb y3QG5OxtzKMGHJic3oYDv+ff/4gBP18OafrfLttPct+XsU1jwGQYgCMTadX2MclGOYx8 zANg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TC+P/fvJ"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116183-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ht21-20020a170907609500b00a4746bf1fc3si2099618ejc.775.2024.03.25.03.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116183-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TC+P/fvJ"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116183-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116183-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 762CA1F325E4 for ; Mon, 25 Mar 2024 10:24:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2529A3B7F34; Mon, 25 Mar 2024 03:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TC+P/fvJ" 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 DB41317C641; Sun, 24 Mar 2024 23:42:54 +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=1711323774; cv=none; b=DMzKg3UVRrt4TkKg5wBC+b7xBL6cz0jrWZqVcKU96Uke5BFaTDTG2YWYthYSS1bvaLoBTNdigQ2qTJeTcIdN3+G9xNd8OJaeqxgQ/xXYSjGfYsPRFsKeI+0CtvdajvzjGZ5r7Mh4CMv/MjQDvPDt7XdtnMBw85/C32EWvGwp7w4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323774; c=relaxed/simple; bh=S8Yjdnpevw2WVZxIsS5jm3Cwfo/mtdicJ9k3Caczv4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o4nUcHBDTADIA2ZqrK0dVP86WZ5WmxocQehMsW2MZ6WFPXwpYPD7W2zgTjGISxfgNqcLwK4C0R/a9RdcIgAFoxfAoGY82ltkpP5b215BJV8hLjoC6imFGmmLMM9klsWXpl2JT8+4rRWeTRTBUeSaH1dIjLPPy87uimkB49lpQOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TC+P/fvJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEBB0C433C7; Sun, 24 Mar 2024 23:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323774; bh=S8Yjdnpevw2WVZxIsS5jm3Cwfo/mtdicJ9k3Caczv4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TC+P/fvJp9NLSaNhcSR/QpPwkXL4nC9oA0UijMt0bSRnfYDCLGMr/vxEDcOEcIbaN Gdjn7fVmg5tpn8aA7phVE52ucMlwAxjuN0oAq7AO/dOhEZGxWDlR1Q0FBwtMh7mwol 1UfsBKRFCeuXeO98PEZRpztyUmd0ahFiQsO3VLam+UZp9cbI4LpGbmOUZ/fCdIlylL zGTZsS/kMLybhmDA3T/kbr80Miou0LapEumfmLxlkXQIUnkx4ymNSAsc8ESzJ8mGiS QdRcQbxz+EHzEJEx6klAcGnv5gustVTzyzb9AzV2f+4Y995RlcF+BvBGCEPGTx5YVZ 3smEH9IS5Ykcw== 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 5.10 150/238] ASoC: meson: t9015: fix function pointer type mismatch Date: Sun, 24 Mar 2024 19:38:58 -0400 Message-ID: <20240324234027.1354210-151-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 cb1eaf678fc3f..b085aa65c688c 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; }; @@ -250,6 +249,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); @@ -257,26 +257,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