public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: Fix typo in `struct usb_host_interface' comment
@ 2015-01-15  3:52 Chris Rorvick
  2015-01-15 11:03 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Rorvick @ 2015-01-15  3:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Chris Rorvick

The descriptor member `bNumEndpoints' is plural.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
---
 include/linux/usb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/usb.h b/include/linux/usb.h
index f89c24a..4add566 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -82,7 +82,7 @@ struct usb_host_interface {
 	int extralen;
 	unsigned char *extra;   /* Extra descriptors */
 
-	/* array of desc.bNumEndpoint endpoints associated with this
+	/* array of desc.bNumEndpoints endpoints associated with this
 	 * interface setting.  these will be in no particular order.
 	 */
 	struct usb_host_endpoint *endpoint;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: Fix typo in `struct usb_host_interface' comment
  2015-01-15  3:52 [PATCH] usb: Fix typo in `struct usb_host_interface' comment Chris Rorvick
@ 2015-01-15 11:03 ` Oliver Neukum
  2015-01-15 12:54   ` Chris Rorvick
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2015-01-15 11:03 UTC (permalink / raw)
  To: Chris Rorvick; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On Wed, 2015-01-14 at 21:52 -0600, Chris Rorvick wrote:
> The descriptor member `bNumEndpoints' is plural.

I am afraid that is not a good idea. The name of a
member of a structure mentioned in the specification should
appear as it is used in the specification.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: Fix typo in `struct usb_host_interface' comment
  2015-01-15 11:03 ` Oliver Neukum
@ 2015-01-15 12:54   ` Chris Rorvick
  2015-01-15 23:47     ` Chris Rorvick
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Rorvick @ 2015-01-15 12:54 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On Thu, Jan 15, 2015 at 5:03 AM, Oliver Neukum <oneukum@suse.de> wrote:
> On Wed, 2015-01-14 at 21:52 -0600, Chris Rorvick wrote:
>> The descriptor member `bNumEndpoints' is plural.
>
> I am afraid that is not a good idea. The name of a
> member of a structure mentioned in the specification should
> appear as it is used in the specification.

Where is it not plural in the specification?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: Fix typo in `struct usb_host_interface' comment
  2015-01-15 12:54   ` Chris Rorvick
@ 2015-01-15 23:47     ` Chris Rorvick
  2015-01-16  8:10       ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Rorvick @ 2015-01-15 23:47 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On Thu, Jan 15, 2015 at 6:54 AM, Chris Rorvick <chris@rorvick.com> wrote:
> On Thu, Jan 15, 2015 at 5:03 AM, Oliver Neukum <oneukum@suse.de> wrote:
>> On Wed, 2015-01-14 at 21:52 -0600, Chris Rorvick wrote:
>>> The descriptor member `bNumEndpoints' is plural.
>>
>> I am afraid that is not a good idea. The name of a
>> member of a structure mentioned in the specification should
>> appear as it is used in the specification.
>
> Where is it not plural in the specification?

I think understand your comment now so I will respond more specifically:
This is a typo precisely because `bNumEndpoint' is not consistent with
the specification, nor is it consistent with the definition of `struct
usb_interface_descriptor'.  The specification and the structure both use
`bNumEndpoints'.

Fixing this has utility because `struct usb_interface_descriptor' is not
defined in <linux/usb.h>.  So, if corrected, the code for determining
the number of endpoints is readily available to anyone looking at
`struct usb_host_interface' without tracking down the uapi header.

Mentioning that the descriptor member/field is plural was just an
attempt to make it easy to see what changed.

Regards,

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] usb: Fix typo in `struct usb_host_interface' comment
  2015-01-15 23:47     ` Chris Rorvick
@ 2015-01-16  8:10       ` Oliver Neukum
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Neukum @ 2015-01-16  8:10 UTC (permalink / raw)
  To: Chris Rorvick; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On Thu, 2015-01-15 at 17:47 -0600, Chris Rorvick wrote:
> I think understand your comment now so I will respond more
> specifically:
> This is a typo precisely because `bNumEndpoint' is not consistent with
> the specification, nor is it consistent with the definition of `struct
> usb_interface_descriptor'.  The specification and the structure both
> use
> `bNumEndpoints'.

Sorry, I stand corrected. The patch is good.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-16  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15  3:52 [PATCH] usb: Fix typo in `struct usb_host_interface' comment Chris Rorvick
2015-01-15 11:03 ` Oliver Neukum
2015-01-15 12:54   ` Chris Rorvick
2015-01-15 23:47     ` Chris Rorvick
2015-01-16  8:10       ` Oliver Neukum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox