Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4e0b3a43
Commit
4e0b3a43
authored
Nov 10, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: fix up endian issues found by sparse in io_edgeport.c driver
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
adddb9fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_edgeport.c
+1
-1
drivers/usb/serial/io_fw_boot.h
drivers/usb/serial/io_fw_boot.h
+3
-3
drivers/usb/serial/io_fw_boot2.h
drivers/usb/serial/io_fw_boot2.h
+3
-3
drivers/usb/serial/io_fw_down.h
drivers/usb/serial/io_fw_down.h
+3
-3
drivers/usb/serial/io_fw_down2.h
drivers/usb/serial/io_fw_down2.h
+3
-3
No files found.
drivers/usb/serial/io_edgeport.c
View file @
4e0b3a43
...
@@ -2917,7 +2917,7 @@ static void load_application_firmware (struct edgeport_serial *edge_serial)
...
@@ -2917,7 +2917,7 @@ static void load_application_firmware (struct edgeport_serial *edge_serial)
record
=
(
struct
edge_firmware_image_record
*
)
firmware
;
record
=
(
struct
edge_firmware_image_record
*
)
firmware
;
response
=
sram_write
(
edge_serial
->
serial
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
),
&
record
->
Data
[
0
]);
response
=
sram_write
(
edge_serial
->
serial
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
),
&
record
->
Data
[
0
]);
if
(
response
<
0
)
{
if
(
response
<
0
)
{
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"sram_write failed (%x, %x, %d)
\n
"
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
record
->
Len
);
dev_err
(
&
edge_serial
->
serial
->
dev
->
dev
,
"sram_write failed (%x, %x, %d)
\n
"
,
le16_to_cpu
(
record
->
ExtAddr
),
le16_to_cpu
(
record
->
Addr
),
le16_to_cpu
(
record
->
Len
)
);
break
;
break
;
}
}
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
le16_to_cpu
(
record
->
Len
);
firmware
+=
sizeof
(
struct
edge_firmware_image_record
)
+
le16_to_cpu
(
record
->
Len
);
...
...
drivers/usb/serial/io_fw_boot.h
View file @
4e0b3a43
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
struct
edge_firmware_image_record
{
struct
edge_firmware_image_record
{
unsigned
short
ExtAddr
;
__le16
ExtAddr
;
unsigned
short
Addr
;
__le16
Addr
;
unsigned
short
Len
;
__le16
Len
;
unsigned
char
Data
[
0
];
unsigned
char
Data
[
0
];
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
...
drivers/usb/serial/io_fw_boot2.h
View file @
4e0b3a43
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
struct
edge_firmware_image_record
{
struct
edge_firmware_image_record
{
unsigned
short
ExtAddr
;
__le16
ExtAddr
;
unsigned
short
Addr
;
__le16
Addr
;
unsigned
short
Len
;
__le16
Len
;
unsigned
char
Data
[
0
];
unsigned
char
Data
[
0
];
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
...
drivers/usb/serial/io_fw_down.h
View file @
4e0b3a43
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
struct
edge_firmware_image_record
{
struct
edge_firmware_image_record
{
unsigned
short
ExtAddr
;
__le16
ExtAddr
;
unsigned
short
Addr
;
__le16
Addr
;
unsigned
short
Len
;
__le16
Len
;
unsigned
char
Data
[
0
];
unsigned
char
Data
[
0
];
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
...
drivers/usb/serial/io_fw_down2.h
View file @
4e0b3a43
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
struct
edge_firmware_image_record
{
struct
edge_firmware_image_record
{
unsigned
short
ExtAddr
;
__le16
ExtAddr
;
unsigned
short
Addr
;
__le16
Addr
;
unsigned
short
Len
;
__le16
Len
;
unsigned
char
Data
[
0
];
unsigned
char
Data
[
0
];
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment