Commit e03e1e39 authored by Masaru Nomura's avatar Masaru Nomura Committed by Greg Kroah-Hartman

staging: unisys: visorutil: Add a blank line

Add a blank line after declarations to meet kernel coding style.
Signed-off-by: default avatarMasaru Nomura <massa.nomura@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c79d8451
...@@ -41,6 +41,7 @@ CHARQUEUE *visor_charqueue_create(ulong nslots) ...@@ -41,6 +41,7 @@ CHARQUEUE *visor_charqueue_create(ulong nslots)
{ {
int alloc_size = sizeof(CHARQUEUE) + nslots + 1; int alloc_size = sizeof(CHARQUEUE) + nslots + 1;
CHARQUEUE *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); CHARQUEUE *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY);
if (cq == NULL) { if (cq == NULL) {
ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)",
alloc_size); alloc_size);
...@@ -75,6 +76,7 @@ EXPORT_SYMBOL_GPL(visor_charqueue_enqueue); ...@@ -75,6 +76,7 @@ EXPORT_SYMBOL_GPL(visor_charqueue_enqueue);
BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue) BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue)
{ {
BOOL b; BOOL b;
spin_lock(&charqueue->lock); spin_lock(&charqueue->lock);
b = IS_EMPTY(charqueue); b = IS_EMPTY(charqueue);
spin_unlock(&charqueue->lock); spin_unlock(&charqueue->lock);
......
...@@ -61,6 +61,7 @@ static struct proc_dir_entry * ...@@ -61,6 +61,7 @@ static struct proc_dir_entry *
createProcDir(char *name, struct proc_dir_entry *parent) createProcDir(char *name, struct proc_dir_entry *parent)
{ {
struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent); struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent);
if (p == NULL) if (p == NULL)
ERRDRV("failed to create /proc directory %s", name); ERRDRV("failed to create /proc directory %s", name);
return p; return p;
...@@ -196,6 +197,7 @@ void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver, ...@@ -196,6 +197,7 @@ void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver,
{ {
if ((pdriver->ProcDeviceDir != NULL) && (p->procDevicexDir == NULL)) { if ((pdriver->ProcDeviceDir != NULL) && (p->procDevicexDir == NULL)) {
char s[29]; char s[29];
sprintf(s, "%d", devno); sprintf(s, "%d", devno);
p->procDevicexDir = createProcDir(s, pdriver->ProcDeviceDir); p->procDevicexDir = createProcDir(s, pdriver->ProcDeviceDir);
p->devno = devno; p->devno = devno;
...@@ -267,6 +269,7 @@ void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, ...@@ -267,6 +269,7 @@ void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
struct easyproc_device_info *p, int devno) struct easyproc_device_info *p, int devno)
{ {
size_t i; size_t i;
for (i = 0; i < ARRAY_SIZE(p->device_property_info); i++) { for (i = 0; i < ARRAY_SIZE(p->device_property_info); i++) {
if (p->device_property_info[i].procEntry != NULL) { if (p->device_property_info[i].procEntry != NULL) {
struct easyproc_device_property_info *px = struct easyproc_device_property_info *px =
...@@ -281,6 +284,7 @@ void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, ...@@ -281,6 +284,7 @@ void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
} }
if (p->procDevicexDir != NULL) { if (p->procDevicexDir != NULL) {
char s[29]; char s[29];
sprintf(s, "%d", devno); sprintf(s, "%d", devno);
remove_proc_entry(s, pdriver->ProcDeviceDir); remove_proc_entry(s, pdriver->ProcDeviceDir);
p->procDevicexDir = NULL; p->procDevicexDir = NULL;
...@@ -334,6 +338,7 @@ static ssize_t proc_write_driver(struct file *file, const char __user *buffer, ...@@ -334,6 +338,7 @@ static ssize_t proc_write_driver(struct file *file, const char __user *buffer,
struct seq_file *seq = (struct seq_file *)file->private_data; struct seq_file *seq = (struct seq_file *)file->private_data;
struct easyproc_driver_info *p = NULL; struct easyproc_driver_info *p = NULL;
char local_buf[256]; char local_buf[256];
if (seq == NULL) if (seq == NULL)
return 0; return 0;
p = (struct easyproc_driver_info *)(seq->private); p = (struct easyproc_driver_info *)(seq->private);
...@@ -356,6 +361,7 @@ static ssize_t proc_write_device(struct file *file, const char __user *buffer, ...@@ -356,6 +361,7 @@ static ssize_t proc_write_device(struct file *file, const char __user *buffer,
struct seq_file *seq = (struct seq_file *)file->private_data; struct seq_file *seq = (struct seq_file *)file->private_data;
struct easyproc_device_info *p = NULL; struct easyproc_device_info *p = NULL;
char local_buf[256]; char local_buf[256];
if (seq == NULL) if (seq == NULL)
return 0; return 0;
p = (struct easyproc_device_info *)(seq->private); p = (struct easyproc_device_info *)(seq->private);
......
...@@ -92,6 +92,7 @@ EXPORT_SYMBOL_GPL(visor_periodic_work_destroy); ...@@ -92,6 +92,7 @@ EXPORT_SYMBOL_GPL(visor_periodic_work_destroy);
BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work) BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work)
{ {
BOOL rc = FALSE; BOOL rc = FALSE;
write_lock(&periodic_work->lock); write_lock(&periodic_work->lock);
if (periodic_work->want_to_stop) { if (periodic_work->want_to_stop) {
periodic_work->is_scheduled = FALSE; periodic_work->is_scheduled = FALSE;
......
...@@ -95,6 +95,7 @@ static struct proc_dir_entry * ...@@ -95,6 +95,7 @@ static struct proc_dir_entry *
createProcDir(const char *name, struct proc_dir_entry *parent) createProcDir(const char *name, struct proc_dir_entry *parent)
{ {
struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent); struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent);
if (p == NULL) if (p == NULL)
ERRDRV("failed to create /proc directory %s", name); ERRDRV("failed to create /proc directory %s", name);
return p; return p;
...@@ -197,9 +198,11 @@ void visor_proc_DestroyType(MYPROCTYPE *type) ...@@ -197,9 +198,11 @@ void visor_proc_DestroyType(MYPROCTYPE *type)
return; return;
if (type->procDirs != NULL) { if (type->procDirs != NULL) {
int i = type->nNames-1; int i = type->nNames-1;
while (i >= 0) { while (i >= 0) {
if (type->procDirs[i] != NULL) { if (type->procDirs[i] != NULL) {
struct proc_dir_entry *parent = NULL; struct proc_dir_entry *parent = NULL;
if (i == 0) if (i == 0)
parent = type->procDirRoot; parent = type->procDirRoot;
else else
...@@ -299,6 +302,7 @@ EXPORT_SYMBOL_GPL(visor_proc_CreateObject); ...@@ -299,6 +302,7 @@ EXPORT_SYMBOL_GPL(visor_proc_CreateObject);
void visor_proc_DestroyObject(MYPROCOBJECT *obj) void visor_proc_DestroyObject(MYPROCOBJECT *obj)
{ {
MYPROCTYPE *type = NULL; MYPROCTYPE *type = NULL;
if (obj == NULL) if (obj == NULL)
return; return;
type = obj->type; type = obj->type;
...@@ -306,6 +310,7 @@ void visor_proc_DestroyObject(MYPROCOBJECT *obj) ...@@ -306,6 +310,7 @@ void visor_proc_DestroyObject(MYPROCOBJECT *obj)
return; return;
if (obj->procDirProperties != NULL) { if (obj->procDirProperties != NULL) {
int i = 0; int i = 0;
for (i = 0; i < type->nProperties; i++) { for (i = 0; i < type->nProperties; i++) {
if (obj->procDirProperties[i] != NULL) { if (obj->procDirProperties[i] != NULL) {
remove_proc_entry(type->propertyNames[i], remove_proc_entry(type->propertyNames[i],
...@@ -338,6 +343,7 @@ EXPORT_SYMBOL_GPL(visor_proc_DestroyObject); ...@@ -338,6 +343,7 @@ EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
static int seq_show(struct seq_file *seq, void *offset) static int seq_show(struct seq_file *seq, void *offset)
{ {
PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private); PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private);
if (ctx == NULL) { if (ctx == NULL) {
ERRDRV("I don't have a freakin' clue..."); ERRDRV("I don't have a freakin' clue...");
return 0; return 0;
......
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