On Mon, Oct 09, 2023 at 04:29:48PM -0500, dean@xxxxxxxxxxxx wrote: > > > static int ffs_func_revmap_ep(struct ffs_function *func, u8 num) > > > { > > > - num = func->eps_revmap[num & USB_ENDPOINT_NUMBER_MASK]; > > > + u8 addr = ((num & USB_ENDPOINT_DIR_MASK) >> 3) > > > + | (num & USB_ENDPOINT_NUMBER_MASK); > > > + num = func->eps_revmap[addr]; > > > > That's messy, again, 2 arrays would make this much simpler I think? > > It's similar to the approach in composite.c. v6.6-rc4, line 1013, but yes 2 > arrays would be simpler. > > BTW, should composite.c at least get rid of the magic numbers? > > composite.c commit 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa > line: 1013 > > addr = ((ep->bEndpointAddress & 0x80) >> 3) > | (ep->bEndpointAddress & 0x0f); Yes, it should. thanks, greg k-h