Re: [PATCH v1 2/8] PCI: microchip: Remove cast warning for devm_add_action_or_reset() arg

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

 



[+CC Simon]

Hello,

> 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.

This is a nice change, but it seems it has been carried along a few other
series and through their different revisions.  Simon also found the problem
and addressed it independently per:

  https://lore.kernel.org/linux-pci/20230511-pci-microchip-clk-cast-v1-1-7674f4d4e218@xxxxxxxxxx

However, we have a few other drivers where we could take care of this, per:

drivers/pci/controller/pcie-microchip-host.c
864-		return ERR_PTR(ret);
865-
866:	devm_add_action_or_reset(dev, (void (*) (void *))clk_disable_unprepare,
867-				 clk);
868-

drivers/pci/controller/dwc/pcie-keembay.c
170-
171-	ret = devm_add_action_or_reset(dev,
172:				       (void(*)(void *))clk_disable_unprepare,
173-				       clk);
174-	if (ret)

drivers/pci/controller/dwc/pci-meson.c
189-
190-	devm_add_action_or_reset(dev,
191:				 (void (*) (void *))clk_disable_unprepare,
192-				 clk);
193-

If neither you nor Simon has objections, I can send a small series to
address these in a single take.  You could then drop this particular patch
from v2 of this series, should you send a second revision at some point.

Thoughts?

	Krzysztof



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux