public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: Wolfram Sang <wsa@kernel.org>,
	Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>,
	Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	linux-i2c@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type
Date: Thu, 11 May 2023 16:20:17 +0200	[thread overview]
Message-ID: <20230511142017.hpk2nhvqwhunbvbm@intel.intel> (raw)
In-Reply-To: <20230510-i2c-mchp-pci1xxxx-function-cast-v1-1-3ba4459114c4@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 <horms@kernel.org>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Andi

  parent reply	other threads:[~2023-05-11 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 12:32 [PATCH] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Simon Horman
2023-05-11  7:32 ` Horatiu Vultur
2023-05-11 14:20 ` Andi Shyti [this message]
2023-05-17  9:43 ` Tharunkumar.Pasumarthi
2023-06-05  8:44 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230511142017.hpk2nhvqwhunbvbm@intel.intel \
    --to=andi.shyti@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=horms@kernel.org \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=tharunkumar.pasumarthi@microchip.com \
    --cc=trix@redhat.com \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox