Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2386515lqp; Sun, 24 Mar 2024 17:08:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJFZcZOitznyj/vi7p5v+lvH7y1IaxZt+lz7QfEhtWbOfKtCneeRILPUEFOVYeV53HbStk7GozTptW8N0RClbI358rO8SsPBzeAyC9RA== X-Google-Smtp-Source: AGHT+IGb9gJN9IQ/CQdXaQPS6pcA4pgU7GoX7L+731OXIctkyfauSjNGU0z3Gpada7gGCjHHuNec X-Received: by 2002:a05:620a:2483:b0:788:2a0d:6f90 with SMTP id i3-20020a05620a248300b007882a0d6f90mr8118311qkn.74.1711325317026; Sun, 24 Mar 2024 17:08:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325317; cv=pass; d=google.com; s=arc-20160816; b=sG5oxsm7kKWcGbTSIEx9zICnYvfJzLAjBMBVyjVn3wX4/7Qa8QtlpPwi8GRW+8g1WV +hpUeRDQIu4/DaYMDcbGQxUnCMcMBV5LmJMV74mDaJ1W/y/Em0E3vlNXbDS/Cz3h78Ad Bxq23ZwoHS1aez7MndIVTU4AJqrCVs+IJxjesrySFCauHNBka1oKLZKegHvW46bngiah sdYF115dgGpn5Lulcr7rnQ2YkaWHlozDXLreqD4LaZyFezGvwkSDTEdss+p/Y8cWd0hy QM2XcpAQHLWhOvIVeNsjTZwj8Sa6TULX/lt5HbawNv1VeJPtcs9sf2giw/sqkcKIkx/N AsPA== 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=CrRUcdC6d17T5HcTIYNCAego+cs1Um9/M+SAd2NKNTA=; fh=9ybQpsbzD9CDmvHZOWp0LY8QXAeYRwDeL/VXxyLw574=; b=A26YZr4OTcIlN6BhWAhP3KE7WHPbL7jLjH46k+YUL/RWt728HtGb2SpjeFI0sKSF5i 99HmkH2v1yNsc9xn6Z6Q+IBGL5sp6SoV3Hoaasb6Z3VhSGMrGeWvejFz1pgYEuMxrzVU rxhbTEEKUFnmBZNAGXz2rOvaMHenlB/UWl0xlv3XVZFGxgrFDAsJMcVBGjuvZ9bL05wf 1raARHZ2RlF6dKEGwQ/xDVzOMPkyK2NER8ArQRgMLf3KCD5lsuSQFILWc8fO1mJdiuA6 Z1Pgdn07CIbgC+JtcAkWPS352wUGmvcKd27pKPXLtsyab21f9acbD56Pbw3SDPQJd/Ys PCcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dq78HLUK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bk42-20020a05620a1a2a00b0078a4350a0f7si4874319qkb.348.2024.03.24.17.08.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:08:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dq78HLUK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113318-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A33D11C2374E for ; Mon, 25 Mar 2024 00:08:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D270193FDC; Sun, 24 Mar 2024 22:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dq78HLUK" 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 23426193FC4; Sun, 24 Mar 2024 22:42:00 +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=1711320120; cv=none; b=aE8dXokzoEiKVHIAaQ2Qnhz7NbKHKKmnZ6UC5ytbbuz10tptqTgt7tBKfWDBxHVjAU5t89iRxg9RlXyiZcRepS+PspGYp1PuU8DF2SoIxI+QXHSGrq6KusTiRKZneAt5DKrJThjsup06ko8bvqHRqXQYovbDdYGIrG1hxRdjq88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320120; c=relaxed/simple; bh=PtAQUABtyxDZgdlJVsykILPS9lA4896XsifrH3VUvDw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bmEeosyPOABGEnpOTIFPB1nZi4e6TwiuNHo1S0w5aElzUXPOHcxJNebc8t9KYFXk3N2eCV3NLi2QDdceEVIgeYEi/huUQE/IvcFf/GLwZzlI5VnQypkAHq7tLJnHeMqWrnSh+SRhfeNFF5v/MiB+4JrRkwvcse0jgis3Lkh6kMM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dq78HLUK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B596C433C7; Sun, 24 Mar 2024 22:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320120; bh=PtAQUABtyxDZgdlJVsykILPS9lA4896XsifrH3VUvDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dq78HLUK5+69qe/N3OOYbhEmBn/Gq4z7n1wBhmgP98cinKyBo5i/8B+oJ9Rn4RSvn 9CwRUCxdutZT+MSVVGfDG+dpZE6vVdXHyj14wRV2DINg1KPg4SV7l1ToUO2NglPwbM 8u9b6hfiu7Wh3vG0E5kZ4S6uZE+VhyiO53OR9niZiAAL4LAioEsJmKaDs1Mb6q7K88 7xULvksmtW171J8y4mHvdCcqnly5oHlOwOW7VHAdcD+2zpl18rL1On2Z3gqEAfidaJ DFgLu9t8NCf8ZEfFhou493nUwB/ooHX9fHzsG7UUatpIh51FzYvhVO9N6QQbpcd4T9 l6QOMREFBPjSw== 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 427/715] ASoC: meson: aiu: fix function pointer type mismatch Date: Sun, 24 Mar 2024 18:30:06 -0400 Message-ID: <20240324223455.1342824-428-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 98ac85a00f31d2e9d5452b825a9ed0153d934043 ] clang-16 warns about casting functions to incompatible types, as is done here to call clk_disable_unprepare: sound/soc/meson/aiu.c:243:12: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 243 | (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: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: Arnd Bergmann Signed-off-by: Jerome Brunet Reviewed-by: Justin Stitt Link: https://msgid.link/r/20240213215807.3326688-2-jbrunet@baylibre.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/meson/aiu.c | 19 ++++--------------- sound/soc/meson/aiu.h | 1 - 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index 7109b81cc3d0a..5d1419ed7a62d 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -212,11 +212,12 @@ static const char * const aiu_spdif_ids[] = { static int aiu_clk_get(struct device *dev) { struct aiu *aiu = dev_get_drvdata(dev); + struct clk *pclk; int ret; - aiu->pclk = devm_clk_get(dev, "pclk"); - if (IS_ERR(aiu->pclk)) - return dev_err_probe(dev, PTR_ERR(aiu->pclk), "Can't get the aiu pclk\n"); + pclk = devm_clk_get_enabled(dev, "pclk"); + if (IS_ERR(pclk)) + return dev_err_probe(dev, PTR_ERR(pclk), "Can't get the aiu pclk\n"); aiu->spdif_mclk = devm_clk_get(dev, "spdif_mclk"); if (IS_ERR(aiu->spdif_mclk)) @@ -233,18 +234,6 @@ static int aiu_clk_get(struct device *dev) if (ret) return dev_err_probe(dev, ret, "Can't get the spdif clocks\n"); - ret = clk_prepare_enable(aiu->pclk); - if (ret) { - dev_err(dev, "peripheral clock enable failed\n"); - return ret; - } - - ret = devm_add_action_or_reset(dev, - (void(*)(void *))clk_disable_unprepare, - aiu->pclk); - if (ret) - dev_err(dev, "failed to add reset action on pclk"); - return ret; } diff --git a/sound/soc/meson/aiu.h b/sound/soc/meson/aiu.h index 393b6c2307e49..0f94c8bf60818 100644 --- a/sound/soc/meson/aiu.h +++ b/sound/soc/meson/aiu.h @@ -33,7 +33,6 @@ struct aiu_platform_data { }; struct aiu { - struct clk *pclk; struct clk *spdif_mclk; struct aiu_interface i2s; struct aiu_interface spdif; -- 2.43.0