Skip to content

Commit

Permalink
Staging: otus : checkpatch.pl cleanup for some more .c files
Browse files Browse the repository at this point in the history
Second lot of checkpatch.pl error and warning fixes for .c files of
otus driver in staging tree.
(Externs would be removed in a seperate patch)

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mithlesh Thukral authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent b767fa1 commit 2bef7a0
Show file tree
Hide file tree
Showing 7 changed files with 502 additions and 510 deletions.
35 changes: 17 additions & 18 deletions drivers/staging/otus/usbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ extern u8_t zfLnxCreateThread(zdev_t *dev);

/* Definition of Wireless Extension */

//wireless extension helper functions
/* wireless extension helper functions */
extern int usbdrv_ioctl_setessid(struct net_device *dev, struct iw_point *erq);
extern int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq);
/* Wireless Extension Handler functions */
Expand Down Expand Up @@ -282,8 +282,8 @@ static struct iw_handler_def p80211wext_handler_def = {
};

/* WDS */
//struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
//void zfInitWdsStruct(void);
/* struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER]; */
/* void zfInitWdsStruct(void); */

/* VAP */
struct zsVapStruct vap[ZM_VAP_PORT_NUMBER];
Expand Down Expand Up @@ -314,13 +314,11 @@ irqreturn_t usbdrv_intr(int irq, void *dev_inst, struct pt_regs *regs)
return IRQ_NONE;

/* the device is closed, don't continue or else bad things may happen. */
if (!netif_running(dev)) {
if (!netif_running(dev))
return IRQ_NONE;
}

if (macp->driver_isolated) {
if (macp->driver_isolated)
return IRQ_NONE;
}

#if (WLAN_HOSTIF == WLAN_PCI)
//zfiIsrPci(dev);
Expand All @@ -340,9 +338,11 @@ int usbdrv_open(struct net_device *dev)

printk("Enter open()\n");

//#ifndef CONFIG_SMP
// read_lock(&(macp->isolate_lock));
//#endif
/*
* #ifndef CONFIG_SMP
* read_lock(&(macp->isolate_lock));
* #endif
*/
if (macp->driver_isolated) {
rc = -EBUSY;
goto exit;
Expand Down Expand Up @@ -393,11 +393,11 @@ int usbdrv_open(struct net_device *dev)
dev->dev_addr[4] = addr[4];
dev->dev_addr[5] = addr[5];
#endif
//zfwMacAddressNotify() will be called to setup dev->dev_addr[]
/* zfwMacAddressNotify() will be called to setup dev->dev_addr[] */

zfLnxCreateThread(dev);

mod_timer(&(macp->hbTimer10ms), jiffies + (1*HZ)/100); //10 ms
mod_timer(&(macp->hbTimer10ms), jiffies + (1*HZ)/100); /* 10 ms */

netif_carrier_on(dev);

Expand Down Expand Up @@ -425,15 +425,15 @@ int usbdrv_open(struct net_device *dev)

#if ZM_SHARE_AUTH == 1
zfiWlanSetAuthenticationMode(dev, 1);
#endif //#if ZM_SHARE_AUTH == 1
#endif //#if ZM_WEP_MOME == 1
#endif /* #if ZM_SHARE_AUTH == 1 */
#endif /* #if ZM_WEP_MOME == 1 */

#elif ZM_PIBSS_MODE == 1
zfiWlanSetWlanMode(dev, ZM_MODE_PSEUDO);
#else
zfiWlanSetWlanMode(dev, ZM_MODE_INFRASTRUCTURE);
#endif
//zfiWlanSetChannel(dev, ZM_CHANNEL, FALSE);
/* zfiWlanSetChannel(dev, ZM_CHANNEL, FALSE); */
zfiWlanSetFrequency(dev, 2462000, FALSE);
zfiWlanSetRtsThreshold(dev, 32767);
zfiWlanSetFragThreshold(dev, 0);
Expand Down Expand Up @@ -720,7 +720,7 @@ void zfLnxInitVapStruct(void)
{
u16_t i;

for (i=0; i<ZM_VAP_PORT_NUMBER; i++)
for (i = 0; i < ZM_VAP_PORT_NUMBER; i++)
{
vap[i].dev = NULL;
vap[i].openFlag = 0;
Expand Down Expand Up @@ -1128,8 +1128,7 @@ u8_t zfLnxClearStructs(struct net_device *dev)

printk(KERN_ERR "TxQCnt: %d\n", TxQCnt);

for(ii = 0; ii < TxQCnt; ii++)
{
for (ii = 0; ii < TxQCnt; ii++) {
UsbTxQ_t *TxQ = zfLnxGetUsbTxBuffer(dev);

printk(KERN_ERR "dev_kfree_skb_any\n");
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/otus/wrap_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@


/* Called to allocate buffer, must return a continue buffer space */
zbuf_t* zfwBufAllocate(zdev_t* dev, u16_t len)
zbuf_t *zfwBufAllocate(zdev_t *dev, u16_t len)
{
zbuf_t* buf;
zbuf_t *buf;

/* Allocate SKB for packet*/
buf = dev_alloc_skb(len);
Expand All @@ -46,15 +46,15 @@ zbuf_t* zfwBufAllocate(zdev_t* dev, u16_t len)


/* Called to free buffer, replace below 3 functions */
void zfwBufFree(zdev_t* dev, zbuf_t* buf, u16_t status)
void zfwBufFree(zdev_t *dev, zbuf_t *buf, u16_t status)
{
dev_kfree_skb_any(buf);
}

/* Called to adjust buffer size and head pointer */
u16_t zfwBufRemoveHead(zdev_t* dev, zbuf_t* buf, u16_t size)
u16_t zfwBufRemoveHead(zdev_t *dev, zbuf_t *buf, u16_t size)
{
//zm_assert(buf->len > size);
/* zm_assert(buf->len > size); */

buf->data += size;
buf->len -= size;
Expand All @@ -68,7 +68,7 @@ u16_t zfwBufRemoveHead(zdev_t* dev, zbuf_t* buf, u16_t size)
/* Used to chain Rx buffer to form a frame. if the prepared Rx buffer */
/* is greater than an ethernet frame(1518+32 byte), then this function */
/* will only be called with head=NULL. */
u16_t zfwBufChain(zdev_t* dev, zbuf_t** head, zbuf_t* tail)
u16_t zfwBufChain(zdev_t *dev, zbuf_t **head, zbuf_t *tail)
{

*head = tail;
Expand All @@ -77,7 +77,7 @@ u16_t zfwBufChain(zdev_t* dev, zbuf_t** head, zbuf_t* tail)


/* Called when doing infra-bss forwarding */
u16_t zfwBufCopy(zdev_t* dev, zbuf_t* dst, zbuf_t* src)
u16_t zfwBufCopy(zdev_t *dev, zbuf_t *dst, zbuf_t *src)
{
memcpy(dst->data, src->data, src->len);
dst->tail = dst->data;
Expand All @@ -87,7 +87,7 @@ u16_t zfwBufCopy(zdev_t* dev, zbuf_t* dst, zbuf_t* src)


/* Called to adjust buffer size and tail pointer */
u16_t zfwBufSetSize(zdev_t* dev, zbuf_t* buf, u16_t size)
u16_t zfwBufSetSize(zdev_t *dev, zbuf_t *buf, u16_t size)
{
#ifdef NET_SKBUFF_DATA_USES_OFFSET
buf->tail = 0;
Expand All @@ -101,11 +101,11 @@ u16_t zfwBufSetSize(zdev_t* dev, zbuf_t* buf, u16_t size)
return 0;
}

u16_t zfwBufGetSize(zdev_t* dev, zbuf_t* buf)
u16_t zfwBufGetSize(zdev_t *dev, zbuf_t *buf)
{
return buf->len;
}

void zfwCopyBufContext(zdev_t* dev, zbuf_t* source, zbuf_t* dst)
void zfwCopyBufContext(zdev_t *dev, zbuf_t *source, zbuf_t *dst)
{
}
Loading

0 comments on commit 2bef7a0

Please sign in to comment.