From mboxrd@z Thu Jan 1 00:00:00 1970 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 65424C7EE22 for ; Thu, 11 May 2023 14:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237754AbjEKOUZ (ORCPT ); Thu, 11 May 2023 10:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237639AbjEKOUY (ORCPT ); Thu, 11 May 2023 10:20:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D64793A97 for ; Thu, 11 May 2023 07:20: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 5600660B55 for ; Thu, 11 May 2023 14:20:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59739C433EF; Thu, 11 May 2023 14:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683814820; bh=29n/WbUV/CBlXBENjt8Dcr/hpVsTv1R4VybM0pyh9FY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K9Y0ch0dqrhg+5501UrmKl0wxgP+J8SDeXfMZL/h7TAbPxrIILqPUNRn+/tvmuQAC L1oOS7NYMezUej7Q6ja/j2lh5ZCYQz+WvYG5PgOkmTx3Doj3E4ufvilKQX9I0WIgd7 uCcK+bfLnfrRmRkeuZoVJiKP2DXmKNja8w7UNC6RW9DZGJ7ItV265OEXJ3q9iLW2q/ +Bpuq/U34TsLuxAOaXp0+m9ytwQyLLBzoHuMQazXwMTtMoKAZi1gwtuieh6UJYNk+3 1zBanv93+h7gaYdaugtxVqYblKopk7mA/AVArSB0O6T79ikC1DlRp8nQHboF7bXFrq o5tWHJJ+Eyg4A== Date: Thu, 11 May 2023 16:20:17 +0200 From: Andi Shyti To: Simon Horman Cc: Wolfram Sang , Tharun Kumar P , Kumaravel Thiagarajan , Microchip Linux Driver Support , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-i2c@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Message-ID: <20230511142017.hpk2nhvqwhunbvbm@intel.intel> References: <20230510-i2c-mchp-pci1xxxx-function-cast-v1-1-3ba4459114c4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230510-i2c-mchp-pci1xxxx-function-cast-v1-1-3ba4459114c4@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Hi Simon, On Wed, May 10, 2023 at 02:32:17PM +0200, Simon Horman wrote: > Rather than casting pci1xxxx_i2c_shutdown to an incompatible function type, > update the type to match that expected by __devm_add_action. > > Reported by clang-16 with W-1: > > .../i2c-mchp-pci1xxxx.c:1159:29: error: cast from 'void (*)(struct pci1xxxx_i2c *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ./include/linux/device.h:251:29: note: expanded from macro 'devm_add_action' > __devm_add_action(release, action, data, #action) > ^~~~~~ > > No functional change intended. > Compile tested only. > > Signed-off-by: Simon Horman Reviewed-by: Andi Shyti Andi