Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp327196rwe; Tue, 18 Apr 2023 22:53:27 -0700 (PDT) X-Google-Smtp-Source: AKy350biHRjjPPGwGSQe0wq20xFAafZ9zxRe2jEOEy6UNTGfq9Fnm2wGRSNQWqrzwzNW/ZIj0U0t X-Received: by 2002:a17:90a:fae:b0:23a:177b:5bfa with SMTP id 43-20020a17090a0fae00b0023a177b5bfamr1660614pjz.22.1681883606912; Tue, 18 Apr 2023 22:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681883606; cv=none; d=google.com; s=arc-20160816; b=f+QOGfX/Y3Ki28lS01h6jB2KZ24qplOmlwRceWQ45b0D6ZyTBadRq9eQDVCztNKXEH O+Ipho7dWlaHdrHPBogRfZsvu+zYKB0G7ABfmXKx7it+s5r3s32hrjBlyViVmXSlLqBG OBfjRsXU0ospkG0HbXl/9SSy42qyzuZWGDs2CHOJ6FGq3eDv5BnHh7GzBrggzJvTd09i Ql1+xIUtpd21ACXSPuIqkjW9MOPZqMAH2rVgi5zftJ97mSCvfQTk5ifXHvewsS0kjBRN LB/lrN/hSNpzSteg99eNeKrHu8Cy2uPKikwlvm47um3kZZqhtZpYmulBIfU+UPqeca0g q7rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N1ILXqZrCgc4YPOL0JdtArRbtEAldMMvltSVBkiXICE=; b=BMeTNt9gpXMy4OA2YTbENdULyvt4wdQ/WOtKdLnEbEBFnO0Tr6snBgooW0Rvb7M+IY HA+PAg4ZpGySyjn33XaLQhtkyTAMbx8cFbfjS39Q6Tp6ud2cCFQNuXlyWZMZcWMFmmwz 763V3yypHaS3qV5XYZFZgtipIzfdd6lSQCyNFsFTExmQhTR87sXLkdcadL3ZVKtQ1Sda IyiMbvi0/WatKFoOwsxBHntbT8qkotr9Kf5hHzwSzJc9KIFLiw2LowO5g3/rJNbBgf2c BXWlhbVPubLQO4W/9OoHrUNsfQhk1LVzlkgHtjWsoQNuYIPdA3RhleHRw+wa7b6M2f33 DF2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H/BGdcSY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx4-20020a17090b4b0400b0024799a3324dsi958105pjb.162.2023.04.18.22.53.15; Tue, 18 Apr 2023 22:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H/BGdcSY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231214AbjDSFpY (ORCPT + 99 others); Wed, 19 Apr 2023 01:45:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjDSFpX (ORCPT ); Wed, 19 Apr 2023 01:45:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBB7B2118 for ; Tue, 18 Apr 2023 22:45:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4A30D63B0F for ; Wed, 19 Apr 2023 05:45:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA0E0C433EF; Wed, 19 Apr 2023 05:45:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681883120; bh=rHIVwcWlnAi6I7EkL3r3k1a15viUoZ98G0Ds8/Yst4M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H/BGdcSYEk2ZQ32pQ/0W1uRry9lv83+rgnE4uGpjyOtQqRFDNUni+12kavXJZm2No NRSeFPNyOaiol6RH221aAeH0iJ7QLpGF282uUoj1w6ZESa0iGmg61OKWt37WA6h2/P 3uAY8LG6/vzl6VbVkSGZTHmZkTIsOffKc3D4w/e9jysM530tYnCBj/EMyo4p1rc2Kx eCpBKX7SsQ+yDJE3ON1iwcBGWo30qaD7n1lfrZPW85hzpGUH7meWLVGjQH2KdlOdF3 /UiVSEa2frokvmHdbWV+y0PTiQ89/vjtpefaqFOl+dxdb7BIrFF4QqPynZlk3oHO0u iP8KnCri24PZA== Date: Wed, 19 Apr 2023 07:45:16 +0200 From: Simon Horman To: Nick Desaulniers Cc: Nishanth Menon , Santosh Shilimkar , Nathan Chancellor , Tom Rix , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH] soc: ti: pruss: Avoid cast to incompatible function type Message-ID: References: <20230418-pruss-clk-cb-v1-1-549a7e7febe4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18, 2023 at 11:44:28AM -0700, Nick Desaulniers wrote: > On Tue, Apr 18, 2023 at 4:41 AM Simon Horman wrote: > > > > Rather than casting clk_unregister_mux to an incompatible function > > type provide a trivial wrapper with the correct signature for the > > use-case. > > > > Reported by clang-16 with W=1: > > > > drivers/soc/ti/pruss.c:158:38: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > > ret = devm_add_action_or_reset(dev, (void(*)(void *))clk_unregister_mux, > > > > No functional change intended. > > Compile tested only. > > Thanks for the patch! > Reviewed-by: Nick Desaulniers > > Here's some more suspects to look at, if you have cycles: > drivers/base/devres.c:734:int __devm_add_action(struct device *dev, > void (*action)(void *), void *data, const char *name) > drivers/i2c/busses/i2c-mchp-pci1xxxx.c:1159: ret = > devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c); > drivers/soc/ti/pruss.c:96: ret = devm_add_action_or_reset(dev, > (void(*)(void *))clk_unregister_mux, > drivers/mmc/host/meson-mx-sdhc-mmc.c:791: ret = > devm_add_action_or_reset(dev, (void(*)(void *))mmc_free_host, > drivers/pci/controller/pcie-microchip-host.c:866: > devm_add_action_or_reset(dev, (void (*) (void > *))clk_disable_unprepare, Thanks, I will take a look as a background task. Let me know if there is any urgency on your side. ...