[PATCH] Infrastructure to un-/lock vts in vt_ioctl.c

2015-03-26 Thread Simone Weiss
Makes it possible to lock and unlock specific VTs.
When someone tries to switch to a locked vt, he gets redirected to VT 12.

We added the three cases VT_LOCK, VT_UNLOCK and VT_IS_LOCKED to vt_ioctl().
To indicate if a VT is locked we also added a flag to the struct vc_data.

VT_LOCK: allows the owner of a sppecified VT to set the lock flag.
VT_UNLOCK: allows caller with root permissions to reset the lock flag
VT_ISLOCKED: returns the value of the lock flag

If anyone tries to switch to a locked VT he gets redirected to VT 12
in complete_change_console.

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
The implementation of the lock functionality in the kernel provides advantages
which are hard to realize in userspace programms.
Situation right now:
Screensavers that are implemented as userspace programs can die (for example
by segfault) and give unauthorized users access.
Our implementation makes it possiple to lock single VTs witchout having to
change existing userspace programms.
It makes it possiple to add a Secure acess Key later on.

Regards
Simone Weiss and Helene Gsaenger

 drivers/tty/vt/vt_ioctl.c  | 101 -
 include/linux/console_struct.h |   1 +
 include/uapi/linux/vt.h|   3 ++
 3 files changed, 104 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 3e3b092..e1f6b5c 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -1039,6 +1039,101 @@ int vt_ioctl(struct tty_struct *tty,
case VT_WAITEVENT:
ret = vt_event_wait_ioctl((struct vt_event __user *)arg);
break;
+   case VT_LOCK:
+   {
+   struct tty_struct *target;
+
+   if (arg > MAX_NR_CONSOLES)
+   return -ENXIO;
+
+   /* Locking vt12 is fobidden*/
+   if (arg == 12)
+   return -EPERM;
+
+   /* redirect to vt12 after locking current vt */
+   if ((vc_cons[fg_console].d->vc_num == arg-1) || arg == 0) {
+   console_lock();
+   vc->vc_locked = 1;
+   console_unlock();
+   ret = vt_ioctl(tty, VT_ACTIVATE, 12);
+   break;
+   }
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out;
+   }
+
+   /* check if caller = owner or root */
+   if (!uid_eq(current_uid(), GLOBAL_ROOT_UID)) {
+   target = vc_cons[arg].d->port.tty;
+   spin_lock(_files_lock);
+   if (!list_empty(>tty_files)) {
+   struct tty_file_private *file_priv;
+   struct file *file;
+
+   file_priv = list_first_entry(>tty_files,
+struct 
tty_file_private,
+list);
+   file = file_priv->file;
+   if (!uid_eq(current_uid(),
+   file->f_inode->i_uid)) {
+   spin_unlock(_files_lock);
+   return -EPERM;
+   }
+   }
+   spin_unlock(_files_lock);
+   }
+
+   /* lock target */
+   console_lock();
+   if (vc_cons[arg].d->vc_locked == 1) {
+   console_unlock();
+   return -EACCES;
+   }
+   vc_cons[arg].d->vc_locked = 1;
+   console_unlock();
+   break;
+   }
+
+   case VT_UNLOCK:
+   if (arg > MAX_NR_CONSOLES || arg == 0)
+   return -ENXIO;
+
+   /* only root can unlock vts */
+   if (!uid_eq(current_uid(), GLOBAL_ROOT_UID))
+   return -EPERM;
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out;
+   }
+
+   /* unlock target */
+   console_lock();
+   vc_cons[arg].d->vc_locked = 0;
+   console_unlock();
+   break;
+   case VT_IS_LOCKED:
+   if (arg > MAX_NR_CONSOLES || arg == 0)
+   return -ENXIO;
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out;
+   }
+
+

[PATCH] Infrastructure to un-/lock vts in vt_ioctl.c

2015-03-26 Thread Simone Weiss
Makes it possible to lock and unlock specific VTs.
When someone tries to switch to a locked vt, he gets redirected to VT 12.

We added the three cases VT_LOCK, VT_UNLOCK and VT_IS_LOCKED to vt_ioctl().
To indicate if a VT is locked we also added a flag to the struct vc_data.

VT_LOCK: allows the owner of a sppecified VT to set the lock flag.
VT_UNLOCK: allows caller with root permissions to reset the lock flag
VT_ISLOCKED: returns the value of the lock flag

If anyone tries to switch to a locked VT he gets redirected to VT 12
in complete_change_console.

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
The implementation of the lock functionality in the kernel provides advantages
which are hard to realize in userspace programms.
Situation right now:
Screensavers that are implemented as userspace programs can die (for example
by segfault) and give unauthorized users access.
Our implementation makes it possiple to lock single VTs witchout having to
change existing userspace programms.
It makes it possiple to add a Secure acess Key later on.

Regards
Simone Weiss and Helene Gsaenger

 drivers/tty/vt/vt_ioctl.c  | 101 -
 include/linux/console_struct.h |   1 +
 include/uapi/linux/vt.h|   3 ++
 3 files changed, 104 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 3e3b092..e1f6b5c 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -1039,6 +1039,101 @@ int vt_ioctl(struct tty_struct *tty,
case VT_WAITEVENT:
ret = vt_event_wait_ioctl((struct vt_event __user *)arg);
break;
+   case VT_LOCK:
+   {
+   struct tty_struct *target;
+
+   if (arg  MAX_NR_CONSOLES)
+   return -ENXIO;
+
+   /* Locking vt12 is fobidden*/
+   if (arg == 12)
+   return -EPERM;
+
+   /* redirect to vt12 after locking current vt */
+   if ((vc_cons[fg_console].d-vc_num == arg-1) || arg == 0) {
+   console_lock();
+   vc-vc_locked = 1;
+   console_unlock();
+   ret = vt_ioctl(tty, VT_ACTIVATE, 12);
+   break;
+   }
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out;
+   }
+
+   /* check if caller = owner or root */
+   if (!uid_eq(current_uid(), GLOBAL_ROOT_UID)) {
+   target = vc_cons[arg].d-port.tty;
+   spin_lock(tty_files_lock);
+   if (!list_empty(target-tty_files)) {
+   struct tty_file_private *file_priv;
+   struct file *file;
+
+   file_priv = list_first_entry(target-tty_files,
+struct 
tty_file_private,
+list);
+   file = file_priv-file;
+   if (!uid_eq(current_uid(),
+   file-f_inode-i_uid)) {
+   spin_unlock(tty_files_lock);
+   return -EPERM;
+   }
+   }
+   spin_unlock(tty_files_lock);
+   }
+
+   /* lock target */
+   console_lock();
+   if (vc_cons[arg].d-vc_locked == 1) {
+   console_unlock();
+   return -EACCES;
+   }
+   vc_cons[arg].d-vc_locked = 1;
+   console_unlock();
+   break;
+   }
+
+   case VT_UNLOCK:
+   if (arg  MAX_NR_CONSOLES || arg == 0)
+   return -ENXIO;
+
+   /* only root can unlock vts */
+   if (!uid_eq(current_uid(), GLOBAL_ROOT_UID))
+   return -EPERM;
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out;
+   }
+
+   /* unlock target */
+   console_lock();
+   vc_cons[arg].d-vc_locked = 0;
+   console_unlock();
+   break;
+   case VT_IS_LOCKED:
+   if (arg  MAX_NR_CONSOLES || arg == 0)
+   return -ENXIO;
+
+   arg--;
+
+   /* check if target is allocated */
+   if (!vc_cons_allocated(arg)) {
+   ret = -ENXIO;
+   goto out

Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss
> Hi
>
> On Mon, Mar 23, 2015 at 2:02 PM,   wrote:
>> hello
>>
>>> By moving these calls into the kernel, you don't make them necessarily
>>> fail-safe. This can all be implemented in user-space. By switching to
>>> a dedicated VT (say, VT12) and running VT_SETMODE+VT_PROCESS, you lock
>>> the machine. You can now implement your screensaver. If you run a
>>> spawner-process, you're even safe if your screensaver crashes.
>>
>> Yes but this would lock the whole machine. Our plan is to make it
>> posible
>> to lock a specific set of VTs - owned by the user who wants to lock.
>>
>> e.g if user A locked all his VTs user B would still be able to switch to
>> his VTs.
>
> Correct. But if you want to support locking individual sessions (or
> VTs), why not look at what is done with upcoming Wayland compositors,
> which implement this in the compositor itself? That is, the session
> tracks whether it's locked and shows a lock-screen if so. This can be
> done on text-VTs the same as on graphical ones.
>
> I mean, why does the kernel need to know VT state which is inherently
> defined the application running on it?
>
> Putting this in the kernel is the easier way out, given the historical
> setup of gettys on VTs. But I wonder why it's supposed to be the
> better way?
>
> Thanks
> David
>
Hello,

Our approch would be more universal, it wouldn't only work when wayland is
used, but as well on servers and systems that are not going to use
wayland.
And wayland doesn't seem to be ready soon.

Regards
Simone Weiss

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss
hello

> By moving these calls into the kernel, you don't make them necessarily
> fail-safe. This can all be implemented in user-space. By switching to
> a dedicated VT (say, VT12) and running VT_SETMODE+VT_PROCESS, you lock
> the machine. You can now implement your screensaver. If you run a
> spawner-process, you're even safe if your screensaver crashes.

Yes but this would lock the whole machine. Our plan is to make it posible
to lock a specific set of VTs - owned by the user who wants to lock.

e.g if user A locked all his VTs user B would still be able to switch to
his VTs.

Thanks
Simone Weiss

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss

> Wait, what's wrong with the existing functionality?

Userspace programms for screensavers can potentially be bypassed
- if my scrennsaver dies, for example by segfault, my screen is unlocked
- Redirection is only possible in Kernel, because a vt switch can only
  be prevented there
Also it would make the implementation of a Secure-Acess-Key possible
(could also redirect to VT12)

>> It should behave like:
>> If user A owns e.g. vt2, A is able to lock vt2 and unlock it again.
>> This is realized by a userspace programm that calls ioctl, which the
>> above
>> mentioned added cases VT_LOCK and VT_UNLOCK.
>> Another user(that is not root) wouldn't be allowed to un-/lock vt2.
>> If anybody wants to change to a looked VT he gets redirected to vt12.
>> At vt12 a userspace programm (to unlock a VT) would run and ask for
>> loginname and password, if it is the password from the user that owns
>> the
>> locked terminal or from root.
>> The VT gets unlocked and the user gets directed to his terminal.
>
> Why would you want to put all of that into the kernel?

We don't want to put all of that in the kernel, the above describes only
the interaction with a userspace programm.
For the kernel it would only mean that if a vt is locked
it wouldn't allow to switch to this vt and instead switch to VT12.

Regards,
Simone Weiss

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss
hello

 By moving these calls into the kernel, you don't make them necessarily
 fail-safe. This can all be implemented in user-space. By switching to
 a dedicated VT (say, VT12) and running VT_SETMODE+VT_PROCESS, you lock
 the machine. You can now implement your screensaver. If you run a
 spawner-process, you're even safe if your screensaver crashes.

Yes but this would lock the whole machine. Our plan is to make it posible
to lock a specific set of VTs - owned by the user who wants to lock.

e.g if user A locked all his VTs user B would still be able to switch to
his VTs.

Thanks
Simone Weiss

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss
 Hi

 On Mon, Mar 23, 2015 at 2:02 PM,  simone.we...@fau.de wrote:
 hello

 By moving these calls into the kernel, you don't make them necessarily
 fail-safe. This can all be implemented in user-space. By switching to
 a dedicated VT (say, VT12) and running VT_SETMODE+VT_PROCESS, you lock
 the machine. You can now implement your screensaver. If you run a
 spawner-process, you're even safe if your screensaver crashes.

 Yes but this would lock the whole machine. Our plan is to make it
 posible
 to lock a specific set of VTs - owned by the user who wants to lock.

 e.g if user A locked all his VTs user B would still be able to switch to
 his VTs.

 Correct. But if you want to support locking individual sessions (or
 VTs), why not look at what is done with upcoming Wayland compositors,
 which implement this in the compositor itself? That is, the session
 tracks whether it's locked and shows a lock-screen if so. This can be
 done on text-VTs the same as on graphical ones.

 I mean, why does the kernel need to know VT state which is inherently
 defined the application running on it?

 Putting this in the kernel is the easier way out, given the historical
 setup of gettys on VTs. But I wonder why it's supposed to be the
 better way?

 Thanks
 David

Hello,

Our approch would be more universal, it wouldn't only work when wayland is
used, but as well on servers and systems that are not going to use
wayland.
And wayland doesn't seem to be ready soon.

Regards
Simone Weiss

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: questions to planned lock-functionality for vts

2015-03-23 Thread simone . weiss

 Wait, what's wrong with the existing functionality?

Userspace programms for screensavers can potentially be bypassed
- if my scrennsaver dies, for example by segfault, my screen is unlocked
- Redirection is only possible in Kernel, because a vt switch can only
  be prevented there
Also it would make the implementation of a Secure-Acess-Key possible
(could also redirect to VT12)

 It should behave like:
 If user A owns e.g. vt2, A is able to lock vt2 and unlock it again.
 This is realized by a userspace programm that calls ioctl, which the
 above
 mentioned added cases VT_LOCK and VT_UNLOCK.
 Another user(that is not root) wouldn't be allowed to un-/lock vt2.
 If anybody wants to change to a looked VT he gets redirected to vt12.
 At vt12 a userspace programm (to unlock a VT) would run and ask for
 loginname and password, if it is the password from the user that owns
 the
 locked terminal or from root.
 The VT gets unlocked and the user gets directed to his terminal.

 Why would you want to put all of that into the kernel?

We don't want to put all of that in the kernel, the above describes only
the interaction with a userspace programm.
For the kernel it would only mean that if a vt is locked
it wouldn't allow to switch to this vt and instead switch to VT12.

Regards,
Simone Weiss

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v4 4/6] dgnc: checkpatch: macros in enclosed parantheses

2015-01-15 Thread Simone Weiss
dpacompat.h and digi.h partly define the same macros, so it is necessary to
change them both. I also removed some defines as they were unnecessary, 
because they were already defined, or because they were never used.

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/digi.h  | 59 +++-
 drivers/staging/dgnc/dpacompat.h |  8 ++
 2 files changed, 30 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..56466a7 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'<<8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'<<8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'<<8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'<<8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,41 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'<<8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'<<8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'<<8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'<<8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'<<8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'<<8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'<<8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'<<8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'<<8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'<<8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'<<8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'<<8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'<<8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'<<8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'<<8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'<<8) | 96   /* Drain & set params   */
-#define DIGI_SETAF ('e'<<8) | 97   /* Drain, flush & set params */
+#define DIGI_SETA  (('e'<<8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params   */
+#define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
 
-#define DIGI_KME   ('e'<<8) | 98   /* Read/Write Host  */
-   /* Adapter Memory   */
-
-#defineDIGI_GETFLOW('e'<<8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'<<8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'<<8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'<<8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'<<8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'<<8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'<<8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'<<8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'<<8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'<<8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'<<8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'<<8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +101,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'<<8) | 104  /* Get 2x36 flow cntl 
flags */
-#define

[PATCH v4 4/6] dgnc: checkpatch: macros in enclosed parantheses

2015-01-15 Thread Simone Weiss
dpacompat.h and digi.h partly define the same macros, so it is necessary to
change them both. I also removed some defines as they were unnecessary, 
because they were already defined, or because they were never used.

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/digi.h  | 59 +++-
 drivers/staging/dgnc/dpacompat.h |  8 ++
 2 files changed, 30 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..56466a7 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,41 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'8) | 96   /* Drain  set params   */
-#define DIGI_SETAF ('e'8) | 97   /* Drain, flush  set params */
+#define DIGI_SETA  (('e'8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
+#define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
 
-#define DIGI_KME   ('e'8) | 98   /* Read/Write Host  */
-   /* Adapter Memory   */
-
-#defineDIGI_GETFLOW('e'8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +101,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'8) | 105  /* Set 2x36 flow cntl 
flags */
+#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
+#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
 #defineF2200_MASK

[PATCH v3 4/6] dgnc: checkpatch: macros in enclosed parantheses

2015-01-14 Thread Simone Weiss
dpacompat.h and digi.h partly define the same macros, so it is necessary to
change them both.

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/digi.h  | 58 
 drivers/staging/dgnc/dpacompat.h | 12 -
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..7d94704 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'<<8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'<<8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'<<8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'<<8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'<<8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'<<8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'<<8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'<<8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'<<8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'<<8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'<<8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'<<8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'<<8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'<<8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'<<8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'<<8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'<<8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'<<8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'<<8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'<<8) | 96   /* Drain & set params   */
-#define DIGI_SETAF ('e'<<8) | 97   /* Drain, flush & set params */
+#define DIGI_SETA  (('e'<<8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params   */
+#define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
 
-#define DIGI_KME   ('e'<<8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'<<8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'<<8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'<<8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'<<8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'<<8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'<<8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'<<8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'<<8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'<<8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'<<8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'<<8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'<<8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'<<8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'<<8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'<<8) | 105  

[PATCH v3 4/6] dgnc: checkpatch: macros in enclosed parantheses

2015-01-14 Thread Simone Weiss
dpacompat.h and digi.h partly define the same macros, so it is necessary to
change them both.

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/digi.h  | 58 
 drivers/staging/dgnc/dpacompat.h | 12 -
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..7d94704 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'8) | 96   /* Drain  set params   */
-#define DIGI_SETAF ('e'8) | 97   /* Drain, flush  set params */
+#define DIGI_SETA  (('e'8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
+#define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
 
-#define DIGI_KME   ('e'8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'8) | 105  /* Set 2x36 flow cntl 
flags */
+#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
+#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
 #defineF2200_MASK  0x03/* 2200 flow cntl bit 
mask

[PATCH v2] Redone: dgnc/digi.h: checkpatch: Macros in enclosed

2014-12-23 Thread Simone Weiss
I've redone the previous patch as I have also forgotten a macro.

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/digi.h | 60 ++---
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..391708d 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'<<8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'<<8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'<<8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'<<8) | 251)/* set modem 
ctrl state */
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'<<8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'<<8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'<<8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'<<8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'<<8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'<<8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'<<8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'<<8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'<<8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'<<8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'<<8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'<<8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'<<8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'<<8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'<<8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'<<8) | 96   /* Drain & set params   */
-#define DIGI_SETAF ('e'<<8) | 97   /* Drain, flush & set params */
+#define DIGI_SETA  (('e'<<8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params   */
+#define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
 
-#define DIGI_KME   ('e'<<8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'<<8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'<<8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'<<8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'<<8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'<<8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'<<8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'<<8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'<<8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'<<8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'<<8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'<<8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'<<8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'<<8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'<<8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'<<8) | 105  /* Set 2x36 flow cntl 
flags */
+#define

[PATCH v2] Redone: dgnc/digi.h: checkpatch: Macros in enclosed

2014-12-23 Thread Simone Weiss
I've redone the previous patch as I have also forgotten a macro.

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/digi.h | 60 ++---
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..391708d 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'8) | 251)/* set modem 
ctrl state */
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'8) | 96   /* Drain  set params   */
-#define DIGI_SETAF ('e'8) | 97   /* Drain, flush  set params */
+#define DIGI_SETA  (('e'8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
+#define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
 
-#define DIGI_KME   ('e'8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'8) | 105  /* Set 2x36 flow cntl 
flags */
+#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
+#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
 #defineF2200_MASK  0x03/* 2200 flow cntl bit 
mask  */
 #defineFCNTL_2200  0x01/* 2x36

[PATCH] dgnc/digi.h: checkpatch: Changend complex macros (enclosed parantheses)

2014-12-22 Thread Simone Weiss
The patch previous in this thread (dgnc/dpacompat.h) defines partly the same 
macros as dgnc/digi.h and so it  is neccessary tochange the macros in this file 
as well, so no macros get redefined



Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger  
---
 drivers/staging/dgnc/digi.h | 52 ++---
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..c9675de 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'<<8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'<<8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'<<8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'<<8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'<<8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'<<8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'<<8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'<<8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'<<8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'<<8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'<<8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'<<8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'<<8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'<<8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'<<8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'<<8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'<<8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'<<8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'<<8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'<<8) | 96   /* Drain & set params   */
-#define DIGI_SETAF ('e'<<8) | 97   /* Drain, flush & set params */
+#define DIGI_SETA  (('e'<<8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params   */
+#define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
 
-#define DIGI_KME   ('e'<<8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'<<8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'<<8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'<<8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'<<8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'<<8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'<<8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'<<8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'<<8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'<<8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'<<8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'<<8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'<<8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'<<8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'<<8) | 104  /* Get 2x36 flow cntl 
flags */
-#d

[PATCH] [PATCH v2 2/6] dgnc/dgnc_sysfs.c: checkpatch: Use of dev_err ? instead of printk

2014-12-22 Thread Simone Weiss
I originally wanted to replace both of  the  printk cals in this file with 
dev_err().
But in the function dgnc_create_driver_sysfiles only the struct pci_driver was 
given,
sadly I coudn't figure out a way to get a struct device when only a struct 
pci_driver is given.

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dgnc_sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.c 
b/drivers/staging/dgnc/dgnc_sysfs.c
index 2fd34ca..8be3b51 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -360,7 +360,8 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
rc |= device_create_file(&(bd->pdev->dev), _attr_vpd);
rc |= device_create_file(&(bd->pdev->dev), _attr_serial_number);
if (rc)
-   printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n");
+   dev_err(&(bd->pdev->dev),
+   "DGNC: sysfs device_create_file failed!\n");
 }
 
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] [PATCH v2 2/6] dgnc/dgnc_sysfs.c: checkpatch: Use of dev_err ? instead of printk

2014-12-22 Thread Simone Weiss
I originally wanted to replace both of  the  printk cals in this file with 
dev_err().
But in the function dgnc_create_driver_sysfiles only the struct pci_driver was 
given,
sadly I coudn't figure out a way to get a struct device when only a struct 
pci_driver is given.

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dgnc_sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.c 
b/drivers/staging/dgnc/dgnc_sysfs.c
index 2fd34ca..8be3b51 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -360,7 +360,8 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
rc |= device_create_file((bd-pdev-dev), dev_attr_vpd);
rc |= device_create_file((bd-pdev-dev), dev_attr_serial_number);
if (rc)
-   printk(KERN_ERR DGNC: sysfs device_create_file failed!\n);
+   dev_err((bd-pdev-dev),
+   DGNC: sysfs device_create_file failed!\n);
 }
 
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] dgnc/digi.h: checkpatch: Changend complex macros (enclosed parantheses)

2014-12-22 Thread Simone Weiss
The patch previous in this thread (dgnc/dpacompat.h) defines partly the same 
macros as dgnc/digi.h and so it  is neccessary tochange the macros in this file 
as well, so no macros get redefined



Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de 
---
 drivers/staging/dgnc/digi.h | 52 ++---
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..c9675de 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'8) | 96   /* Drain  set params   */
-#define DIGI_SETAF ('e'8) | 97   /* Drain, flush  set params */
+#define DIGI_SETA  (('e'8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
+#define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
 
-#define DIGI_KME   ('e'8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'8) | 105  /* Set 2x36 flow cntl 
flags */
+#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
+#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
 #define

[PATCH 5/6] dgnc/dgnc_neo.c: checkpatch: fixed long lines

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dgnc_neo.c | 214 
 1 file changed, 149 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index c9a8a98..71e062d 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -95,7 +95,8 @@ struct board_ops dgnc_neo_ops = {
.send_immediate_char =  neo_send_immediate_char
 };
 
-static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 
0x80 };
+static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08,
+0x10, 0x20, 0x40, 0x80 };
 
 
 /*
@@ -129,14 +130,18 @@ static inline void neo_set_cts_flow_control(struct 
channel_t *ch)
/* Turn off auto Xon flow control */
efr &= ~(UART_17158_EFR_IXON);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have
+* to zero it out before setting it
+*/
writeb(0, >ch_neo_uart->efr);
 
/* Turn on UART enhanced bits */
writeb(efr, >ch_neo_uart->efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), 
>ch_neo_uart->fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY),
+   >ch_neo_uart->fctr);
 
/* Feed the UART our trigger levels */
writeb(8, >ch_neo_uart->tfifo);
@@ -165,13 +170,17 @@ static inline void neo_set_rts_flow_control(struct 
channel_t *ch)
ier &= ~(UART_17158_IER_XOFF);
efr &= ~(UART_17158_EFR_IXOFF);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, >ch_neo_uart->efr);
 
/* Turn on UART enhanced bits */
writeb(efr, >ch_neo_uart->efr);
 
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), 
>ch_neo_uart->fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY),
+   >ch_neo_uart->fctr);
ch->ch_r_watermark = 4;
 
writeb(32, >ch_neo_uart->rfifo);
@@ -202,14 +211,18 @@ static inline void neo_set_ixon_flow_control(struct 
channel_t *ch)
 
/* Turn on auto Xon flow control */
efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXON);
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
writeb(0, >ch_neo_uart->efr);
 
/* Turn on UART enhanced bits */
writeb(efr, >ch_neo_uart->efr);
 
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
>ch_neo_uart->fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   >ch_neo_uart->fctr);
ch->ch_r_watermark = 4;
 
writeb(32, >ch_neo_uart->rfifo);
@@ -241,14 +254,18 @@ static inline void neo_set_ixoff_flow_control(struct 
channel_t *ch)
ier |= (UART_17158_IER_XOFF);
efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXOFF);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, >ch_neo_uart->efr);
 
/* Turn on UART enhanced bits */
writeb(efr, >ch_neo_uart->efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
>ch_neo_uart->fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   >ch_neo_uart->fctr);
 
writeb(8, >ch_neo_uart->tfifo);
ch->ch_t_tlevel = 8;
@@ -282,15 +299,18 @@ static inline void neo_set_no_input_flow_control(struct 
channel_t *ch)
else
efr &= ~(UART_17158_EFR_ECB | UART_17158_EFR_IXOFF);
 
-
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, >ch_neo_uart->efr);
 
/* Turn on UART enhanced bits */
writeb(efr, >ch_neo_uart->efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
>ch_neo_uart->fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   >ch_neo_uart->fctr);
 
ch->ch_r_watermark = 0;
 
@@ -321,14 +341,18 @@ static inline void neo_set_no_output_flow_control(st

[PATCH 2/6] dgnc/dgnc_sysfs.c: checkpatch: Use of pr_err insted of printk

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dgnc_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.c 
b/drivers/staging/dgnc/dgnc_sysfs.c
index 2fd34ca..0fa2388 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -91,7 +91,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver 
*dgnc_driver)
rc |= driver_create_file(driverfs, _attr_maxboards);
rc |= driver_create_file(driverfs, _attr_pollrate);
if (rc)
-   printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n");
+   pr_err("DGNC: sysfs driver_create_file failed!\n");
 }
 
 
@@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
rc |= device_create_file(&(bd->pdev->dev), _attr_vpd);
rc |= device_create_file(&(bd->pdev->dev), _attr_serial_number);
if (rc)
-   printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n");
+   pr_err("DGNC: sysfs device_create_file failed!\n");
 }
 
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/6] dgnc: patches that fix checkpatch issues

2014-12-21 Thread Simone Weiss

We fixed some coding style issues in staging/dgnc.
Mostly it fixes lines over 80 characters (dgnc_neo.c, dgnc_cls.h, 
dgnc_compact.h,
dgnc_driver.h)
In dgnc_sysfs.c we replaced printk by pr_err.
In dpacompat.h we also set complex macros into enclosed parantheses 

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 


Simone Weiss (6):
  dgnc/dgnc_cls.h: checkpatch: fixed long lines by moving comments
  dgnc/dgnc_sysfc.c: checkpatch: Use of pr_err insted of printk
  dgnc/dpacompat.h: checkpatch: fixed long lines by moving comments
  dgnc/dpacompat.h: checkpatch: Changend complex Macros (enclosed
parantheses)
  dgnc/dgnc_neo.c: checkpatch: fixed long lines
  dgnc/dgnc_driver.h: checkpatch: fixed lines  over 80 characters

 drivers/staging/dgnc/dgnc_cls.h|  13 ++-
 drivers/staging/dgnc/dgnc_driver.h |  71 +++-
 drivers/staging/dgnc/dgnc_neo.c| 214 ++---
 drivers/staging/dgnc/dgnc_sysfs.c  |   4 +-
 drivers/staging/dgnc/dpacompat.h   |  15 +--
 5 files changed, 212 insertions(+), 105 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6] dgnc/dpacompat.h: checkpatch: fixed long lines bei moving comments

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dpacompat.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dpacompat.h b/drivers/staging/dgnc/dpacompat.h
index b2d2dc0..feb4f60 100644
--- a/drivers/staging/dgnc/dpacompat.h
+++ b/drivers/staging/dgnc/dpacompat.h
@@ -111,5 +111,7 @@ struct ni_info {
 #define DIGI_GET_NI_INFO ('d'<<8) | 250/* nonintelligent state 
snfo */
 
 /* Other special ioctls */
-#define DIGI_TIMERIRQ ('d'<<8) | 251   /* Enable/disable RS_TIMER use 
*/
-#define DIGI_LOOPBACK ('d'<<8) | 252   /* Enable/disable UART internal 
loopback */
+#define DIGI_TIMERIRQ ('d'<<8) | 251   /* Enable/disable
+* RS_TIMER use */
+#define DIGI_LOOPBACK ('d'<<8) | 252   /* Enable/disable UART
+* internal loopback */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] dgnc/dgnc_driver.h: checkpatch: fixed lines over 80 characters

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dgnc_driver.h | 71 +++---
 1 file changed, 44 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index a8157eb..7c3ecde 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -28,10 +28,12 @@
 #define __DGNC_DRIVER_H
 
 #include/* To pick up the varions Linux types */
-#include/* To pick up the various tty structs/defines */
+#include  /* To pick up the various tty
+* structs/defines */
 #include/* For irqreturn_t type */
 
-#include "dgnc_types.h"/* Additional types needed by the Digi 
header files */
+#include "dgnc_types.h"/* Additional types needed by
+* the Digi header files */
 #include "digi.h"  /* Digi specific ioctl header */
 #include "dgnc_kcompat.h"  /* Kernel 2.4/2.6 compat includes */
 #include "dgnc_sysfs.h"/* Support for SYSFS */
@@ -68,7 +70,8 @@
 #define PORT_NUM(dev)  ((dev) & 0x7f)
 #define IS_PRINT(dev)  (((dev) & 0xff) >= 0x80)
 
-/* MAX number of stop characters we will send when our read queue is getting 
full */
+/* MAX number of stop characters we will send
+ * when our read queue is getting full */
 #define MAX_STOPS_SENT 5
 
 /* 4 extra for alignment play space */
@@ -173,12 +176,15 @@ struct dgnc_board {
uintmaxports;   /* MAX ports this board can handle */
unsigned char   dvid;   /* Board specific device id */
unsigned char   vpd[128];   /* VPD of board, if found */
-   unsigned char   serial_num[20]; /* Serial number of board, if found in 
VPD */
+   unsigned char   serial_num[20]; /* Serial number of board,
+* if found in VPD */
 
spinlock_t  bd_lock;/* Used to protect board */
 
-   spinlock_t  bd_intr_lock;   /* Used to protect the poller tasklet 
and
-* the interrupt routine from each 
other.
+   spinlock_t  bd_intr_lock;   /*
+* Used to protect the poller tasklet
+* and the interrupt routine
+* from each other.
 */
 
uintstate;  /* State of card. */
@@ -197,14 +203,15 @@ struct dgnc_board {
ulong   membase;/* Start of base memory of the card */
ulong   membase_end;/* End of base memory of the card */
 
-   u8 __iomem  *re_map_membase;/* Remapped memory of the card 
*/
+   u8 __iomem  *re_map_membase;/* Remapped memory of the card */
 
ulong   iobase; /* Start of io base of the card */
ulong   iobase_end; /* End of io base of the card */
 
uintbd_uart_offset; /* Space between each UART */
 
-   struct channel_t *channels[MAXPORTS]; /* array of pointers to our 
channels. */
+   struct channel_t *channels[MAXPORTS];   /* array of pointers
+* to our channels. */
 
struct tty_driver   SerialDriver;
charSerialName[200];
@@ -219,10 +226,13 @@ struct dgnc_board {
 
uintTtyRefCnt;
 
-   char*flipbuf;   /* Our flip buffer, alloced if board is 
found */
+   char*flipbuf;   /* Our flip buffer,
+* alloced if board is found */
 
-   u16 dpatype;/* The board "type", as defined by DPA 
*/
-   u16 dpastatus;  /* The board "status", as defined by 
DPA */
+   u16 dpatype;/* The board "type",
+* as defined by DPA */
+   u16 dpastatus;  /* The board "status",
+* as defined by DPA */
 
/*
 *  Mgmt data.
@@ -315,7 +325,7 @@ struct un_t {
  /
 struct channel_t {
int magic;  /* Channel Magic Number */
-   struct dgnc_board   *ch_bd; /* Board structure pointer  
*/
+   struct dgnc_board   *ch_bd; /* Board structure pointer  */
struct digi_t   ch_digi;/* Transparent Print structure  */
struct un_t ch_tun; /* Terminal unit info  */
struct un_t ch_pun; /* Printer unit info*/
@@ -327,7 +337,8 @@ struct channel_t {
uintch_ope

[PATCH 1/6] dgnc/dgnc_cls.h: checkpatch: fixed long lines by moving comments

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dgnc_cls.h | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 465d79a..d1543c1 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -36,9 +36,9 @@
  /
 
 struct cls_uart_struct {
-   u8 txrx;/* WR  RHR/THR - Holding Reg */
+   u8 txrx;/* WR  RHR/THR - Holding Reg */
u8 ier; /* WR  IER - Interrupt Enable Reg */
-   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo 
Control Reg */
+   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo ControlReg*/
u8 lcr; /* WR  LCR - Line Control Reg */
u8 mcr; /* WR  MCR - Modem Control Reg */
u8 lsr; /* WR  LSR - Line Status Reg */
@@ -61,7 +61,8 @@ struct cls_uart_struct {
 #define UART_16654_FCR_RXTRIGGER_560x80
 #define UART_16654_FCR_RXTRIGGER_60 0xC0
 
-#define UART_IIR_CTSRTS0x20/* Received CTS/RTS 
change of state */
+/* Received CTS/RTS change of state */
+#define UART_IIR_CTSRTS0x20
 #define UART_IIR_RDI_TIMEOUT   0x0C/* Receiver data TIMEOUT */
 
 /*
@@ -74,8 +75,10 @@ struct cls_uart_struct {
 #define UART_EXAR654_EFR_RTSDTR   0x40/* Auto RTS/DTR Flow Control Enable 
*/
 #define UART_EXAR654_EFR_CTSDSR   0x80/* Auto CTS/DSR Flow COntrol Enable 
*/
 
-#define UART_EXAR654_XOFF_DETECT  0x1 /* Indicates whether chip saw an 
incoming XOFF char  */
-#define UART_EXAR654_XON_DETECT   0x2 /* Indicates whether chip saw an 
incoming XON char */
+/* Indicates whether chip saw an incoming XOFF char */
+#define UART_EXAR654_XOFF_DETECT  0x1
+/* Indicates whether chip saw an incoming XON char */
+#define UART_EXAR654_XON_DETECT   0x2
 
 #define UART_EXAR654_IER_XOFF 0x20/* Xoff Interrupt Enable */
 #define UART_EXAR654_IER_RTSDTR   0x40/* Output Interrupt Enable */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] dgnc/dpacompat.h: checkpatch: Changend complex macros (enclosed parantheses)

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss 
Signed-off-by: Helene Gsaenger 
---
 drivers/staging/dgnc/dpacompat.h | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dgnc/dpacompat.h b/drivers/staging/dgnc/dpacompat.h
index feb4f60..8049e9d 100644
--- a/drivers/staging/dgnc/dpacompat.h
+++ b/drivers/staging/dgnc/dpacompat.h
@@ -51,7 +51,7 @@ struct ni_info {
 
 #define RW_READ1
 #define RW_WRITE2
-#define DIGI_KME('e'<<8) | 98   /* Read/Write Host */
+#define DIGI_KME(('e'<<8) | 98)/* Read/Write Host */
 
 #define SUBTYPE 0007
 #define T_PCXI  
@@ -106,12 +106,13 @@ struct ni_info {
 
 /* Ioctls needed for dpa operation */
 
-#define DIGI_GETDD  ('d'<<8) | 248  /* get driver info  */
-#define DIGI_GETBD  ('d'<<8) | 249  /* get board info   */
-#define DIGI_GET_NI_INFO ('d'<<8) | 250/* nonintelligent state 
snfo */
+#define DIGI_GETDD  (('d'<<8) | 248)  /* get driver info  */
+#define DIGI_GETBD  (('d'<<8) | 249)  /* get board info   */
+#define DIGI_GET_NI_INFO   (('d'<<8) | 250)  /* nonintelligent
+  * state snfo */
 
 /* Other special ioctls */
-#define DIGI_TIMERIRQ ('d'<<8) | 251   /* Enable/disable
+#define DIGI_TIMERIRQ (('d'<<8) | 251) /* Enable/disable
 * RS_TIMER use */
-#define DIGI_LOOPBACK ('d'<<8) | 252   /* Enable/disable UART
+#define DIGI_LOOPBACK (('d'<<8) | 252) /* Enable/disable UART
 * internal loopback */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/6] dgnc/dpacompat.h: checkpatch: Changend complex macros (enclosed parantheses)

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dpacompat.h | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dgnc/dpacompat.h b/drivers/staging/dgnc/dpacompat.h
index feb4f60..8049e9d 100644
--- a/drivers/staging/dgnc/dpacompat.h
+++ b/drivers/staging/dgnc/dpacompat.h
@@ -51,7 +51,7 @@ struct ni_info {
 
 #define RW_READ1
 #define RW_WRITE2
-#define DIGI_KME('e'8) | 98   /* Read/Write Host */
+#define DIGI_KME(('e'8) | 98)/* Read/Write Host */
 
 #define SUBTYPE 0007
 #define T_PCXI  
@@ -106,12 +106,13 @@ struct ni_info {
 
 /* Ioctls needed for dpa operation */
 
-#define DIGI_GETDD  ('d'8) | 248  /* get driver info  */
-#define DIGI_GETBD  ('d'8) | 249  /* get board info   */
-#define DIGI_GET_NI_INFO ('d'8) | 250/* nonintelligent state 
snfo */
+#define DIGI_GETDD  (('d'8) | 248)  /* get driver info  */
+#define DIGI_GETBD  (('d'8) | 249)  /* get board info   */
+#define DIGI_GET_NI_INFO   (('d'8) | 250)  /* nonintelligent
+  * state snfo */
 
 /* Other special ioctls */
-#define DIGI_TIMERIRQ ('d'8) | 251   /* Enable/disable
+#define DIGI_TIMERIRQ (('d'8) | 251) /* Enable/disable
 * RS_TIMER use */
-#define DIGI_LOOPBACK ('d'8) | 252   /* Enable/disable UART
+#define DIGI_LOOPBACK (('d'8) | 252) /* Enable/disable UART
 * internal loopback */
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/6] dgnc/dpacompat.h: checkpatch: fixed long lines bei moving comments

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dpacompat.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dpacompat.h b/drivers/staging/dgnc/dpacompat.h
index b2d2dc0..feb4f60 100644
--- a/drivers/staging/dgnc/dpacompat.h
+++ b/drivers/staging/dgnc/dpacompat.h
@@ -111,5 +111,7 @@ struct ni_info {
 #define DIGI_GET_NI_INFO ('d'8) | 250/* nonintelligent state 
snfo */
 
 /* Other special ioctls */
-#define DIGI_TIMERIRQ ('d'8) | 251   /* Enable/disable RS_TIMER use 
*/
-#define DIGI_LOOPBACK ('d'8) | 252   /* Enable/disable UART internal 
loopback */
+#define DIGI_TIMERIRQ ('d'8) | 251   /* Enable/disable
+* RS_TIMER use */
+#define DIGI_LOOPBACK ('d'8) | 252   /* Enable/disable UART
+* internal loopback */
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 6/6] dgnc/dgnc_driver.h: checkpatch: fixed lines over 80 characters

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dgnc_driver.h | 71 +++---
 1 file changed, 44 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index a8157eb..7c3ecde 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -28,10 +28,12 @@
 #define __DGNC_DRIVER_H
 
 #include linux/types.h   /* To pick up the varions Linux types */
-#include linux/tty.h   /* To pick up the various tty structs/defines */
+#include linux/tty.h /* To pick up the various tty
+* structs/defines */
 #include linux/interrupt.h   /* For irqreturn_t type */
 
-#include dgnc_types.h/* Additional types needed by the Digi 
header files */
+#include dgnc_types.h/* Additional types needed by
+* the Digi header files */
 #include digi.h  /* Digi specific ioctl header */
 #include dgnc_kcompat.h  /* Kernel 2.4/2.6 compat includes */
 #include dgnc_sysfs.h/* Support for SYSFS */
@@ -68,7 +70,8 @@
 #define PORT_NUM(dev)  ((dev)  0x7f)
 #define IS_PRINT(dev)  (((dev)  0xff) = 0x80)
 
-/* MAX number of stop characters we will send when our read queue is getting 
full */
+/* MAX number of stop characters we will send
+ * when our read queue is getting full */
 #define MAX_STOPS_SENT 5
 
 /* 4 extra for alignment play space */
@@ -173,12 +176,15 @@ struct dgnc_board {
uintmaxports;   /* MAX ports this board can handle */
unsigned char   dvid;   /* Board specific device id */
unsigned char   vpd[128];   /* VPD of board, if found */
-   unsigned char   serial_num[20]; /* Serial number of board, if found in 
VPD */
+   unsigned char   serial_num[20]; /* Serial number of board,
+* if found in VPD */
 
spinlock_t  bd_lock;/* Used to protect board */
 
-   spinlock_t  bd_intr_lock;   /* Used to protect the poller tasklet 
and
-* the interrupt routine from each 
other.
+   spinlock_t  bd_intr_lock;   /*
+* Used to protect the poller tasklet
+* and the interrupt routine
+* from each other.
 */
 
uintstate;  /* State of card. */
@@ -197,14 +203,15 @@ struct dgnc_board {
ulong   membase;/* Start of base memory of the card */
ulong   membase_end;/* End of base memory of the card */
 
-   u8 __iomem  *re_map_membase;/* Remapped memory of the card 
*/
+   u8 __iomem  *re_map_membase;/* Remapped memory of the card */
 
ulong   iobase; /* Start of io base of the card */
ulong   iobase_end; /* End of io base of the card */
 
uintbd_uart_offset; /* Space between each UART */
 
-   struct channel_t *channels[MAXPORTS]; /* array of pointers to our 
channels. */
+   struct channel_t *channels[MAXPORTS];   /* array of pointers
+* to our channels. */
 
struct tty_driver   SerialDriver;
charSerialName[200];
@@ -219,10 +226,13 @@ struct dgnc_board {
 
uintTtyRefCnt;
 
-   char*flipbuf;   /* Our flip buffer, alloced if board is 
found */
+   char*flipbuf;   /* Our flip buffer,
+* alloced if board is found */
 
-   u16 dpatype;/* The board type, as defined by DPA 
*/
-   u16 dpastatus;  /* The board status, as defined by 
DPA */
+   u16 dpatype;/* The board type,
+* as defined by DPA */
+   u16 dpastatus;  /* The board status,
+* as defined by DPA */
 
/*
 *  Mgmt data.
@@ -315,7 +325,7 @@ struct un_t {
  /
 struct channel_t {
int magic;  /* Channel Magic Number */
-   struct dgnc_board   *ch_bd; /* Board structure pointer  
*/
+   struct dgnc_board   *ch_bd; /* Board structure pointer  */
struct digi_t   ch_digi;/* Transparent Print structure  */
struct un_t ch_tun; /* Terminal unit info  */
struct un_t ch_pun; /* Printer unit info*/
@@ -327,7 +337,8 @@ struct channel_t {
uintch_open_count;  /* open count

[PATCH 1/6] dgnc/dgnc_cls.h: checkpatch: fixed long lines by moving comments

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dgnc_cls.h | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 465d79a..d1543c1 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -36,9 +36,9 @@
  /
 
 struct cls_uart_struct {
-   u8 txrx;/* WR  RHR/THR - Holding Reg */
+   u8 txrx;/* WR  RHR/THR - Holding Reg */
u8 ier; /* WR  IER - Interrupt Enable Reg */
-   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo 
Control Reg */
+   u8 isr_fcr; /* WR  ISR/FCR - Interrupt Status Reg/Fifo ControlReg*/
u8 lcr; /* WR  LCR - Line Control Reg */
u8 mcr; /* WR  MCR - Modem Control Reg */
u8 lsr; /* WR  LSR - Line Status Reg */
@@ -61,7 +61,8 @@ struct cls_uart_struct {
 #define UART_16654_FCR_RXTRIGGER_560x80
 #define UART_16654_FCR_RXTRIGGER_60 0xC0
 
-#define UART_IIR_CTSRTS0x20/* Received CTS/RTS 
change of state */
+/* Received CTS/RTS change of state */
+#define UART_IIR_CTSRTS0x20
 #define UART_IIR_RDI_TIMEOUT   0x0C/* Receiver data TIMEOUT */
 
 /*
@@ -74,8 +75,10 @@ struct cls_uart_struct {
 #define UART_EXAR654_EFR_RTSDTR   0x40/* Auto RTS/DTR Flow Control Enable 
*/
 #define UART_EXAR654_EFR_CTSDSR   0x80/* Auto CTS/DSR Flow COntrol Enable 
*/
 
-#define UART_EXAR654_XOFF_DETECT  0x1 /* Indicates whether chip saw an 
incoming XOFF char  */
-#define UART_EXAR654_XON_DETECT   0x2 /* Indicates whether chip saw an 
incoming XON char */
+/* Indicates whether chip saw an incoming XOFF char */
+#define UART_EXAR654_XOFF_DETECT  0x1
+/* Indicates whether chip saw an incoming XON char */
+#define UART_EXAR654_XON_DETECT   0x2
 
 #define UART_EXAR654_IER_XOFF 0x20/* Xoff Interrupt Enable */
 #define UART_EXAR654_IER_RTSDTR   0x40/* Output Interrupt Enable */
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/6] dgnc: patches that fix checkpatch issues

2014-12-21 Thread Simone Weiss

We fixed some coding style issues in staging/dgnc.
Mostly it fixes lines over 80 characters (dgnc_neo.c, dgnc_cls.h, 
dgnc_compact.h,
dgnc_driver.h)
In dgnc_sysfs.c we replaced printk by pr_err.
In dpacompat.h we also set complex macros into enclosed parantheses 

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de


Simone Weiss (6):
  dgnc/dgnc_cls.h: checkpatch: fixed long lines by moving comments
  dgnc/dgnc_sysfc.c: checkpatch: Use of pr_err insted of printk
  dgnc/dpacompat.h: checkpatch: fixed long lines by moving comments
  dgnc/dpacompat.h: checkpatch: Changend complex Macros (enclosed
parantheses)
  dgnc/dgnc_neo.c: checkpatch: fixed long lines
  dgnc/dgnc_driver.h: checkpatch: fixed lines  over 80 characters

 drivers/staging/dgnc/dgnc_cls.h|  13 ++-
 drivers/staging/dgnc/dgnc_driver.h |  71 +++-
 drivers/staging/dgnc/dgnc_neo.c| 214 ++---
 drivers/staging/dgnc/dgnc_sysfs.c  |   4 +-
 drivers/staging/dgnc/dpacompat.h   |  15 +--
 5 files changed, 212 insertions(+), 105 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/6] dgnc/dgnc_sysfs.c: checkpatch: Use of pr_err insted of printk

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dgnc_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.c 
b/drivers/staging/dgnc/dgnc_sysfs.c
index 2fd34ca..0fa2388 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -91,7 +91,7 @@ void dgnc_create_driver_sysfiles(struct pci_driver 
*dgnc_driver)
rc |= driver_create_file(driverfs, driver_attr_maxboards);
rc |= driver_create_file(driverfs, driver_attr_pollrate);
if (rc)
-   printk(KERN_ERR DGNC: sysfs driver_create_file failed!\n);
+   pr_err(DGNC: sysfs driver_create_file failed!\n);
 }
 
 
@@ -360,7 +360,7 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
rc |= device_create_file((bd-pdev-dev), dev_attr_vpd);
rc |= device_create_file((bd-pdev-dev), dev_attr_serial_number);
if (rc)
-   printk(KERN_ERR DGNC: sysfs device_create_file failed!\n);
+   pr_err(DGNC: sysfs device_create_file failed!\n);
 }
 
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 5/6] dgnc/dgnc_neo.c: checkpatch: fixed long lines

2014-12-21 Thread Simone Weiss

Signed-off-by: Simone Weiss simone.we...@fau.de
Signed-off-by: Helene Gsaenger helene.gsaen...@studium.fau.de
---
 drivers/staging/dgnc/dgnc_neo.c | 214 
 1 file changed, 149 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index c9a8a98..71e062d 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -95,7 +95,8 @@ struct board_ops dgnc_neo_ops = {
.send_immediate_char =  neo_send_immediate_char
 };
 
-static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 
0x80 };
+static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08,
+0x10, 0x20, 0x40, 0x80 };
 
 
 /*
@@ -129,14 +130,18 @@ static inline void neo_set_cts_flow_control(struct 
channel_t *ch)
/* Turn off auto Xon flow control */
efr = ~(UART_17158_EFR_IXON);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have
+* to zero it out before setting it
+*/
writeb(0, ch-ch_neo_uart-efr);
 
/* Turn on UART enhanced bits */
writeb(efr, ch-ch_neo_uart-efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), 
ch-ch_neo_uart-fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY),
+   ch-ch_neo_uart-fctr);
 
/* Feed the UART our trigger levels */
writeb(8, ch-ch_neo_uart-tfifo);
@@ -165,13 +170,17 @@ static inline void neo_set_rts_flow_control(struct 
channel_t *ch)
ier = ~(UART_17158_IER_XOFF);
efr = ~(UART_17158_EFR_IXOFF);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, ch-ch_neo_uart-efr);
 
/* Turn on UART enhanced bits */
writeb(efr, ch-ch_neo_uart-efr);
 
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), 
ch-ch_neo_uart-fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY),
+   ch-ch_neo_uart-fctr);
ch-ch_r_watermark = 4;
 
writeb(32, ch-ch_neo_uart-rfifo);
@@ -202,14 +211,18 @@ static inline void neo_set_ixon_flow_control(struct 
channel_t *ch)
 
/* Turn on auto Xon flow control */
efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXON);
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
writeb(0, ch-ch_neo_uart-efr);
 
/* Turn on UART enhanced bits */
writeb(efr, ch-ch_neo_uart-efr);
 
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
ch-ch_neo_uart-fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   ch-ch_neo_uart-fctr);
ch-ch_r_watermark = 4;
 
writeb(32, ch-ch_neo_uart-rfifo);
@@ -241,14 +254,18 @@ static inline void neo_set_ixoff_flow_control(struct 
channel_t *ch)
ier |= (UART_17158_IER_XOFF);
efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXOFF);
 
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, ch-ch_neo_uart-efr);
 
/* Turn on UART enhanced bits */
writeb(efr, ch-ch_neo_uart-efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
ch-ch_neo_uart-fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   ch-ch_neo_uart-fctr);
 
writeb(8, ch-ch_neo_uart-tfifo);
ch-ch_t_tlevel = 8;
@@ -282,15 +299,18 @@ static inline void neo_set_no_input_flow_control(struct 
channel_t *ch)
else
efr = ~(UART_17158_EFR_ECB | UART_17158_EFR_IXOFF);
 
-
-   /* Why? Becuz Exar's spec says we have to zero it out before setting it 
*/
+   /*
+* Why? Becuz Exar's spec says we have to zero it out
+* before setting it
+*/
writeb(0, ch-ch_neo_uart-efr);
 
/* Turn on UART enhanced bits */
writeb(efr, ch-ch_neo_uart-efr);
 
/* Turn on table D, with 8 char hi/low watermarks */
-   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), 
ch-ch_neo_uart-fctr);
+   writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY),
+   ch-ch_neo_uart-fctr);
 
ch-ch_r_watermark = 0;
 
@@ -321,14 +341,18 @@ static inline void neo_set_no_output_flow_control(struct 
channel_t *ch)
else
efr = ~(UART_17158_EFR_ECB | UART_17158_EFR_IXON