Commit 4aac0a8d authored by Suman Anna's avatar Suman Anna Committed by Hari Kanigeri

SYSLINK: ipc - removed gt_traces in remaining IPC modules

This patch cleans up the gt_trace code in the rest of the
IPC modules. printks are added instead in the IPC driver
code. The gt.h header file is no longer included in any
IPC source files. This patch has also fixed couple of
checkpatch warnings in sharedregion module.
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent e101ec0e
......@@ -27,7 +27,6 @@
#include <linux/cdev.h>
#include <linux/uaccess.h>
#include <gt.h>
#include <ipc_ioctl.h>
#include <nameserver.h>
......@@ -69,7 +68,6 @@ int ipc_open(struct inode *inode, struct file *filp)
s32 retval = 0;
struct ipc_device *dev;
gt_0trace(ipcdrv_trace, GT_ENTER, " <- driver_open\n");
dev = container_of(inode->i_cdev, struct ipc_device, cdev);
filp->private_data = dev;
return retval;
......@@ -82,7 +80,6 @@ int ipc_open(struct inode *inode, struct file *filp)
*/
int ipc_release(struct inode *inode, struct file *filp)
{
gt_0trace(ipcdrv_trace, GT_ENTER, "-> driver_release\n");
return 0;
}
......@@ -96,8 +93,6 @@ int ipc_ioctl(struct inode *ip, struct file *filp, u32 cmd, ulong arg)
s32 retval = 0;
void __user *argp = (void __user *)arg;
gt_0trace(ipcdrv_trace, GT_ENTER, " -> driver_ioctl\n");
/* Verify the memory and ensure that it is not is kernel
address space
*/
......@@ -167,15 +162,14 @@ static int __init ipc_init(void)
}
if (retval < 0) {
gt_1trace(ipcdrv_trace, GT_7CLASS, "ipc_init: "
"can't get major %x \n", ipc_major);
printk(KERN_ERR "ipc_init: can't get major %x \n", ipc_major);
goto exit;
}
ipc_device = kmalloc(sizeof(struct ipc_device), GFP_KERNEL);
if (!ipc_device) {
gt_0trace(ipcdrv_trace, GT_7CLASS,
"memory allocation failed for ipc_device \n");
printk(KERN_ERR "ipc_init: memory allocation failed for "
"ipc_device \n");
retval = -ENOMEM;
goto unreg_exit;
}
......@@ -183,16 +177,14 @@ static int __init ipc_init(void)
memset(ipc_device, 0, sizeof(struct ipc_device));
retval = ipc_modules_init();
if (retval) {
gt_0trace(ipcdrv_trace, GT_7CLASS,
"ipc initialization failed \n");
printk(KERN_ERR "ipc_init: ipc initialization failed \n");
goto unreg_exit;
}
/* TO DO : NEED TO LOOK IN TO THIS */
ipc_class = class_create(THIS_MODULE, "syslink_ipc");
if (IS_ERR(ipc_class)) {
gt_0trace(ipcdrv_trace, GT_7CLASS,
"error creating ipc class \n");
printk(KERN_ERR "ipc_init: error creating ipc class \n");
retval = PTR_ERR(ipc_class);
goto unreg_exit;
}
......@@ -203,8 +195,7 @@ static int __init ipc_init(void)
ipc_device->cdev.owner = THIS_MODULE;
retval = cdev_add(&ipc_device->cdev, dev, IPC_DEVICES);
if (retval) {
gt_0trace(ipcdrv_trace, GT_7CLASS,
"Failed to add the ipc device \n");
printk(KERN_ERR "ipc_init: failed to add the ipc device \n");
goto class_exit;
}
return retval;
......@@ -230,7 +221,6 @@ static void __exit ipc_exit(void)
{
dev_t devno;
gt_0trace(ipcdrv_trace, GT_ENTER, "-> driver_exit\n");
ipc_modules_exit();
devno = MKDEV(ipc_major, ipc_minor);
if (ipc_device) {
......@@ -250,4 +240,3 @@ static void __exit ipc_exit(void)
*/
module_init(ipc_init);
module_exit(ipc_exit);
......@@ -18,7 +18,6 @@
#include <linux/uaccess.h>
#include <gt.h>
#include <ipc_ioctl.h>
#include <multiproc_ioctl.h>
#include <nameserver_ioctl.h>
......@@ -43,10 +42,6 @@ int ipc_ioc_router(u32 cmd, ulong arg)
s32 retval = 0;
u32 ioc_nr = _IOC_NR(cmd);
gt_4trace(ipcdrv_trace, GT_ENTER, "ipc_ioc_router \n"
"cmd: %x, ioc_nr: %x(%d), arg: %x\n", cmd, ioc_nr, ioc_nr,
(unsigned int) arg);
if (ioc_nr >= MULTIPROC_BASE_CMD && ioc_nr <= MULTIPROC_END_CMD)
retval = multiproc_ioctl(NULL, NULL, cmd, arg);
else if (ioc_nr >= NAMESERVER_BASE_CMD &&
......
......@@ -22,7 +22,6 @@
#include <linux/slab.h>
#include <linux/semaphore.h>
#include <gt.h>
#include <gate_remote.h>
#include <gatepeterson.h>
#include <nameserver.h>
......
......@@ -22,7 +22,6 @@
#include <linux/slab.h>
#include <syslink/atomic_linux.h>
#include <gt.h>
#include <multiproc.h>
#include <nameserver.h>
#include <sharedregion.h>
......@@ -250,7 +249,7 @@ int sharedregion_add(u32 index, void *base, u32 len)
+ i);
if (entry->is_valid) {
/* Handle duplicate entry */
if((base == entry->base) && (len == entry->len)) {
if ((base == entry->base) && (len == entry->len)) {
same = true;
break;
}
......@@ -276,7 +275,7 @@ int sharedregion_add(u32 index, void *base, u32 len)
if (overlap) {
/* FHACK: FIX ME */
retval =1;
retval = 1;
goto mem_overlap_error;
}
......
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