[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cc46642-e13a-49d6-8280-9ed378dd2e62@wanadoo.fr>
Date: Wed, 25 Jun 2025 08:03:09 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Markus Elfring <Markus.Elfring@....de>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org,
Chen Ni <nichen@...as.ac.cn>, Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can@...r.kernel.org
Subject: Re: [PATCH] can: ucan: Use usb_endpoint_type() rather than
duplicating its implementation
On 25/06/2025 at 04:21, Markus Elfring wrote:
>>> +++ b/drivers/net/can/usb/ucan.c
>>> @@ -1353,16 +1353,14 @@ static int ucan_probe(struct usb_interface *intf,
>>> ep = &iface_desc->endpoint[i].desc;
>>>
>>> if (((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != 0) &&
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> This is:
>>
>> usb_endpoint_dir_in(ep)
>
> Can the check for a single value like “USB_DIR_IN” be really mapped to
> an other value range?
> https://elixir.bootlin.com/linux/v6.16-rc3/source/include/uapi/linux/usb/ch9.h#L495-L503
Look at the actual values of USB_ENDPOINT_DIR_MASK and USB_DIR_IN ;)
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists