* [PATCH 3.14-stable] usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration
@ 2014-09-05 19:04 Karol Lewandowski
2014-09-05 19:58 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Karol Lewandowski @ 2014-09-05 19:04 UTC (permalink / raw)
To: linux-kernel
Cc: lmctlx, Karol Lewandowski, Michal Nazarewicz, Felipe Balbi,
Greg Kroah-Hartman, stable
Applicable for 3.14-stable only.
This commit drops duplicate declaration of struct usb_functionfs_descs_head
erronousely added in commit 28c5980b54 ("usb: gadget: f_fs: resurect
usb_functionfs_descs_head structure").
Fix from 28c5980b54 is applicable only for v3.15-rc1 and newer kernels.
This fixes error in uapi:
/src/linux$ make -C tools usb
make: Entering directory '/src/linux/tools'
DESCEND usb
make[1]: Entering directory '/src/linux/tools/usb'
gcc -Wall -Wextra -g -I../include -o testusb testusb.c -lpthread
gcc -Wall -Wextra -g -I../include -o ffs-test ffs-test.c -lpthread
In file included from ffs-test.c:41:0:
../../include/uapi/linux/usb/functionfs.h:42:8: error: redefinition of ‘struct usb_functionfs_descs_head’
struct usb_functionfs_descs_head {
^
../../include/uapi/linux/usb/functionfs.h:31:8: note: originally defined here
struct usb_functionfs_descs_head {
^
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
---
include/uapi/linux/usb/functionfs.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 29e9c7a..f279394 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -27,24 +27,18 @@ struct usb_endpoint_descriptor_no_audio {
__u8 bInterval;
} __attribute__((packed));
-/* Legacy format, deprecated as of 3.14. */
-struct usb_functionfs_descs_head {
- __le32 magic;
- __le32 length;
- __le32 fs_count;
- __le32 hs_count;
-} __attribute__((packed, deprecated));
/*
* All numbers must be in little endian order.
*/
+/* Legacy format, deprecated as of 3.14. */
struct usb_functionfs_descs_head {
__le32 magic;
__le32 length;
__le32 fs_count;
__le32 hs_count;
-} __attribute__((packed));
+} __attribute__((packed, deprecated));
/*
* Descriptors format:
--
2.0.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 3.14-stable] usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration
2014-09-05 19:04 [PATCH 3.14-stable] usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration Karol Lewandowski
@ 2014-09-05 19:58 ` Greg Kroah-Hartman
2014-09-06 11:00 ` Karol Lewandowski
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-09-05 19:58 UTC (permalink / raw)
To: Karol Lewandowski
Cc: linux-kernel, lmctlx, Michal Nazarewicz, Felipe Balbi, stable
On Fri, Sep 05, 2014 at 09:04:44PM +0200, Karol Lewandowski wrote:
> Applicable for 3.14-stable only.
>
> This commit drops duplicate declaration of struct usb_functionfs_descs_head
> erronousely added in commit 28c5980b54 ("usb: gadget: f_fs: resurect
> usb_functionfs_descs_head structure").
>
> Fix from 28c5980b54 is applicable only for v3.15-rc1 and newer kernels.
>
> This fixes error in uapi:
>
> /src/linux$ make -C tools usb
>
> make: Entering directory '/src/linux/tools'
> DESCEND usb
> make[1]: Entering directory '/src/linux/tools/usb'
> gcc -Wall -Wextra -g -I../include -o testusb testusb.c -lpthread
> gcc -Wall -Wextra -g -I../include -o ffs-test ffs-test.c -lpthread
> In file included from ffs-test.c:41:0:
> ../../include/uapi/linux/usb/functionfs.h:42:8: error: redefinition of ‘struct usb_functionfs_descs_head’
> struct usb_functionfs_descs_head {
> ^
> ../../include/uapi/linux/usb/functionfs.h:31:8: note: originally defined here
> struct usb_functionfs_descs_head {
> ^
>
> Cc: Michal Nazarewicz <mina86@mina86.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: stable@vger.kernel.org
> Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
> ---
> include/uapi/linux/usb/functionfs.h | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
> index 29e9c7a..f279394 100644
> --- a/include/uapi/linux/usb/functionfs.h
> +++ b/include/uapi/linux/usb/functionfs.h
> @@ -27,24 +27,18 @@ struct usb_endpoint_descriptor_no_audio {
> __u8 bInterval;
> } __attribute__((packed));
>
> -/* Legacy format, deprecated as of 3.14. */
> -struct usb_functionfs_descs_head {
> - __le32 magic;
> - __le32 length;
> - __le32 fs_count;
> - __le32 hs_count;
> -} __attribute__((packed, deprecated));
>
> /*
> * All numbers must be in little endian order.
> */
>
> +/* Legacy format, deprecated as of 3.14. */
> struct usb_functionfs_descs_head {
> __le32 magic;
> __le32 length;
> __le32 fs_count;
> __le32 hs_count;
> -} __attribute__((packed));
> +} __attribute__((packed, deprecated));
>
> /*
> * Descriptors format:
> --
> 2.0.1
Ah, well, instead I should just revert
28c5980b5494b8163d6cba5a5007b6ec7e63de66 as it shouldn't have gone to
3.14-stable, right? I'll do that for the next round of stable releases
after this one.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 3.14-stable] usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration
2014-09-05 19:58 ` Greg Kroah-Hartman
@ 2014-09-06 11:00 ` Karol Lewandowski
0 siblings, 0 replies; 3+ messages in thread
From: Karol Lewandowski @ 2014-09-06 11:00 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Karol Lewandowski, linux-kernel, Michal Nazarewicz, Felipe Balbi,
stable
On Fri, Sep 05, 2014 at 12:58:53PM -0700, Greg Kroah-Hartman wrote:
OP here.
> On Fri, Sep 05, 2014 at 09:04:44PM +0200, Karol Lewandowski wrote:
> > Applicable for 3.14-stable only.
> >
> > This commit drops duplicate declaration of struct usb_functionfs_descs_head
> > erronousely added in commit 28c5980b54 ("usb: gadget: f_fs: resurect
> > usb_functionfs_descs_head structure").
> >
> > Fix from 28c5980b54 is applicable only for v3.15-rc1 and newer kernels.
> >
> > This fixes error in uapi:
> >
> > /src/linux$ make -C tools usb
> >
> > make: Entering directory '/src/linux/tools'
> > DESCEND usb
> > make[1]: Entering directory '/src/linux/tools/usb'
> > gcc -Wall -Wextra -g -I../include -o testusb testusb.c -lpthread
> > gcc -Wall -Wextra -g -I../include -o ffs-test ffs-test.c -lpthread
> > In file included from ffs-test.c:41:0:
> > ../../include/uapi/linux/usb/functionfs.h:42:8: error: redefinition of ‘struct usb_functionfs_descs_head’
> > struct usb_functionfs_descs_head {
> > ^
> > ../../include/uapi/linux/usb/functionfs.h:31:8: note: originally defined here
> > struct usb_functionfs_descs_head {
> > ^
> >
> > Cc: Michal Nazarewicz <mina86@mina86.com>
> > Cc: Felipe Balbi <balbi@ti.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
> > ---
> > include/uapi/linux/usb/functionfs.h | 10 ++--------
> > 1 file changed, 2 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
> > index 29e9c7a..f279394 100644
> > --- a/include/uapi/linux/usb/functionfs.h
> > +++ b/include/uapi/linux/usb/functionfs.h
> > @@ -27,24 +27,18 @@ struct usb_endpoint_descriptor_no_audio {
> > __u8 bInterval;
> > } __attribute__((packed));
> >
> > -/* Legacy format, deprecated as of 3.14. */
> > -struct usb_functionfs_descs_head {
> > - __le32 magic;
> > - __le32 length;
> > - __le32 fs_count;
> > - __le32 hs_count;
> > -} __attribute__((packed, deprecated));
> >
> > /*
> > * All numbers must be in little endian order.
> > */
> >
> > +/* Legacy format, deprecated as of 3.14. */
> > struct usb_functionfs_descs_head {
> > __le32 magic;
> > __le32 length;
> > __le32 fs_count;
> > __le32 hs_count;
> > -} __attribute__((packed));
> > +} __attribute__((packed, deprecated));
> >
> > /*
> > * Descriptors format:
> > --
> > 2.0.1
>
> Ah, well, instead I should just revert
> 28c5980b5494b8163d6cba5a5007b6ec7e63de66 as it shouldn't have gone to
> 3.14-stable, right? I'll do that for the next round of stable releases
> after this one.
Yes. Revert would certainly be ok and this is what I did first. However,
we would miss 'deprecated' attribute that was added in original patch.
This, and the fact that every new kernel has a note that it's deprecated
from 3.14 convinced me to do a bit more than revert.
Cheers,
Karol Lewandowski
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-06 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 19:04 [PATCH 3.14-stable] usb: gadget: f_fs: drop duplicate usb_functionfs_descs_head declaration Karol Lewandowski
2014-09-05 19:58 ` Greg Kroah-Hartman
2014-09-06 11:00 ` Karol Lewandowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).