From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Temerkhanov Date: Wed, 1 Apr 2015 17:18:44 +0300 Subject: [U-Boot] [PATCH 1/3] usb: Convert protocol header structures to use explicitly sized variables In-Reply-To: <1427897926-2739-1-git-send-email-s.temerkhanov@gmail.com> References: <1427897926-2739-1-git-send-email-s.temerkhanov@gmail.com> Message-ID: <1427897926-2739-2-git-send-email-s.temerkhanov@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This patch converts USB protocol headers to use explicitly sized fields like the rest of the code Signed-off-by: Radha Mohan Chintakuntla Signed-off-by: Sergey Temerkhanov --- include/usb.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/usb.h b/include/usb.h index a8fee0b..2c3d506 100644 --- a/include/usb.h +++ b/include/usb.h @@ -45,20 +45,20 @@ /* device request (setup) */ struct devrequest { - unsigned char requesttype; - unsigned char request; - unsigned short value; - unsigned short index; - unsigned short length; + __u8 requesttype; + __u8 request; + __le16 value; + __le16 index; + __le16 length; } __attribute__ ((packed)); /* Interface */ struct usb_interface { struct usb_interface_descriptor desc; - unsigned char no_of_ep; - unsigned char num_altsetting; - unsigned char act_altsetting; + __u8 no_of_ep; + __u8 num_altsetting; + __u8 act_altsetting; struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS]; /* @@ -73,7 +73,7 @@ struct usb_interface { struct usb_config { struct usb_config_descriptor desc; - unsigned char no_of_if; /* number of interfaces */ + __u8 no_of_if; /* number of interfaces */ struct usb_interface if_desc[USB_MAXINTERFACES]; } __attribute__ ((packed)); -- 2.3.3