Commit b767fa1d authored by Mithlesh Thukral's avatar Mithlesh Thukral Committed by Greg Kroah-Hartman

Staging: otus : checkpatch.pl cleanup for .c files

First patch for checkpatch.pl error and warning fixes for .c files of otus
driver in staging tree.
Signed-off-by: default avatarMithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dba0da37
This diff is collapsed.
......@@ -29,70 +29,67 @@
#include <linux/netlink.h>
#include <net/iw_handler.h>
void zfwDumpBuf(zdev_t* dev, zbuf_t* buf)
void zfwDumpBuf(zdev_t *dev, zbuf_t *buf)
{
u16_t i;
for (i=0; i<buf->len; i++)
{
printk("%02x ", *(((u8_t*)buf->data)+i));
if ((i&0xf)==0xf)
{
printk("\n");
}
}
printk("\n");
u16_t i;
for (i = 0; i < buf->len; i++) {
printk(KERN_DEBUG "%02x ", *(((u8_t *)buf->data)+i));
if ((i & 0xf) == 0xf)
printk(KERN_DEBUG "\n");
}
printk(KERN_DEBUG "\n");
}
void zfwDbgReadRegDone(zdev_t* dev, u32_t addr, u32_t val)
void zfwDbgReadRegDone(zdev_t *dev, u32_t addr, u32_t val)
{
printk("Read addr:%x = %x\n", addr, val);
printk(KERN_DEBUG "Read addr:%x = %x\n", addr, val);
}
void zfwDbgWriteRegDone(zdev_t* dev, u32_t addr, u32_t val)
void zfwDbgWriteRegDone(zdev_t *dev, u32_t addr, u32_t val)
{
printk("Write addr:%x = %x\n", addr, val);
printk(KERN_DEBUG "Write addr:%x = %x\n", addr, val);
}
void zfwDbgReadTallyDone(zdev_t* dev)
void zfwDbgReadTallyDone(zdev_t *dev)
{
//printk("Read Tall Done\n");
/* printk(KERN_DEBUG "Read Tall Done\n"); */
}
void zfwDbgWriteEepromDone(zdev_t* dev, u32_t addr, u32_t val)
void zfwDbgWriteEepromDone(zdev_t *dev, u32_t addr, u32_t val)
{
}
void zfwDbgQueryHwTxBusyDone(zdev_t* dev, u32_t val)
void zfwDbgQueryHwTxBusyDone(zdev_t *dev, u32_t val)
{
}
//For Evl ++
void zfwDbgReadFlashDone(zdev_t* dev, u32_t addr, u32_t* rspdata, u32_t datalen)
/* For Evl ++ */
void zfwDbgReadFlashDone(zdev_t *dev, u32_t addr, u32_t *rspdata, u32_t datalen)
{
printk("Read Flash addr:%x length:%x\n", addr, datalen);
printk(KERN_DEBUG "Read Flash addr:%x length:%x\n", addr, datalen);
}
void zfwDbgProgrameFlashDone(zdev_t* dev)
void zfwDbgProgrameFlashDone(zdev_t *dev)
{
printk("Program Flash Done\n");
printk(KERN_DEBUG "Program Flash Done\n");
}
void zfwDbgProgrameFlashChkDone(zdev_t* dev)
void zfwDbgProgrameFlashChkDone(zdev_t *dev)
{
printk("Program Flash Done\n");
printk(KERN_DEBUG "Program Flash Done\n");
}
void zfwDbgGetFlashChkSumDone(zdev_t* dev, u32_t* rspdata)
void zfwDbgGetFlashChkSumDone(zdev_t *dev, u32_t *rspdata)
{
printk("Get Flash ChkSum Done\n");
printk(KERN_DEBUG "Get Flash ChkSum Done\n");
}
void zfwDbgDownloadFwInitDone(zdev_t* dev)
void zfwDbgDownloadFwInitDone(zdev_t *dev)
{
printk("Download FW Init Done\n");
printk(KERN_DEBUG "Download FW Init Done\n");
}
//For Evl --
/* For Evl -- */
/* Leave an empty line below to remove warning message on some compiler */
......@@ -30,69 +30,75 @@
#include <net/iw_handler.h>
/* Memory management */
/* Called to allocate uncached memory, allocated memory must */
/* in 4-byte boundary */
void* zfwMemAllocate(zdev_t* dev, u32_t size)
/* Called to allocate uncached memory, allocated memory must */
/* in 4-byte boundary */
void *zfwMemAllocate(zdev_t *dev, u32_t size)
{
void* mem = NULL;
mem = kmalloc(size, GFP_ATOMIC);
return mem;
void *mem = NULL;
mem = kmalloc(size, GFP_ATOMIC);
return mem;
}
/* Called to free allocated memory */
void zfwMemFree(zdev_t* dev, void* mem, u32_t size)
void zfwMemFree(zdev_t *dev, void *mem, u32_t size)
{
kfree(mem);
return;
kfree(mem);
return;
}
void zfwMemoryCopy(u8_t* dst, u8_t* src, u16_t length)
void zfwMemoryCopy(u8_t *dst, u8_t *src, u16_t length)
{
//u16_t i;
/* u16_t i; */
memcpy(dst, src, length);
//for(i=0; i<length; i++)
//{
// dst[i] = src[i];
//}
return;
memcpy(dst, src, length);
/*
* for(i=0; i<length; i++)
* {
* dst[i] = src[i];
* }
*/
return;
}
void zfwZeroMemory(u8_t* va, u16_t length)
void zfwZeroMemory(u8_t *va, u16_t length)
{
//u16_t i;
memset(va, 0, length);
//for(i=0; i<length; i++)
//{
// va[i] = 0;
//}
return;
/* u16_t i; */
memset(va, 0, length);
/*
* for(i=0; i<length; i++)
* {
* va[i] = 0;
* }
*/
return;
}
void zfwMemoryMove(u8_t* dst, u8_t* src, u16_t length)
void zfwMemoryMove(u8_t *dst, u8_t *src, u16_t length)
{
memcpy(dst, src, length);
return;
memcpy(dst, src, length);
return;
}
u8_t zfwMemoryIsEqual(u8_t* m1, u8_t* m2, u16_t length)
u8_t zfwMemoryIsEqual(u8_t *m1, u8_t *m2, u16_t length)
{
//u16_t i;
int ret;
/* u16_t i; */
int ret;
ret = memcmp(m1, m2, length);
ret = memcmp(m1, m2, length);
return ((ret==0)?TRUE:FALSE);
//for(i=0; i<length; i++)
//{
// if ( m1[i] != m2[i] )
// {
// return FALSE;
// }
//}
//return TRUE;
return ((ret == 0) ? TRUE : FALSE);
/*
* for(i=0; i<length; i++)
*{
* if ( m1[i] != m2[i] )
* {
* return FALSE;
* }
*}
*
* return TRUE;
*/
}
/* Leave an empty line below to remove warning message on some compiler */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment