Re: [PATCH v2 1/3] tools: ffs-aio-example: fix header values endianess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 25 2014, Robert Baldyga <r.baldyga@xxxxxxxxxxx> wrote:
> We wrap numeric values of fs_count and hs_count fields in htole32,
> because they should be in little-endian format.
>
> Signed-off-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

> ---
>  tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c | 4 ++--
>  tools/usb/ffs-aio-example/simple/device_app/aio_simple.c       | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
> index 87216a0..a349a87 100644
> --- a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
> +++ b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
> @@ -37,8 +37,8 @@ static const struct {
>  	.header = {
>  		.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
>  		.length = htole32(sizeof(descriptors)),
> -		.fs_count = 3,
> -		.hs_count = 3,
> +		.fs_count = htole32(3),
> +		.hs_count = htole32(3),
>  	},
>  	.fs_descs = {
>  		.intf = {
> diff --git a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
> index f558664..28c22cb 100644
> --- a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
> +++ b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
> @@ -35,8 +35,8 @@ static const struct {
>  	.header = {
>  		.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
>  		.length = htole32(sizeof(descriptors)),
> -		.fs_count = 3,
> -		.hs_count = 3,
> +		.fs_count = htole32(3),
> +		.hs_count = htole32(3),
>  	},
>  	.fs_descs = {
>  		.intf = {
> -- 
> 1.9.1
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux