Re: [PATCHv5 2/4] wiegand: add Wiegand bus driver

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

 



On Thu, Aug 24, 2023 at 02:53:13PM +0200, Martin Zaťovič wrote:
> On Thu, Aug 24, 2023 at 01:40:35PM +0200, Greg KH wrote:
> > On Thu, Aug 24, 2023 at 01:10:13PM +0200, Martin Zaťovič wrote:
> > > +static inline void wiegand_controller_put(void *ptr)
> > 
> > Why is this a void *?  It should be "struct wiegand_controller *"
> 
> It is a void* because it is being passed to devm_add_action_or_reset()
> and this function only accepts a pointer to a function that accepts a void*
> parameter. I am not sure if there is a way around it.

Why is this passed to that function?  This feels odd, I'll look at it
again when you send your next version, but this is not a normal "put"
type of call at all to have.

And inline functions can't be passed as parameters (well they can, but
then they are no longer an inline function...)

thanks,

greg k-h



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux