rtl8188eu: Fix checkpatch errors in include/*.h - part 1

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-08-13 21:01:38 -05:00
parent f9d86b986b
commit 9dd1827027
45 changed files with 4057 additions and 4114 deletions

View file

@ -33,22 +33,31 @@ enum{
VENDOR_WRITE = 0x00,
VENDOR_READ = 0x01,
};
#define ALIGNMENT_UNIT 16
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
#define ALIGNMENT_UNIT 16
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
value, index, data, size, timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
(index), (data), (size), (timeout_ms))
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), (timeout_ms))
usb_bulk_msg((usb_dev), (pipe), (data), (len), \
(actual_length), (timeout_ms))
#else
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size,timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), \
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
value, index, data, size,timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), \
(value), (index), (data), (size), \
((timeout_ms) == 0) || \
((timeout_ms)*HZ/1000 > 0) ? \
((timeout_ms)*HZ/1000) : 1)
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
actual_length, timeout_ms) \
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
((timeout_ms) == 0) | |((timeout_ms)*HZ/1000 > 0) ?\
((timeout_ms)*HZ/1000) : 1)
#endif
#include <usb_ops_linux.h>
@ -58,19 +67,20 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops);
#define usb_set_intf_ops rtl8188eu_set_intf_ops
/*
* Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR
* @return true:
* @return false:
*/
* Increase and check if the continual_urb_error of this @param dvobjprivei
* is larger than MAX_CONTINUAL_URB_ERR
* @return true:
* @return false:
*/
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
{
int ret = false;
int value;
if ( (value=ATOMIC_INC_RETURN(&dvobj->continual_urb_error)) > MAX_CONTINUAL_URB_ERR) {
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", dvobj, value, MAX_CONTINUAL_URB_ERR);
value = ATOMIC_INC_RETURN(&dvobj->continual_urb_error);
if (value > MAX_CONTINUAL_URB_ERR) {
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n",
dvobj, value, MAX_CONTINUAL_URB_ERR);
ret = true;
} else {
/* DBG_88E("[dvobj:%p] continual_urb_error:%d\n", dvobj, value); */
}
return ret;
}
@ -86,17 +96,19 @@ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
#define USB_HIGH_SPEED_BULK_SIZE 512
#define USB_FULL_SPEED_BULK_SIZE 64
static inline u8 rtw_usb_bulk_size_boundary(struct adapter * padapter,int buf_len)
static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
int buf_len)
{
u8 rst = true;
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
if (pdvobjpriv->ishighspeed == true)
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE)?true:false;
if (pdvobjpriv->ishighspeed)
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
true : false;
else
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE)?true:false;
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
true : false;
return rst;
}
#endif /* __USB_OPS_H_ */