Patch "i2c: mchp-pci1xxxx: Avoid cast to incompatible function type" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i2c: mchp-pci1xxxx: Avoid cast to incompatible function type

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i2c-mchp-pci1xxxx-avoid-cast-to-incompatible-functio.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c7e7021f6b03c463e363757c0a6dc47158f79985
Author: Simon Horman <horms@xxxxxxxxxx>
Date:   Wed May 10 14:32:17 2023 +0200

    i2c: mchp-pci1xxxx: Avoid cast to incompatible function type
    
    [ Upstream commit 7ebfd881abe9e0ea9557b29dab6aa28d294fabb4 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
    Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxx>
    Reviewed-by: Tharun Kumar P<tharunkumar.pasumarthi@xxxxxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
index b21ffd6df9276..5ef136c3ecb12 100644
--- a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+++ b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
@@ -1118,8 +1118,10 @@ static int pci1xxxx_i2c_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend,
 			 pci1xxxx_i2c_resume);
 
-static void pci1xxxx_i2c_shutdown(struct pci1xxxx_i2c *i2c)
+static void pci1xxxx_i2c_shutdown(void *data)
 {
+	struct pci1xxxx_i2c *i2c = data;
+
 	pci1xxxx_i2c_config_padctrl(i2c, false);
 	pci1xxxx_i2c_configure_core_reg(i2c, false);
 }
@@ -1156,7 +1158,7 @@ static int pci1xxxx_i2c_probe_pci(struct pci_dev *pdev,
 	init_completion(&i2c->i2c_xfer_done);
 	pci1xxxx_i2c_init(i2c);
 
-	ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
+	ret = devm_add_action(dev, pci1xxxx_i2c_shutdown, i2c);
 	if (ret)
 		return ret;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux