Re: can: ucan: Use usb_endpoint_type() rather than duplicating its implementation

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

 



> A real quick search shows me that this ucan driver is not an isolated case.
> Here is an example:
> 
> https://elixir.bootlin.com/linux/v6.16-rc3/source/drivers/media/rc/imon.c#L2137-L2148

Thanks that you pointed another implementation detail out from
the function “imon_find_endpoints”.


> But it does not seem to occur so often either. So not sure what is the best:
> do a manual hunt

Unlikely.

I am unsure if such an aspect would become relevant for a code review
by other contributors.


>                  or write a coccinelle checker.

I would find it more convenient to achieve corresponding adjustments
to some degree with the help of such a development tool.
I constructed scripts for the semantic patch language accordingly.


>> Can the functions “usb_endpoint_is_bulk_in” and “usb_endpoint_is_bulk_out”
>> be applied here?
>> https://elixir.bootlin.com/linux/v6.16-rc3/source/include/uapi/linux/usb/ch9.h#L572-L595
> 
> Further simplification, nice :)
> 
> I didn't see that last one, so glad you found what seems to be the optimal solution!
I am unsure if the check reordering would be desirable for this function implementation.

Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux