From: Alan Stern <stern@rowland.harvard.edu>
To: Macpaul Lin <macpaul.lin@mediatek.com>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, Jim Lin <jilin@nvidia.com>,
Siqi Lin <siqilin@google.com>,
Mediatek WSD Upstream <wsd_upstream@mediatek.com>,
Macpaul Lin <macpaul.lin@gmail.com>
Subject: Re: [PATCH] usb: replace hardcoded maximum usb string length by definition
Date: Fri, 12 Jun 2020 10:02:11 -0400 [thread overview]
Message-ID: <20200612140211.GA12639@rowland.harvard.edu> (raw)
In-Reply-To: <1591939967-29943-1-git-send-email-macpaul.lin@mediatek.com>
On Fri, Jun 12, 2020 at 01:32:47PM +0800, Macpaul Lin wrote:
> Replace hardcoded maximum usb string length (126 bytes) by definition
> "MAX_USB_STRING_LEN".
>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
...
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 9f3c721..df4a9cb 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -1815,6 +1815,8 @@ static inline int usb_get_ptm_status(struct usb_device *dev, void *data)
> 0, data);
> }
>
> +/* USB String descriptors can contain at most 126 characters. */
> +#define MAX_USB_STRING_LEN 126
This definition belongs in include/uapi/linux/usb/ch9.h (near the
definition of struct usb_string_descriptor) because it is part of the USB
standard rather than specific to the Linux USB stack.
Alan Stern
next prev parent reply other threads:[~2020-06-12 14:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 5:32 Macpaul Lin
2020-06-12 14:02 ` Alan Stern [this message]
2020-06-15 6:17 ` [PATCH v2] usb: replace hardcode " Macpaul Lin
2020-06-15 14:42 ` Alan Stern
2020-06-18 8:20 ` Greg Kroah-Hartman
2020-06-18 9:13 ` [PATCH v3] " Macpaul Lin
2020-06-18 14:02 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200612140211.GA12639@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jilin@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=macpaul.lin@gmail.com \
--cc=macpaul.lin@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=siqilin@google.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®