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