Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2955373rdb; Tue, 13 Feb 2024 02:22:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXNlrpF/hM8sbO7ntEkujsag88/D23FDVCtubgbkD/WKcImMAC/U5WSZk+rThkA/r6+jl1vT4r3l3BsKHw+SOprm/N+j7HB3it7nc9RJQ== X-Google-Smtp-Source: AGHT+IH24jZOx/V/3raSNcGsE0lX0104wKgTqicgQ2d9kmFHLJdF84TO/miC8+kfc5OS4kuuT5nW X-Received: by 2002:a05:6870:7b50:b0:21b:9ac7:b781 with SMTP id ji16-20020a0568707b5000b0021b9ac7b781mr222480oab.8.1707819742128; Tue, 13 Feb 2024 02:22:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707819742; cv=pass; d=google.com; s=arc-20160816; b=Usg3zVwbBxcqv6O6whJh0Cx5DQYg8n1tBrNo505HzKaUSgLvlAqJgSlK99BMFBpSSL Qab1Di8JMcVG03y6N59mbjBHSB/t6m4CQdNAIw707FW+bpi3y7xCwJLkdK/CAa7nC/Mt c/Yts1bzaFafdS+jjNAlRAaERxaJqTHXjJUGTe2/or6NCMg7PUrX6cSBMIDH/OeZESx6 lDm56yVLuP/SgRDQGZkh75QUwSqwDeyM0g9XQY1emMShPH7vwxwVwPQfOYNxuMMxvzUJ fC0llyMVUoMKHn+ootIInEUssKOLMb+zKrEF3bI+4V7KrNfPmiP1DWOvjC7dCQiAjYex 92Hg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=a/w3zkzAE6QndihWBkM3vhfOfHV1m1ja1/T/VohBOf0=; fh=hCdWnbHYr1M7aFjC5OYnQEYQIwXeUydVpN59vMHN+WM=; b=sj+r3dDqY/YaoA87dD6RxOz4Sm30KhZCoZvhYgXwDIYHfkUescXviRZTIQCBwfnopD 57TgnejTTc+72poaYzuDlYZpxGfbPFcYdQb/ylqvga1h5BpRu8pgy+1F13rN63rBvsiH Hlsj6yOpZfCVtclEKnRYJOBfmzQ3+UAoVP3qsvJShq/NfjzhwkyN2JRYHiOEDZ5ioIX+ p1tUvTd6ZLhR8tAuYTvbZCyarWChg8b1sBqftH3WTvEwcTvRORv2meyYd5Ee7Vk8t0wj aNHjb2iWYkYxzS+ZJvjz+oGp/QVTi6wgaThPdwnAl6wX2NQVnh2BEYNNK0BrGQOYJp1+ UpMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JFhoOky3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCU7Yq6i6U0/fyrpNIXqumiDFpOrsZqj4o6XTjtn1zpUAlXbDo3OVq3B9k2zNO1++BQgA3VgFUfAv6fxcEwrVWMrap47HM5Msd5ELRyCQQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m19-20020a637d53000000b005dab535faabsi1758556pgn.231.2024.02.13.02.22.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:22:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63326-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=JFhoOky3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63326-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 92EA228AB82 for ; Tue, 13 Feb 2024 10:16:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7796622626; Tue, 13 Feb 2024 10:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JFhoOky3" 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 A072D225CE; Tue, 13 Feb 2024 10:16:14 +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=1707819374; cv=none; b=sCmnHzoDx10ulMkfks5dh64LhBNCcq4dWmnbnqb7T+QUOqyhRD1TnCGMGmqcrTMgI6aruFUqIH7jg5Edo63KaH0RAjOaJIBStRPhYVz8g2YC2DKt1EZiXNnHhgWe2NtKsqpegN0fsHw+I0WhxcLmFwyPkk0aR+JPECbjQd5l4yU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819374; c=relaxed/simple; bh=k33CtS/Oue9+/X++3MgidqCmxeXWtvkicfBhbDgKtr0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=LS+jzF6h63LYGfJXrJmM5Wx2VQta+9UmnOZd8sDj6Af7yGt5sygl03ef/6PyoqiIXmYOktP+cNmMaLSnvHNS2Rr2sjuFzkStAam8he13JLqIOWXhbF87nuPraHYF1JTfkhWkeLQtteFoFPBHCyNS5UI/XSpG8l+Ag+UI5Ih6vvM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JFhoOky3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E59E7C433C7; Tue, 13 Feb 2024 10:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707819374; bh=k33CtS/Oue9+/X++3MgidqCmxeXWtvkicfBhbDgKtr0=; h=From:To:Cc:Subject:Date:From; b=JFhoOky3BG+Mf/sBqIr/THaRi7qZBEf2N3cS/D7dfxEInAfgUeO3VOTTkpu/um3He 1BYQgAsg+/jBAWldEkFTV9+pDw95l3iQWTmLAsrR+N6fwvkxI127MC2KzO3izhNpet G6UlIo/7n660MGaesxrt3dIwn6oqOBgy/tvFhId1bpcXGXerTLVBVRdcLgOl/iCEvu DUDCXx6cSRK24oxj9nnODLo8y2TliNZSs2Oyqr7WSJvhhqw3YEY+yaSp/VAcf3C7l5 6iUvhF0tpDcPmdUR+N9/NccYuUFb7v9YiuuDanaLoTkpEPIZQrAlZr/OfTc/Nno+og 69y0hZ5pg1oGw== From: Arnd Bergmann To: Srinivas Kandagatla Cc: Arnd Bergmann , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jernej Skrabec , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] nvmem: meson-efuse: fix function pointer type mismatch Date: Tue, 13 Feb 2024 11:15:47 +0100 Message-Id: <20240213101607.460930-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann clang-16 warns about casting functions to incompatible types, as is done here to call clk_disable_unprepare: drivers/nvmem/meson-efuse.c:78:12: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 78 | (void(*)(void *))clk_disable_unprepare, Address this with a trivial helper function that adjusts the return code. Fixes: 611fbca1c861 ("nvmem: meson-efuse: add peripheral clock") Signed-off-by: Arnd Bergmann --- drivers/nvmem/meson-efuse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c index b922df99f9bc..3b9e31d7d073 100644 --- a/drivers/nvmem/meson-efuse.c +++ b/drivers/nvmem/meson-efuse.c @@ -38,6 +38,11 @@ static const struct of_device_id meson_efuse_match[] = { }; MODULE_DEVICE_TABLE(of, meson_efuse_match); +static void meson_efuse_clk_disable(void *clk) +{ + clk_disable_unprepare(clk); +} + static int meson_efuse_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -74,9 +79,7 @@ static int meson_efuse_probe(struct platform_device *pdev) return ret; } - ret = devm_add_action_or_reset(dev, - (void(*)(void *))clk_disable_unprepare, - clk); + ret = devm_add_action_or_reset(dev, meson_efuse_clk_disable, clk); if (ret) { dev_err(dev, "failed to add disable callback"); return ret; -- 2.39.2