From patchwork Wed Jan 11 12:53:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daire McNamara X-Patchwork-Id: 13096590 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D9CBC67871 for ; Wed, 11 Jan 2023 12:54:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232958AbjAKMyN (ORCPT ); Wed, 11 Jan 2023 07:54:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232120AbjAKMxl (ORCPT ); Wed, 11 Jan 2023 07:53:41 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3232618B1F; Wed, 11 Jan 2023 04:53:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673441621; x=1704977621; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x0S9JzNXpNTeJ8BFLbomIJarWQeVxG/Tkx1sxIwVd6Q=; b=gmDgbS54CpTwmgI3vBr2LDzyHlVJSinAq1bEIqMMAX16u5lmXzfegksC MdoIUI4TScvEwCVw2e4xm5uNUeiaTShjrpbVxiut/X7LwCgPi07jmAz76 YRag1XCZrAppP3RwnljxKAi/kElvVmTL/d6DM9+YOIvuiVQpxnvNCLA2S HftpJzvu3+bkzzAmVVgx6VJ6kXOhP0D4yUMujoeyXs+tbwFQBNI1y/gWy qndPy0knwdYYz7Us1v1EJdrJSjZZEJXmVpWYrXoAu1dkHLeufxxhkkDo2 QP+9EkkDUtq4LWXmq1DyS5OCAhN7MllL+rv34zmY41ZT4Xcw8t5Kfg1Ms w==; X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="191745177" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Jan 2023 05:53:40 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 11 Jan 2023 05:53:37 -0700 Received: from daire-X570.amer.actel.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 11 Jan 2023 05:53:34 -0700 From: To: , , , , , , , , , , , CC: Daire McNamara Subject: [PATCH v3 02/11] PCI: microchip: Remove cast warning for devm_add_action_or_reset() arg Date: Wed, 11 Jan 2023 12:53:14 +0000 Message-ID: <20230111125323.1911373-3-daire.mcnamara@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230111125323.1911373-1-daire.mcnamara@microchip.com> References: <20230111125323.1911373-1-daire.mcnamara@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Daire McNamara The kernel test robot reported that the ugly cast from void(*)(struct clk *) to void (*)(void *) converts to incompatible function type. This commit adopts the common convention of creating a trivial stub function that takes a void * and passes it to the underlying function that expects the more specific type. Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver") Signed-off-by: Daire McNamara Reported-by: kernel test robot Acked-by: Conor Dooley --- drivers/pci/controller/pcie-microchip-host.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-microchip-host.c b/drivers/pci/controller/pcie-microchip-host.c index 5c89caaab8c9..5efd480e42fa 100644 --- a/drivers/pci/controller/pcie-microchip-host.c +++ b/drivers/pci/controller/pcie-microchip-host.c @@ -848,6 +848,13 @@ static const struct irq_domain_ops event_domain_ops = { .map = mc_pcie_event_map, }; +static inline void mc_pcie_chip_off_action(void *data) +{ + struct clk *clk = data; + + clk_disable_unprepare(clk); +} + static inline struct clk *mc_pcie_init_clk(struct device *dev, const char *id) { struct clk *clk; @@ -863,8 +870,7 @@ static inline struct clk *mc_pcie_init_clk(struct device *dev, const char *id) if (ret) return ERR_PTR(ret); - devm_add_action_or_reset(dev, (void (*) (void *))clk_disable_unprepare, - clk); + devm_add_action_or_reset(dev, mc_pcie_chip_off_action, clk); return clk; }