All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-23 17:51 Graham Williams
  2013-08-23 18:21 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-23 17:51 UTC (permalink / raw)
  To: linux-usb, linux-kernel; +Cc: balbi


The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams <gwilli@broadcom.com>
---
drivers/usb/gadget/f_acm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
        [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
        [ACM_DATA_IDX].s = "CDC ACM Data",
        [ACM_IAD_IDX ].s = "CDC Serial",
+       {  } /* end of list */
};

static struct usb_gadget_strings acm_string_table = {
--
1.8.0.1



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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-23 17:51 [PATCH] usb: acm gadget: Null termintate strings table Graham Williams
@ 2013-08-23 18:21 ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2013-08-23 18:21 UTC (permalink / raw)
  To: Graham Williams; +Cc: linux-usb, linux-kernel, balbi

On Fri, Aug 23, 2013 at 05:51:12PM +0000, Graham Williams wrote:
> 
> The gadget strings table should be null terminated.
> usb_gadget_get_string() loops through the table
> expecting a null at the end of the list.
> 
> Signed-off-by: Graham Williams <gwilli@broadcom.com>

Nice, that works.

> ---
> drivers/usb/gadget/f_acm.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
> index 4b7e33e..ab1065a 100644
> --- a/drivers/usb/gadget/f_acm.c
> +++ b/drivers/usb/gadget/f_acm.c
> @@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
>         [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
>         [ACM_DATA_IDX].s = "CDC ACM Data",
>         [ACM_IAD_IDX ].s = "CDC Serial",
> +       {  } /* end of list */

But this doesn't at all :(

Please fix your email client to not convert tabs to spaces.  Email the
patch to yourself and see if you can apply it properly first.  Also, the
kernel file, Documentation/email_clients.txt will help in setting things
up properly.

thanks,

greg k-h

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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-28 23:36 Graham Williams
@ 2013-08-30 18:11 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2013-08-30 18:11 UTC (permalink / raw)
  To: Graham Williams; +Cc: Felipe Balbi, linux-usb, linux-kernel

On Wed, Aug 28, 2013 at 04:36:14PM -0700, Graham Williams wrote:
> The gadget strings table should be null terminated.
> usb_gadget_get_string() loops through the table
> expecting a null at the end of the list.
> 
> Signed-off-by: Graham Williams <gwilli@broadcom.com>

Yeah, this finally worked!  :)

Thanks for sticking with it, much appreciated.  I've now applied this.

greg k-h

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

* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-28 23:36 Graham Williams
  2013-08-30 18:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-28 23:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi; +Cc: Graham Williams, linux-usb, linux-kernel

The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams <gwilli@broadcom.com>
---
 drivers/usb/gadget/f_acm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
 	[ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
 	[ACM_DATA_IDX].s = "CDC ACM Data",
 	[ACM_IAD_IDX ].s = "CDC Serial",
+	{  } /* end of list */
 };
 
 static struct usb_gadget_strings acm_string_table = {
-- 
1.8.0.1



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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-22 19:10 Graham Williams
@ 2013-08-27 20:03 ` Felipe Balbi
  0 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2013-08-27 20:03 UTC (permalink / raw)
  To: Graham Williams; +Cc: linux-usb, linux-kernel, balbi

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

Hi,

On Thu, Aug 22, 2013 at 07:10:04PM +0000, Graham Williams wrote:
> The gadget strings table should be null terminated.
> usb_gadget_get_string() loops through the table
> expecting a null at the end of the list.
> 
> Signed-off-by: Graham <gwilli@broadcom.com>

complains about being a malformed patch.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-23 23:19 Graham Williams
@ 2013-08-23 23:36 ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2013-08-23 23:36 UTC (permalink / raw)
  To: Graham Williams; +Cc: linux-usb, linux-kernel, balbi

On Fri, Aug 23, 2013 at 11:19:55PM +0000, Graham Williams wrote:
> I couldn't get the whitespace formatting correctly from Windows Office (work email) so I attached the patch file.  I ran it on it applies correctly.


I can't take attachments, and especially not base64 ones :(

Take a look at the file I pointed you at in the Documentation directory
for how to set up other email clients to work.  Lots of other Broadcom
developers have this working properly for their work emails, so perhaps
you should contact them and ask what the magic incantantation is.

thanks,

greg k-h

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

* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-23 23:19 Graham Williams
  2013-08-23 23:36 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-23 23:19 UTC (permalink / raw)
  To: linux-usb, linux-kernel; +Cc: balbi

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

I couldn't get the whitespace formatting correctly from Windows Office (work email) so I attached the patch file.  I ran it on it applies correctly.

[-- Attachment #2: 0001-usb-acm-gadget-Null-termintate-strings-table.patch --]
[-- Type: application/octet-stream, Size: 944 bytes --]

From f6fcaba8944897d1275f2d63f3973c625becea2c Mon Sep 17 00:00:00 2001
From: Graham Williams <gwilli@broadcom.com>
Date: Mon, 19 Aug 2013 14:00:17 -0700
Subject: [PATCH] usb: acm gadget: Null termintate strings table

The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams <gwilli@broadcom.com>
---
 drivers/usb/gadget/f_acm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
 	[ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
 	[ACM_DATA_IDX].s = "CDC ACM Data",
 	[ACM_IAD_IDX ].s = "CDC Serial",
+	{  } /* end of list */
 };
 
 static struct usb_gadget_strings acm_string_table = {
-- 
1.8.0.1


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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-23 17:43 Graham Williams
@ 2013-08-23 17:49 ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2013-08-23 17:49 UTC (permalink / raw)
  To: Graham Williams; +Cc: linux-usb, linux-kernel, balbi

On Fri, Aug 23, 2013 at 05:43:51PM +0000, Graham Williams wrote:
> 
> The gadget strings table should be null terminated.
> usb_gadget_get_string() loops through the table
> expecting a null at the end of the list.
> 
> Signed-off-by: Graham Williams<gwilli@broadcom.com>

Minor nit, you need a space after your last name and before the '<'.

Third time's a charm?

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

* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-23 17:43 Graham Williams
  2013-08-23 17:49 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-23 17:43 UTC (permalink / raw)
  To: linux-usb, linux-kernel; +Cc: balbi


The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham Williams<gwilli@broadcom.com>
---
drivers/usb/gadget/f_acm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
        [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
        [ACM_DATA_IDX].s = "CDC ACM Data",
        [ACM_IAD_IDX ].s = "CDC Serial",
+       {  } /* end of list */
};

static struct usb_gadget_strings acm_string_table = {
--
1.8.0.1



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

* Re: [PATCH] usb: acm gadget: Null termintate strings table
  2013-08-20 15:17 Graham Williams
@ 2013-08-23 17:41 ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2013-08-23 17:41 UTC (permalink / raw)
  To: Graham Williams; +Cc: linux-usb, linux-kernel

On Tue, Aug 20, 2013 at 03:17:37PM +0000, Graham Williams wrote:
> The gadget strings table should be null terminated.
> usb_gadget_get_string() loops through the table
> expecting a null at the end of the list.
> 
> Signed-off-by: Graham <gwilli@broadcom.com>

I need a full name for a signed-off-by: line, can you please resend this
with this fixed?

thanks,

greg k-h

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

* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-22 19:10 Graham Williams
  2013-08-27 20:03 ` Felipe Balbi
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-22 19:10 UTC (permalink / raw)
  To: linux-usb, linux-kernel; +Cc: balbi

The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham <gwilli@broadcom.com>
---
drivers/usb/gadget/f_acm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
        [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
        [ACM_DATA_IDX].s = "CDC ACM Data",
        [ACM_IAD_IDX ].s = "CDC Serial",
+       {  } /* end of list */
};

static struct usb_gadget_strings acm_string_table = {
--
1.8.0.1



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

* [PATCH] usb: acm gadget: Null termintate strings table
@ 2013-08-20 15:17 Graham Williams
  2013-08-23 17:41 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Graham Williams @ 2013-08-20 15:17 UTC (permalink / raw)
  To: linux-usb, linux-kernel

The gadget strings table should be null terminated.
usb_gadget_get_string() loops through the table
expecting a null at the end of the list.

Signed-off-by: Graham <gwilli@broadcom.com>
---
 drivers/usb/gadget/f_acm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 4b7e33e..ab1065a 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
        [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
        [ACM_DATA_IDX].s = "CDC ACM Data",
        [ACM_IAD_IDX ].s = "CDC Serial",
+       {  } /* end of list */
 };

 static struct usb_gadget_strings acm_string_table = {
--
1.8.0.1


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

end of thread, other threads:[~2013-08-30 18:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 17:51 [PATCH] usb: acm gadget: Null termintate strings table Graham Williams
2013-08-23 18:21 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2013-08-28 23:36 Graham Williams
2013-08-30 18:11 ` Greg Kroah-Hartman
2013-08-23 23:19 Graham Williams
2013-08-23 23:36 ` Greg KH
2013-08-23 17:43 Graham Williams
2013-08-23 17:49 ` Greg KH
2013-08-22 19:10 Graham Williams
2013-08-27 20:03 ` Felipe Balbi
2013-08-20 15:17 Graham Williams
2013-08-23 17:41 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.