[OPW,kernel] /Staging/cxt1e1 : Fixes incorrect brace placement
diff mbox

Message ID 20131003164224.GA14491@dshgna
State Changes Requested
Headers show

Commit Message

Dulshani Gunawardhana Oct. 3, 2013, 4:42 p.m. UTC
Fixes error "This open brace { should be on the
above line" detected via checkpatch.pl.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
---
 drivers/staging/cxt1e1/comet.c               |  18 +-
 drivers/staging/cxt1e1/functions.c           |  19 +-
 drivers/staging/cxt1e1/hwprobe.c             |  60 ++---
 drivers/staging/cxt1e1/linux.c               |  76 +++---
 drivers/staging/cxt1e1/pmc93x6_eeprom.c      |  27 +--
 drivers/staging/cxt1e1/pmcc4_drv.c           | 333 ++++++++++-----------------
 drivers/staging/cxt1e1/sbecom_inline_linux.h |   3 +-
 drivers/staging/cxt1e1/sbeid.c               |  15 +-
 drivers/staging/cxt1e1/sbeproc.c             |   3 +-
 9 files changed, 200 insertions(+), 354 deletions(-)

Comments

Greg Kroah-Hartman Oct. 3, 2013, 5:21 p.m. UTC | #1
On Thu, Oct 03, 2013 at 10:12:33PM +0530, Dulshani Gunawardhana wrote:
> Fixes error "This open brace { should be on the
> above line" detected via checkpatch.pl.
> 
> Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
> ---
>  drivers/staging/cxt1e1/comet.c               |  18 +-
>  drivers/staging/cxt1e1/functions.c           |  19 +-
>  drivers/staging/cxt1e1/hwprobe.c             |  60 ++---
>  drivers/staging/cxt1e1/linux.c               |  76 +++---
>  drivers/staging/cxt1e1/pmc93x6_eeprom.c      |  27 +--
>  drivers/staging/cxt1e1/pmcc4_drv.c           | 333 ++++++++++-----------------
>  drivers/staging/cxt1e1/sbecom_inline_linux.h |   3 +-
>  drivers/staging/cxt1e1/sbeid.c               |  15 +-
>  drivers/staging/cxt1e1/sbeproc.c             |   3 +-
>  9 files changed, 200 insertions(+), 354 deletions(-)

This is a big patch, would you want to have to review such a thing?  :)

Try breaking this up into "one patch per file" at the least.

And for the pmcc4_drv.c file, well, hopefully on its own, it will be a
smaller patch.

Even if I wanted to take this big patch, I noticed:

> -        if (tmp)
> -        {                           /* wait on residual */
> +        if (tmp) {
> +	/* wait on residual */
>              udelay (tmp);

The indentation isn't correct here for the comment.  As checkpatch.pl is
tough to do for files that don't even have the indentation correct to
start with, you might want to just fix the tabs vs. spaces issues up
first, then any later patch to resolve issues you can run through
checkpatch.pl to determine if it is correct or not.

So, care to try this again?  I can't take this as-is.

thanks,

greg k-h
Zach Brown Oct. 3, 2013, 5:56 p.m. UTC | #2
On Thu, Oct 03, 2013 at 10:12:33PM +0530, Dulshani Gunawardhana wrote:
> Fixes error "This open brace { should be on the
> above line" detected via checkpatch.pl.

This looks like a good cleanup.  It'd be fine to submit it as is.

Reviewed-by: Zach Brown <zab@redhat.com>

> @@ -1146,15 +1124,13 @@ cleanup_hdlc (void)
>      struct net_device *ndev;
>      int         i, j, k;
>  
> -    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
> -    {
> -        if (hi->ndev)               /* a board has been attached */
> -        {
> +    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
> +        if (hi->ndev) {
> +	/* a board has been attached */

It was nice to see that you thoughtfully fixed the comments, too,
instead of just mashing the curly brace in front of them.  Though next
time should be indented to match the code inside the block they're
commenting.

+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
+        if (hi->ndev) {
+		/* a board has been attached */

> @@ -1138,9 +1087,9 @@ c4_set_chan (int channum, struct sbecom_chan_param *p)
>          if (ch->p.bitmask[i] != p->bitmask[i])
>              x = 1;                  /* we have a change requested */
>      ch->p = *p;
> -    if (x && (ch->state == UP))     /* if change request and channel is
> +    if (x && (ch->state == UP)) {
> +	    /* if change request and channel is
>                                       * open... */
> -    {
>          status_t    ret;
>  
>          if ((ret = musycc_chan_down ((ci_t *) 0, channum)))

And in the future you're absolutely welcome to collapse these comments
that the author put on multiple lines.

	if (x && (ch->state == UP)) {
		/* if change request and channel is open... */

- z

Patch
diff mbox

diff --git a/drivers/staging/cxt1e1/comet.c b/drivers/staging/cxt1e1/comet.c
index d71aea5..8a5e412 100644
--- a/drivers/staging/cxt1e1/comet.c
+++ b/drivers/staging/cxt1e1/comet.c
@@ -145,8 +145,7 @@  void init_comet(void *ci, comet_t *comet, u_int32_t port_mode, int clockmaster,
     /* Enable 8 out of 10 validation */
 	 /* t1RBOC enable(BOC:BitOriented Code) */
 	pci_write_32((u_int32_t *) &comet->t1_rboc_ena, 0x00);
-	if (isT1mode)
-	{
+	if (isT1mode) {
 
 	/* IBCD cfg: aka Inband Code Detection ** loopback code length set to */
 		/* 6 bit down, 5 bit up (assert) */
@@ -161,8 +160,7 @@  void init_comet(void *ci, comet_t *comet, u_int32_t port_mode, int clockmaster,
     /* 60: t1 ALMI cfg */
     /* Configure Line Coding */
 
-	switch (port_mode)
-	{
+	switch (port_mode) {
 	/* 1 - T1 B8ZS */
 	case CFG_FRAME_SF:
 		pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
@@ -288,8 +286,7 @@  void init_comet(void *ci, comet_t *comet, u_int32_t port_mode, int clockmaster,
 
     /* 0x30: "BRIF cfg"; 0x20 is 'CMODE', 0x03 is (bit) rate */
     /* note "rate bits can only be set once after reset" */
-	if (clockmaster)
-		{
+	if (clockmaster) {
 		/* CMODE == clockMode, 0=clock master (so all 3 others should be slave) */
 		/* rate = 1.544 Mb/s */
 		if (isT1mode)
@@ -304,8 +301,7 @@  void init_comet(void *ci, comet_t *comet, u_int32_t port_mode, int clockmaster,
 
 		/* Master Mode i.e.FPMODE=0 (@0x20) */
 		pci_write_32((u_int32_t *) &comet->brif_fpcfg, 0x00);
-		if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL)
-			{
+		if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL) {
 			if (cxt1e1_log_level >= LOG_SBEBUG12)
 				pr_info(">> %s: clockmaster internal clock\n", __func__);
 			/* internal oscillator */
@@ -424,8 +420,7 @@  WrtXmtWaveformTbl(ci_t *ci, comet_t *comet,
 {
 	u_int32_t sample, unit;
 
-	for (sample = 0; sample < COMET_NUM_SAMPLES; sample++)
-		{
+	for (sample = 0; sample < COMET_NUM_SAMPLES; sample++) {
 		for (unit = 0; unit < COMET_NUM_UNITS; unit++)
 			WrtXmtWaveform(ci, comet, sample, unit, table[sample][unit]);
 		}
@@ -556,8 +551,7 @@  SetCometOps(comet_t *comet)
 {
 	volatile u_int8_t rd_value;
 
-	if (comet == mConfig.C4Func1Base + (COMET0_OFFSET >> 2))
-	{
+	if (comet == mConfig.C4Func1Base + (COMET0_OFFSET >> 2)) {
 		/* read the BRIF Configuration */
 		rd_value = (u_int8_t) pci_read_32((u_int32_t *) &comet->brif_cfg);
 		rd_value &= ~0x20;
diff --git a/drivers/staging/cxt1e1/functions.c b/drivers/staging/cxt1e1/functions.c
index d021b31..d7a7b7b 100644
--- a/drivers/staging/cxt1e1/functions.c
+++ b/drivers/staging/cxt1e1/functions.c
@@ -109,8 +109,7 @@  watchdog_func (unsigned long arg)
 {
     struct watchdog *wd = (void *) arg;
 
-    if (drvr_state != SBE_DRVR_AVAILABLE)
-    {
+    if (drvr_state != SBE_DRVR_AVAILABLE) {
         if (cxt1e1_log_level >= LOG_MONITOR)
             pr_warning("%s: drvr not available (%x)\n", __func__, drvr_state);
         return;
@@ -140,18 +139,16 @@  OS_uwait (int usec, char *description)
 {
     int         tmp;
 
-    if (usec >= 1000)
-    {
+    if (usec >= 1000) {
         mdelay (usec / 1000);
         /* now delay residual */
         tmp = (usec / 1000) * 1000; /* round */
         tmp = usec - tmp;           /* residual */
-        if (tmp)
-        {                           /* wait on residual */
+        if (tmp) {
+	/* wait on residual */
             udelay (tmp);
         }
-    } else
-    {
+    } else {
         udelay (usec);
     }
 }
@@ -174,8 +171,7 @@  OS_uwait_dummy (void)
 void
 OS_sem_init (void *sem, int state)
 {
-    switch (state)
-    {
+    switch (state) {
         case SEM_TAKEN:
 		sema_init((struct semaphore *) sem, 0);
         break;
@@ -279,8 +275,7 @@  VMETRO_TRIGGER (ci_t *ci, int x)
 
     comet = ci->port[0].cometbase;  /* default to COMET # 0 */
 
-    switch (x)
-    {
+    switch (x) {
     default:
     case 0:
         data = pci_read_32 ((u_int32_t *) &comet->__res24);     /* 0x90 */
diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
index 53e9237..85cfabe 100644
--- a/drivers/staging/cxt1e1/hwprobe.c
+++ b/drivers/staging/cxt1e1/hwprobe.c
@@ -57,8 +57,7 @@  show_two (hdw_info_t *hi, int brdno)
 
     ci = (ci_t *)(netdev_priv(hi->ndev));
     bid = sbeid_get_bdname (ci);
-    switch (hi->promfmt)
-    {
+    switch (hi->promfmt) {
     case PROM_FORMAT_TYPE1:
         memcpy (sn, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
         break;
@@ -134,8 +133,7 @@  hdw_sn_get (hdw_info_t *hi, int brdno)
             hi->mfg_info.Serial[5]);
 #endif
 
-    if ((hi->promfmt = pmc_verify_cksum (&hi->mfg_info.data)) == PROM_FORMAT_Unk)
-    {
+    if ((hi->promfmt = pmc_verify_cksum (&hi->mfg_info.data)) == PROM_FORMAT_Unk) {
         /* bad crc, data is suspect */
         if (cxt1e1_log_level >= LOG_WARN)
             pr_info("%s: EEPROM cksum error\n", hi->devname);
@@ -151,8 +149,7 @@  prep_hdw_info (void)
     hdw_info_t *hi;
     int         i;
 
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         hi->pci_busno = 0xff;
         hi->pci_slot = 0xff;
         hi->pci_pin[0] = 0;
@@ -171,18 +168,15 @@  cleanup_ioremap (void)
     hdw_info_t *hi;
     int         i;
 
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         if (hi->pci_slot == 0xff)
             break;
-        if (hi->addr_mapped[0])
-        {
+        if (hi->addr_mapped[0]) {
             iounmap ((void *) (hi->addr_mapped[0]));
             release_mem_region ((long) hi->addr[0], hi->len[0]);
             hi->addr_mapped[0] = 0;
         }
-        if (hi->addr_mapped[1])
-        {
+        if (hi->addr_mapped[1]) {
             iounmap ((void *) (hi->addr_mapped[1]));
             release_mem_region ((long) hi->addr[1], hi->len[1]);
             hi->addr_mapped[1] = 0;
@@ -197,8 +191,7 @@  cleanup_devs (void)
     hdw_info_t *hi;
     int         i;
 
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         if (hi->pci_slot == 0xff || !hi->ndev)
             break;
         c4_stopwd(netdev_priv(hi->ndev));
@@ -224,8 +217,7 @@  c4_hdw_init (struct pci_dev *pdev, int found)
     unsigned char busno = 0xff;
 
     /* our MUSYCC chip supports two functions, 0 & 1 */
-    if ((fun = PCI_FUNC (pdev->devfn)) > 1)
-    {
+    if ((fun = PCI_FUNC (pdev->devfn)) > 1) {
         pr_warning("unexpected devfun: 0x%x\n", pdev->devfn);
         return 0;
     }
@@ -242,8 +234,7 @@  c4_hdw_init (struct pci_dev *pdev, int found)
      * element, identified by "slot==(0xff)".  The second part of a board's
      * functionality will match the previously loaded slot/busno.
      */
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         /*
          * match with board's first found interface, otherwise this is first
          * found
@@ -301,43 +292,35 @@  c4hw_attach_all (void)
     /*** scan PCI bus for all possible boards */
     while ((pdev = pci_get_device (PCI_VENDOR_ID_CONEXANT,
                                     PCI_DEVICE_ID_CN8474,
-                                    pdev)))
-    {
+                                    pdev))) {
         if (c4_hdw_init (pdev, found))
             found++;
     }
-    if (!found)
-    {
+    if (!found) {
         pr_warning("No boards found\n");
         return ENODEV;
     }
     /* sanity check for consistent hardware found */
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
-        if (hi->pci_slot != 0xff && (!hi->addr[0] || !hi->addr[1]))
-        {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
+        if (hi->pci_slot != 0xff && (!hi->addr[0] || !hi->addr[1])) {
             pr_warning("%s: something very wrong with pci_get_device\n",
                        hi->devname);
             return EIO;
         }
     }
     /* bring board's memory regions on/line */
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         if (hi->pci_slot == 0xff)
             break;
-        for (j = 0; j < 2; j++)
-        {
-            if (request_mem_region (hi->addr[j], hi->len[j], hi->devname) == 0)
-            {
+        for (j = 0; j < 2; j++) {
+            if (request_mem_region (hi->addr[j], hi->len[j], hi->devname) == 0) {
                 pr_warning("%s: memory in use, addr=0x%lx, len=0x%lx ?\n",
                            hi->devname, hi->addr[j], hi->len[j]);
                 cleanup_ioremap ();
                 return ENOMEM;
             }
             hi->addr_mapped[j] = (unsigned long) ioremap (hi->addr[j], hi->len[j]);
-            if (!hi->addr_mapped[j])
-            {
+            if (!hi->addr_mapped[j]) {
                 pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n",
                            hi->devname, hi->addr[j], hi->len[j]);
                 cleanup_ioremap ();
@@ -353,13 +336,11 @@  c4hw_attach_all (void)
     drvr_state = SBE_DRVR_AVAILABLE;
 
     /* Have now memory mapped all boards.  Now allow board's access to system */
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
         if (hi->pci_slot == 0xff)
             break;
         if (pci_enable_device (hi->pdev[0]) ||
-            pci_enable_device (hi->pdev[1]))
-        {
+            pci_enable_device (hi->pdev[1])) {
             drvr_state = SBE_DRVR_DOWN;
             pr_warning("%s: failed to enable card %d slot %d\n",
                        hi->devname, i, hi->pci_slot);
@@ -372,8 +353,7 @@  c4hw_attach_all (void)
         if (!(hi->ndev = c4_add_dev (hi, i, (long) hi->addr_mapped[0],
                                      (long) hi->addr_mapped[1],
                                      hi->pdev[0]->irq,
-                                     hi->pdev[1]->irq)))
-        {
+                                     hi->pdev[1]->irq))) {
             drvr_state = SBE_DRVR_DOWN;
             cleanup_ioremap ();
             /* NOTE: c4_add_dev() does its own device cleanup */
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index 142691c..ad30692 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -241,8 +241,7 @@  c4_wq_port_cleanup (mpi_t *pi)
      * PORT POINT: cannot call this if WQ is statically allocated w/in
      * structure since it calls kfree(wq);
      */
-    if (pi->wq_port)
-    {
+    if (pi->wq_port) {
         destroy_workqueue (pi->wq_port);        /* this also calls
                                                  * flush_workqueue() */
         pi->wq_port = 0;
@@ -286,8 +285,7 @@  chan_open (struct net_device *ndev)
     const struct c4_priv *priv = hdlc->priv;
     int         ret;
 
-    if ((ret = hdlc_open (ndev)))
-    {
+    if ((ret = hdlc_open (ndev))) {
         pr_info("hdlc_open failure, err %d.\n", ret);
         return ret;
     }
@@ -427,14 +425,12 @@  create_chan (struct net_device *ndev, ci_t *ci,
 
         /* allocate then fill in private data structure */
         priv = OS_kmalloc (sizeof (struct c4_priv));
-        if (!priv)
-        {
+        if (!priv) {
             pr_warning("%s: no memory for net_device !\n", ci->devname);
             return 0;
         }
         dev = alloc_hdlcdev (priv);
-        if (!dev)
-        {
+        if (!dev) {
             pr_warning("%s: no memory for hdlc_device !\n", ci->devname);
             OS_kfree (priv);
             return 0;
@@ -451,10 +447,8 @@  create_chan (struct net_device *ndev, ci_t *ci,
     *dev->name = 0;                 /* default ifconfig name = "hdlc" */
 
     hi = (hdw_info_t *) ci->hdw_info;
-    if (hi->mfg_info_sts == EEPROM_OK)
-    {
-        switch (hi->promfmt)
-        {
+    if (hi->mfg_info_sts == EEPROM_OK) {
+        switch (hi->promfmt) {
         case PROM_FORMAT_TYPE1:
             memcpy (dev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
             break;
@@ -465,8 +459,7 @@  create_chan (struct net_device *ndev, ci_t *ci,
             memset (dev->dev_addr, 0, 6);
             break;
         }
-    } else
-    {
+    } else {
         memset (dev->dev_addr, 0, 6);
     }
 
@@ -490,8 +483,7 @@  create_chan (struct net_device *ndev, ci_t *ci,
     dev->tx_queue_len = MAX_DEFAULT_IFQLEN;
 
     rtnl_lock ();                   /* needed due to Ioctl calling sequence */
-    if (ret)
-    {
+    if (ret) {
         if (cxt1e1_log_level >= LOG_WARN)
             pr_info("%s: create_chan[%d] registration error = %d.\n",
                     ci->devname, cp->channum, ret);
@@ -657,8 +649,7 @@  do_set_chan (struct net_device *ndev, void *data)
     ci = get_ci_by_dev (ndev);
     if (!ci)
         return -EINVAL;
-    switch (ret = mkret (c4_set_chan (cp.channum, &cp)))
-    {
+    switch (ret = mkret (c4_set_chan (cp.channum, &cp))) {
     case 0:
         return 0;
     default:
@@ -683,8 +674,7 @@  do_create_chan (struct net_device *ndev, void *data)
     if (!dev)
         return -EBUSY;
     ret = mkret (c4_new_chan (ci, cp.port, cp.channum, dev));
-    if (ret)
-    {
+    if (ret) {
         rtnl_unlock ();             /* needed due to Ioctl calling sequence */
         unregister_hdlc_device (dev);
         rtnl_lock ();               /* needed due to Ioctl calling sequence */
@@ -702,8 +692,7 @@  do_get_chan_stats (struct net_device *ndev, void *data)
     if (copy_from_user (&ccs, data,
                         sizeof (struct c4_chan_stats_wrap)))
         return -EFAULT;
-    switch (ret = mkret (c4_get_chan_stats (ccs.channum, &ccs.stats)))
-    {
+    switch (ret = mkret (c4_get_chan_stats (ccs.channum, &ccs.stats))) {
     case 0:
         break;
     default:
@@ -786,8 +775,7 @@  do_reset (struct net_device *musycc_dev, void *data)
     const struct c4_priv *priv;
     int         i;
 
-    for (i = 0; i < 128; i++)
-    {
+    for (i = 0; i < 128; i++) {
         struct net_device *ndev;
         char        buf[sizeof (CHANNAME) + 3];
 
@@ -797,8 +785,7 @@  do_reset (struct net_device *musycc_dev, void *data)
         priv = dev_to_hdlc (ndev)->priv;
 
         if ((unsigned long) (priv->ci) ==
-            (unsigned long) (netdev_priv(musycc_dev)))
-        {
+            (unsigned long) (netdev_priv(musycc_dev))) {
             ndev->flags &= ~IFF_UP;
             dev_put (ndev);
             netif_stop_queue (ndev);
@@ -872,8 +859,7 @@  c4_ioctl (struct net_device *ndev, struct ifreq *ifr, int cmd)
         return -EFAULT;
 
     ret = 0;
-    switch (iocmd)
-    {
+    switch (iocmd) {
     case SBE_IOC_PORT_GET:
         //pr_info(">> SBE_IOC_PORT_GET Ioctl...\n");
         ret = do_get_port (ndev, data);
@@ -955,8 +941,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
     ci_t       *ci;
 
     ndev = alloc_netdev(sizeof(ci_t), SBE_IFACETMPL, c4_setup);
-    if (!ndev)
-    {
+    if (!ndev) {
         pr_warning("%s: no memory for struct net_device !\n", hi->devname);
         error_flag = ENOMEM;
         return 0;
@@ -991,8 +976,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 
 
     if (register_netdev (ndev) ||
-        (c4_init (ci, (u_char *) f0, (u_char *) f1) != SBE_DRVR_SUCCESS))
-    {
+        (c4_init (ci, (u_char *) f0, (u_char *) f1) != SBE_DRVR_SUCCESS)) {
         OS_kfree (netdev_priv(ndev));
         OS_kfree (ndev);
         error_flag = ENODEV;
@@ -1015,8 +999,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 
     if (request_irq (irq0, &c4_linux_interrupt,
                      IRQF_SHARED,
-                     ndev->name, ndev))
-    {
+                     ndev->name, ndev)) {
         pr_warning("%s: MUSYCC could not get irq: %d\n", ndev->name, irq0);
         unregister_netdev (ndev);
         OS_kfree (netdev_priv(ndev));
@@ -1025,8 +1008,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
         return 0;
     }
 #ifdef CONFIG_SBE_PMCC4_NCOMM
-    if (request_irq (irq1, &c4_ebus_interrupt, IRQF_SHARED, ndev->name, ndev))
-    {
+    if (request_irq (irq1, &c4_ebus_interrupt, IRQF_SHARED, ndev->name, ndev)) {
         pr_warning("%s: EBUS could not get irq: %d\n", hi->devname, irq1);
         unregister_netdev (ndev);
         free_irq (irq0, ndev);
@@ -1045,8 +1027,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
         hdw_sn_get (hi, brdno);     /* also sets PROM format type (promfmt)
                                      * for later usage */
 
-        switch (hi->promfmt)
-        {
+        switch (hi->promfmt) {
         case PROM_FORMAT_TYPE1:
             memcpy (ndev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
             memcpy (&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);     /* unaligned data
@@ -1081,8 +1062,7 @@  c4_add_dev (hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 #endif
 
 
-    if ((error_flag = c4_init2 (ci)) != SBE_DRVR_SUCCESS)
-    {
+    if ((error_flag = c4_init2 (ci)) != SBE_DRVR_SUCCESS) {
 #ifdef CONFIG_PROC_FS
         sbecom_proc_brd_cleanup (ci);
 #endif
@@ -1115,15 +1095,13 @@  c4_mod_init (void)
        if (cxt1e1_max_mtu != max_mtu_default)
                pr_info("NOTE: driver parameter <cxt1e1_max_mtu> changed from default %d to %d.\n",
                                max_mtu_default, cxt1e1_max_mtu);
-    if (max_rxdesc_used != max_rxdesc_default)
-    {
+    if (max_rxdesc_used != max_rxdesc_default) {
         if (max_rxdesc_used > 2000)
             max_rxdesc_used = 2000; /* out-of-bounds reset */
         pr_info("NOTE: driver parameter <max_rxdesc_used> changed from default %d to %d.\n",
                 max_rxdesc_default, max_rxdesc_used);
     }
-    if (max_txdesc_used != max_txdesc_default)
-    {
+    if (max_txdesc_used != max_txdesc_default) {
         if (max_txdesc_used > 1000)
             max_txdesc_used = 1000; /* out-of-bounds reset */
         pr_info("NOTE: driver parameter <max_txdesc_used> changed from default %d to %d.\n",
@@ -1146,15 +1124,13 @@  cleanup_hdlc (void)
     struct net_device *ndev;
     int         i, j, k;
 
-    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-    {
-        if (hi->ndev)               /* a board has been attached */
-        {
+    for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
+        if (hi->ndev) {
+	/* a board has been attached */
             ci = (ci_t *)(netdev_priv(hi->ndev));
             for (j = 0; j < ci->max_port; j++)
                 for (k = 0; k < MUSYCC_NCHANS; k++)
-                    if ((ndev = ci->port[j].chan[k]->user))
-                    {
+                    if ((ndev = ci->port[j].chan[k]->user)) {
                         do_deluser (ndev, 0);
                     }
         }
diff --git a/drivers/staging/cxt1e1/pmc93x6_eeprom.c b/drivers/staging/cxt1e1/pmc93x6_eeprom.c
index 137b63c..7e5d1c6 100644
--- a/drivers/staging/cxt1e1/pmc93x6_eeprom.c
+++ b/drivers/staging/cxt1e1/pmc93x6_eeprom.c
@@ -90,8 +90,7 @@  static int  ByteReverseBuilt = FALSE;
  *------------------------------------------------------------------------
  */
 
-short       mfg_template[sizeof (FLD_TYPE2)] =
-{
+short       mfg_template[sizeof (FLD_TYPE2)] = {
     PROM_FORMAT_TYPE2,          /* type; */
     0x00, 0x1A,                 /* length[2]; */
     0x00, 0x00, 0x00, 0x00,     /* Crc32[4]; */
@@ -139,8 +138,7 @@  eeprom_delay (void)
 {
     int         timeout;
 
-    for (timeout = 20; timeout; --timeout)
-    {
+    for (timeout = 20; timeout; --timeout) {
         OS_uwait_dummy ();
     }
 }
@@ -159,8 +157,7 @@  eeprom_put_byte (long addr, long data, int count)
 {
     u_int32_t output;
 
-    while (--count >= 0)
-    {
+    while (--count >= 0) {
         output = (data & EPROM_ACTIVE_OUT_BIT) ? 1 : 0; /* Get next data bit */
         output |= EPROM_ENCS;       /* Add Chip Select */
         data >>= 1;
@@ -196,8 +193,7 @@  eeprom_get_byte (long addr)
 
     data = 0;
     count = NUM_OF_BITS;
-    while (--count >= 0)
-    {
+    while (--count >= 0) {
         eeprom_delay ();
         input = pci_read_32 ((u_int32_t *) addr);
 
@@ -328,19 +324,16 @@  pmc_eeprom_write (long addr, long mem_offset, u_int32_t data)
     pci_write_32 ((u_int32_t *) addr, EPROM_ENCS);      /* Re-enable Chip Select */
     temp = pci_read_32 ((u_int32_t *) addr);    /* discard first read */
     temp = pci_read_32 ((u_int32_t *) addr);
-    if (temp & EPROM_ACTIVE_IN_BIT)
-    {
+    if (temp & EPROM_ACTIVE_IN_BIT) {
         temp = pci_read_32 ((u_int32_t *) addr);
-        if (temp & EPROM_ACTIVE_IN_BIT)
-        {
+        if (temp & EPROM_ACTIVE_IN_BIT) {
             pci_write_32 ((u_int32_t *) addr, 0);       /* Remove Chip Select
                                                          * from EEPROM */
             return (1);
         }
     }
     count = 1000;
-    while (count--)
-    {
+    while (count--) {
         for (temp = 0; temp < 0x10; temp++)
             OS_uwait_dummy ();
 
@@ -366,8 +359,7 @@  pmcGetBuffValue (char *ptr, int size)
     long        value = 0;
     int         index;
 
-    for (index = 0; index < size; ++index)
-    {
+    for (index = 0; index < size; ++index) {
         value <<= 8;
         value |= ptr[index] & 0xFF;
     }
@@ -386,8 +378,7 @@  pmcSetBuffValue (char *ptr, long value, int size)
 {
     int         index = size;
 
-    while (--index >= 0)
-    {
+    while (--index >= 0) {
         ptr[index] = (char) (value & 0xFF);
         value >>= 8;
     }
diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c
index 2383c60..6e7849e 100644
--- a/drivers/staging/cxt1e1/pmcc4_drv.c
+++ b/drivers/staging/cxt1e1/pmcc4_drv.c
@@ -82,17 +82,14 @@  sbecom_set_loglevel (int d)
      * The code within the following -if- clause is a backdoor debug facility
      * which can be used to display the state of a board's channel.
      */
-    if (d > LOG_DEBUG)
-    {
+    if (d > LOG_DEBUG) {
         unsigned int channum = d - (LOG_DEBUG + 1);     /* convert to ZERO
                                                          * relativity */
 
         (void) musycc_dump_ring ((ci_t *) CI, channum); /* CI implies support
                                                          * for card 0 only */
-    } else
-    {
-        if (cxt1e1_log_level != d)
-        {
+    } else {
+        if (cxt1e1_log_level != d) {
             pr_info("log level changed from %d to %d\n", cxt1e1_log_level, d);
             cxt1e1_log_level = d;          /* set new */
         } else
@@ -110,10 +107,8 @@  c4_find_chan (int channum)
 
     for (ci = c4_list; ci; ci = ci->next)
         for (portnum = 0; portnum < ci->max_port; portnum++)
-            for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++)
-            {
-                if ((ch = ci->port[portnum].chan[gchan]))
-                {
+            for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++) {
+                if ((ch = ci->port[portnum].chan[gchan])) {
                     if ((ch->state != UNASSIGNED) &&
                         (ch->channum == channum))
                         return ch;
@@ -134,8 +129,7 @@  c4_new (void *hi)
 #endif
 
     ci = (ci_t *) OS_kmalloc (sizeof (ci_t));
-    if (ci)
-    {
+    if (ci) {
         ci->hdw_info = hi;
         ci->state = C_INIT;         /* mark as hardware not available */
         ci->next = c4_list;
@@ -201,17 +195,15 @@  checkPorts (ci_t *ci)
     u_int8_t portnum;
 
     LEDval = 0;
-    for (portnum = 0; portnum < ci->max_port; portnum++)
-    {
+    for (portnum = 0; portnum < ci->max_port; portnum++) {
         copyVal = 0x12f & (ci->alarmed[portnum]);       /* port's alarm record */
         comet = ci->port[portnum].cometbase;
         value = pci_read_32 ((u_int32_t *) &comet->cdrc_ists) & sbeLinkMask;    /* link loss reg */
 
-        if (value & sbeLinkChange)  /* is there a change in the link stuff */
-        {
-            /* if there's been a change (above) and yet it's the same (below) */
-            if (!(((copyVal >> 3) & sbeLinkDown) ^ (value & sbeLinkDown)))
-            {
+        if (value & sbeLinkChange) {
+	/* is there a change in the link stuff */
+	/* if there's been a change (above) and yet it's the same (below) */
+            if (!(((copyVal >> 3) & sbeLinkDown) ^ (value & sbeLinkDown))) {
                 if (value & sbeLinkDown)
                     pr_warning("%s: Port %d momentarily recovered.\n",
                                ci->devname, portnum);
@@ -221,8 +213,7 @@  checkPorts (ci_t *ci)
             } else if (value & sbeLinkDown)
                 pr_warning("%s: Warning: Port %d link is down.\n",
                            ci->devname, portnum);
-            else
-            {
+            else {
                 pr_warning("%s: Port %d link has recovered.\n",
                            ci->devname, portnum);
                 copyVal |= 0x20;    /* record link transition to up */
@@ -233,12 +224,11 @@  checkPorts (ci_t *ci)
                                      * save others */
         if (value & sbeLinkDown)
             copyVal |= 0x08;        /* record link status (now) */
-        else
-        {                           /* if link is up, do this */
+        else {
+	/* if link is up, do this */
             copyVal |= 0x40;        /* LED indicate link is up    */
             /* Alarm things & the like ... first if E1, then if T1 */
-            if (IS_FRAME_ANY_E1 (ci->port[portnum].p.port_mode))
-            {
+            if (IS_FRAME_ANY_E1 (ci->port[portnum].p.port_mode)) {
                 /*
                  * first check Codeword (SaX) changes & CRC and
                  * sub-multi-frame errors
@@ -248,8 +238,8 @@  checkPorts (ci_t *ci)
                  * vs. alarms
                  */
                 value = pci_read_32 ((u_int32_t *) &comet->e1_frmr_nat_ists);   /* codeword */
-                if (value & 0x1f)
-                {                   /* if errors (crc or smf only) */
+                if (value & 0x1f) {
+		/* if errors (crc or smf only) */
                     if (value & 0x10)
                         pr_warning("%s: E1 Port %d Codeword Sa4 change detected.\n",
                                    ci->devname, portnum);
@@ -267,8 +257,8 @@  checkPorts (ci_t *ci)
                                    ci->devname, portnum);
                 }
                 value = pci_read_32 ((u_int32_t *) &comet->e1_frmr_mists);      /* crc & smf */
-                if (value & 0x3)
-                {                   /* if errors (crc or smf only) */
+                if (value & 0x3) {
+		/* if errors (crc or smf only) */
                     if (value & sbeE1CRC)
                         pr_warning("%s: E1 Port %d CRC-4 error(s) detected.\n",
                                    ci->devname, portnum);
@@ -284,94 +274,79 @@  checkPorts (ci_t *ci)
                 /* RAI,RMAI,.,.,LOF,AIS,.,. ==>  RMAI,.,.,.,.,.,RAI,LOF,AIS */
                 /* see 0x97 */
                 value = (value >> 2);
-                if (value & 0x30)
-                {
+                if (value & 0x30) {
                     if (value & 0x20)
                         value |= 0x40;  /* RAI */
                     if (value & 0x10)
                         value |= 0x100; /* RMAI */
                     value &= ~0x30;
                 }                   /* finished packing alarm in handy order */
-                if (value != (copyVal & sbeE1AlarmsMask))
-                {                   /* if alarms changed */
+                if (value != (copyVal & sbeE1AlarmsMask)) {                   
+		/* if alarms changed */
                     copyVal |= 0x10;/* change LED status   */
-                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm))
-                    {
+                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm)) {
                         copyVal &= ~sbeRedAlm;
                         pr_warning("%s: E1 Port %d LOF alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm))
-                    {
+                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm)) {
                         copyVal |= sbeRedAlm;
                         pr_warning("%s: E1 Warning: Port %d LOF alarm.\n",
                                    ci->devname, portnum);
-                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm))
-                    {
+                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm)) {
                         copyVal &= ~sbeYelAlm;
                         pr_warning("%s: E1 Port %d RAI alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm))
-                    {
+                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm)) {
                         copyVal |= sbeYelAlm;
                         pr_warning("%s: E1 Warning: Port %d RAI alarm.\n",
                                    ci->devname, portnum);
-                    } else if ((copyVal & sbeE1RMAI) && !(value & sbeE1RMAI))
-                    {
+                    } else if ((copyVal & sbeE1RMAI) && !(value & sbeE1RMAI)) {
                         copyVal &= ~sbeE1RMAI;
                         pr_warning("%s: E1 Port %d RMAI alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeE1RMAI) && (value & sbeE1RMAI))
-                    {
+                    } else if (!(copyVal & sbeE1RMAI) && (value & sbeE1RMAI)) {
                         copyVal |= sbeE1RMAI;
                         pr_warning("%s: E1 Warning: Port %d RMAI alarm.\n",
                                    ci->devname, portnum);
-                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm))
-                    {
+                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm)) {
                         copyVal &= ~sbeAISAlm;
                         pr_warning("%s: E1 Port %d AIS alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm))
-                    {
+                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm)) {
                         copyVal |= sbeAISAlm;
                         pr_warning("%s: E1 Warning: Port %d AIS alarm.\n",
                                    ci->devname, portnum);
                     }
                 }
                 /* end of E1 alarm code */
-            } else
-            {                       /* if a T1 mode */
+            } else {
+		/* if a T1 mode */
                 value = pci_read_32 ((u_int32_t *) &comet->t1_almi_ists);       /* alarms */
                 value &= sbeAlarmsMask;
-                if (value != (copyVal & sbeAlarmsMask))
-                {                   /* if alarms changed */
+                if (value != (copyVal & sbeAlarmsMask)) {
+		/* if alarms changed */
                     copyVal |= 0x10;/* change LED status   */
-                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm))
-                    {
+                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm)) {
                         copyVal &= ~sbeRedAlm;
                         pr_warning("%s: Port %d red alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm))
-                    {
+                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm)) {
                         copyVal |= sbeRedAlm;
                         pr_warning("%s: Warning: Port %d red alarm.\n",
                                    ci->devname, portnum);
-                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm))
-                    {
+                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm)) {
                         copyVal &= ~sbeYelAlm;
                         pr_warning("%s: Port %d yellow (RAI) alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm))
-                    {
+                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm)) {
                         copyVal |= sbeYelAlm;
                         pr_warning("%s: Warning: Port %d yellow (RAI) alarm.\n",
                                    ci->devname, portnum);
-                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm))
-                    {
+                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm)) {
                         copyVal &= ~sbeAISAlm;
                         pr_warning("%s: Port %d blue (AIS) alarm ended.\n",
                                    ci->devname, portnum);
-                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm))
-                    {
+                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm)) {
                         copyVal |= sbeAISAlm;
                         pr_warning("%s: Warning: Port %d blue (AIS) alarm.\n",
                                    ci->devname, portnum);
@@ -394,17 +369,17 @@  checkPorts (ci_t *ci)
          * requests
          */
 
-        if (IS_FRAME_ANY_T1 (ci->port[portnum].p.port_mode))
-        {                           /* if a T1 mode  */
+        if (IS_FRAME_ANY_T1 (ci->port[portnum].p.port_mode)) {
+	/* if a T1 mode  */
             /*
              * begin in-band (SF) loopback code detection -- start by reading
              * command
              */
             value = pci_read_32 ((u_int32_t *) &comet->ibcd_ies);       /* detect reg. */
             value &= 0x3;           /* trim to handy bits */
-            if (value & 0x2)
-            {                       /* activate loopback (sets for deactivate
-                                     * code length) */
+            if (value & 0x2) {
+		/* activate loopback (sets for deactivate
+		* code length) */
                 copyVal = c4_loop_port (ci, portnum, COMET_LBCMD_READ); /* read line loopback
                                                                          * mode */
                 if (copyVal != COMET_MDIAG_LINELB)      /* don't do it again if
@@ -412,9 +387,9 @@  checkPorts (ci_t *ci)
                     c4_loop_port (ci, portnum, COMET_MDIAG_LINELB);     /* put port in line
                                                                          * loopback mode */
             }
-            if (value & 0x1)
-            {                       /* deactivate loopback (sets for activate
-                                     * code length) */
+            if (value & 0x1) {
+		/* deactivate loopback (sets for activate
+		* code length) */
                 copyVal = c4_loop_port (ci, portnum, COMET_LBCMD_READ); /* read line loopback
                                                                          * mode */
                 if (copyVal != COMET_MDIAG_LBOFF)       /* don't do it again if
@@ -423,8 +398,8 @@  checkPorts (ci_t *ci)
                                                                          * loopback mode */
             }
         }
-        if (IS_FRAME_ANY_T1ESF (ci->port[portnum].p.port_mode))
-        {                           /* if a T1 ESF mode  */
+        if (IS_FRAME_ANY_T1ESF (ci->port[portnum].p.port_mode)) {
+		/* if a T1 ESF mode  */
             /* begin ESF loopback code */
             value = pci_read_32 ((u_int32_t *) &comet->t1_rboc_sts) & 0x3f;     /* read command */
             if (value == 0x07)
@@ -454,8 +429,7 @@  checkPorts (ci_t *ci)
 static void
 c4_watchdog (ci_t *ci)
 {
-    if (drvr_state != SBE_DRVR_AVAILABLE)
-    {
+    if (drvr_state != SBE_DRVR_AVAILABLE) {
         if (cxt1e1_log_level >= LOG_MONITOR)
             pr_info("drvr not available (%x)\n", drvr_state);
         return;
@@ -474,16 +448,13 @@  c4_cleanup (void)
     int         portnum, j;
 
     ci = c4_list;
-    while (ci)
-    {
+    while (ci) {
         next = ci->next;            /* protect <next> from upcoming <free> */
         pci_write_32 ((u_int32_t *) &ci->cpldbase->leds, PMCC4_CPLD_LED_OFF);
-        for (portnum = 0; portnum < ci->max_port; portnum++)
-        {
+        for (portnum = 0; portnum < ci->max_port; portnum++) {
             pi = &ci->port[portnum];
             c4_wq_port_cleanup (pi);
-            for (j = 0; j < MUSYCC_NCHANS; j++)
-            {
+            for (j = 0; j < MUSYCC_NCHANS; j++) {
                 if (pi->chan[j])
                     OS_kfree (pi->chan[j]);     /* free mch_t struct */
             }
@@ -514,8 +485,7 @@  c4_get_portcfg (ci_t *ci)
     wdata = COMET_MDIAG_LBOFF;      /* take port out of any loopback mode */
 
     mask = 0;
-    for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++)
-    {
+    for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++) {
         comet = ci->port[portnum].cometbase;
         pci_write_32 ((u_int32_t *) &comet->mdiag, wdata);
         rdata = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
@@ -558,8 +528,7 @@  c4_init (ci_t *ci, u_char *func0, u_char *func1)
         int         pmsk;
 
         /* need comet addresses available for determination of hardware build */
-        for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++)
-        {
+        for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++) {
             pi = &ci->port[portnum];
             pi->cometbase = (comet_t *) ((u_int32_t *) (func1 + COMET_OFFSET (portnum)));
             pi->reg = (struct musycc_globalr *) ((u_char *) ci->reg + (portnum * 0x800));
@@ -571,8 +540,7 @@  c4_init (ci_t *ci, u_char *func0, u_char *func1)
 #endif
         }
         pmsk = c4_get_portcfg (ci);
-        switch (pmsk)
-        {
+        switch (pmsk) {
         case 0x1:
             ci->max_port = 1;
             break;
@@ -599,8 +567,7 @@  c4_init (ci_t *ci, u_char *func0, u_char *func1)
 #endif
     }
 
-    for (portnum = 0; portnum < ci->max_port; portnum++)
-    {
+    for (portnum = 0; portnum < ci->max_port; portnum++) {
         pi = &ci->port[portnum];
         pi->up = ci;
         pi->sr_last = 0xffffffff;
@@ -610,18 +577,15 @@  c4_init (ci_t *ci, u_char *func0, u_char *func1)
         OS_sem_init (&pi->sr_sem_busy, SEM_AVAILABLE);
         OS_sem_init (&pi->sr_sem_wait, SEM_TAKEN);
 
-        for (j = 0; j < 32; j++)
-        {
+        for (j = 0; j < 32; j++) {
             pi->fifomap[j] = -1;
             pi->tsm[j] = 0;         /* no assignments, all available */
         }
 
         /* allocate channel structures for this port */
-        for (j = 0; j < MUSYCC_NCHANS; j++)
-        {
+        for (j = 0; j < MUSYCC_NCHANS; j++) {
             ch = OS_kmalloc (sizeof (mch_t));
-            if (ch)
-            {
+            if (ch) {
                 pi->chan[j] = ch;
                 ch->state = UNASSIGNED;
                 ch->up = pi;
@@ -631,8 +595,7 @@  c4_init (ci_t *ci, u_char *func0, u_char *func1)
                 ch->p.port = portnum;
                 ch->p.channum = (-1);   /* channel assignment not yet known */
                 ch->p.mode_56k = 0; /* default is 64kbps mode */
-            } else
-            {
+            } else {
                 pr_warning("failed mch_t malloc, port %d channel %d size %u.\n",
                            portnum, j, (unsigned int) sizeof (mch_t));
                 break;
@@ -702,10 +665,8 @@  c4_loop_port (ci_t *ci, int portnum, u_int8_t cmd)
     if (cmd & COMET_LBCMD_READ)
         return loopValue;           /* return the read value */
 
-    if (loopValue != cmd)
-    {
-        switch (cmd)
-        {
+    if (loopValue != cmd) {
+        switch (cmd) {
         case COMET_MDIAG_LINELB:
             /* set(SF)loopback down (turn off) code length to 6 bits */
             pci_write_32 ((u_int32_t *) &comet->ibcd_cfg, 0x05);
@@ -721,14 +682,12 @@  c4_loop_port (ci_t *ci, int portnum, u_int8_t cmd)
             pr_info("%s: loopback mode changed to %2x from %2x on Port %d\n",
                     ci->devname, cmd, loopValue, portnum);
         loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
-        if (loopValue != cmd)
-        {
+        if (loopValue != cmd) {
             if (cxt1e1_log_level >= LOG_ERROR)
                 pr_info("%s: write to loop register failed, unknown state for Port %d\n",
                         ci->devname, portnum);
         }
-    } else
-    {
+    } else {
         if (cxt1e1_log_level >= LOG_WARN)
             pr_info("%s: loopback already in that mode (%2x)\n",
                     ci->devname, loopValue);
@@ -761,9 +720,9 @@  c4_frame_rw (ci_t *ci, struct sbecom_port_param *pp)
     comet = ci->port[pp->portnum].cometbase;
     data = pci_read_32 ((u_int32_t *) comet + pp->port_mode) & 0xff;
 
-    if (pp->portP)
-    {                               /* control says this is a register
-                                     * _write_ */
+    if (pp->portP) {
+	/* control says this is a register
+	* _write_ */
         if (pp->portStatus == data)
             pr_info("%s: Port %d already that value!  Writing again anyhow.\n",
                     ci->devname, pp->portnum);
@@ -798,9 +757,9 @@  c4_pld_rw (ci_t *ci, struct sbecom_port_param *pp)
     regaddr = (u_int32_t *) ci->cpldbase + regnum;
     data = pci_read_32 ((u_int32_t *) regaddr) & 0xff;
 
-    if (pp->portP)
-    {                               /* control says this is a register
-                                     * _write_ */
+    if (pp->portP) {
+	/* control says this is a register
+        * _write_ */
         pp->portP = (u_int8_t) data;
         pci_write_32 ((u_int32_t *) regaddr, pp->portStatus);
         data = pci_read_32 ((u_int32_t *) regaddr) & 0xff;
@@ -853,28 +812,26 @@  c4_musycc_rw (ci_t *ci, struct c4_musycc_param *mcp)
 
     /* read of TX are from RAM image, since hardware returns FF */
     dpr = (u_int32_t *) ((u_long) pi->regram + offset);
-    if (mcp->offset < 0x6000)       /* non MsgDesc Tbl accesses might require
+    if (mcp->offset < 0x6000) {       
+	    /* non MsgDesc Tbl accesses might require
                                      * RAM access */
-    {
         if (offset >= 0x200 && offset < 0x380)
             ramread = 1;
         if (offset >= 0x10 && offset < 0x200)
             ramread = 1;
     }
     /* read register from RAM or hardware, depending... */
-    if (ramread)
-    {
+    if (ramread) {
         data = *dpr;
         //pr_info("c4_musycc_rw: RAM addr %p  read data %x (portno %x offset %x RAM ramread %x)\n", dpr, data, portnum, offset, ramread); /* RLD DEBUG */
-    } else
-    {
+    } else {
         data = pci_read_32 ((u_int32_t *) dph);
         //pr_info("c4_musycc_rw: REG addr %p  read data %x (portno %x offset %x RAM ramread %x)\n", dph, data, portnum, offset, ramread); /* RLD DEBUG */
     }
 
 
-    if (mcp->RWportnum & 0x80)
-    {                               /* control says this is a register
+    if (mcp->RWportnum & 0x80) {
+	    /* control says this is a register
                                      * _write_ */
         if (mcp->value == data)
             pr_info("%s: musycc grp%d already that value! writing again anyhow.\n",
@@ -920,8 +877,7 @@  c4_set_port (ci_t *ci, int portnum)
     pi = &ci->port[portnum];
     pp = &ci->port[portnum].p;
     e1mode = IS_FRAME_ANY_E1 (pp->port_mode);
-    if (cxt1e1_log_level >= LOG_MONITOR2)
-    {
+    if (cxt1e1_log_level >= LOG_MONITOR2) {
         pr_info("%s: c4_set_port[%d]:  entered, e1mode = %x, openchans %d.\n",
                 ci->devname,
                 portnum, e1mode, pi->openchans);
@@ -973,8 +929,7 @@  c4_set_port (ci_t *ci, int portnum)
        pi->regram->mld = __constant_cpu_to_le32 (cxt1e1_max_mru | (cxt1e1_max_mru << 16));
 
     /* tsm algorithm */
-    for (i = 0; i < 32; i++)
-    {
+    for (i = 0; i < 32; i++) {
 
         /*** ASSIGNMENT NOTES:                             ***/
         /*** Group's channel  ZERO  unavailable if E1.     ***/
@@ -983,16 +938,13 @@  c4_set_port (ci_t *ci, int portnum)
 
         if (((i == 0) && e1mode) ||
             ((i == 16) && ((pp->port_mode == CFG_FRAME_E1CRC_CAS) || (pp->port_mode == CFG_FRAME_E1CRC_CAS_AMI)))
-            || ((i > 23) && (!e1mode)))
-        {
+            || ((i > 23) && (!e1mode))) {
             pi->tsm[i] = 0xff;      /* make tslot unavailable for this mode */
-        } else
-        {
+        } else {
             pi->tsm[i] = 0x00;      /* make tslot available for assignment */
         }
     }
-    for (i = 0; i < MUSYCC_NCHANS; i++)
-    {
+    for (i = 0; i < MUSYCC_NCHANS; i++) {
         pi->regram->ttsm[i] = 0;
         pi->regram->rtsm[i] = 0;
     }
@@ -1025,8 +977,7 @@  c4_new_chan (ci_t *ci, int portnum, int channum, void *user)
 
     pi = &(ci->port[portnum]);
     /* find any available channel within this port */
-    for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++)
-    {
+    for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++) {
         ch = pi->chan[gchan];
         if (ch && ch->state == UNASSIGNED)      /* no assignment is good! */
             break;
@@ -1060,13 +1011,12 @@  c4_new_chan (ci_t *ci, int portnum, int channum, void *user)
     }
 
     /* save off interface assignments which bound a board */
-    if (ci->first_if == 0)          /* first channel registered is assumed to
-                                     * be the lowest channel */
-    {
+    if (ci->first_if == 0) {
+	    /* first channel registered is assumed to
+             * be the lowest channel */
         ci->first_if = ci->last_if = user;
         ci->first_channum = ci->last_channum = channum;
-    } else
-    {
+    } else {
         ci->last_if = user;
         if (ci->last_channum < channum) /* higher number channel found */
             ci->last_channum = channum;
@@ -1119,8 +1069,7 @@  c4_set_chan (int channum, struct sbecom_chan_param *p)
         return EINVAL;
 #endif
 
-    if (!(ch->up->group_is_set))
-    {
+    if (!(ch->up->group_is_set)) {
         return EIO;                 /* out of order, SET_PORT command
                                      * required prior to first group's
                                      * SET_CHAN command */
@@ -1138,9 +1087,9 @@  c4_set_chan (int channum, struct sbecom_chan_param *p)
         if (ch->p.bitmask[i] != p->bitmask[i])
             x = 1;                  /* we have a change requested */
     ch->p = *p;
-    if (x && (ch->state == UP))     /* if change request and channel is
+    if (x && (ch->state == UP)) {
+	    /* if change request and channel is
                                      * open... */
-    {
         status_t    ret;
 
         if ((ret = musycc_chan_down ((ci_t *) 0, channum)))
@@ -1182,25 +1131,21 @@  c4_fifo_alloc (mpi_t *pi, int chan, int *len)
 {
     int         i, l = 0, start = 0, max = 0, maxstart = 0;
 
-    for (i = 0; i < 32; i++)
-    {
-        if (pi->fifomap[i] != -1)
-        {
+    for (i = 0; i < 32; i++) {
+        if (pi->fifomap[i] != -1) {
             l = 0;
             start = i + 1;
             continue;
         }
         ++l;
-        if (l > max)
-        {
+        if (l > max) {
             max = l;
             maxstart = start;
         }
         if (max == *len)
             break;
     }
-    if (max != *len)
-    {
+    if (max != *len) {
         if (cxt1e1_log_level >= LOG_WARN)
             pr_info("%s: wanted to allocate %d fifo space, but got only %d\n",
                     pi->up->devname, *len, max);
@@ -1242,8 +1187,7 @@  c4_chan_up (ci_t *ci, int channum)
 
     if (!(ch = c4_find_chan (channum)))
         return ENOENT;
-    if (ch->state == UP)
-    {
+    if (ch->state == UP) {
         if (cxt1e1_log_level >= LOG_MONITOR)
             pr_info("%s: channel already UP, graceful early exit\n",
                     ci->devname);
@@ -1253,12 +1197,9 @@  c4_chan_up (ci_t *ci, int channum)
     gchan = ch->gchan;
     /* find nts ('number of timeslots') */
     nts = 0;
-    for (i = 0; i < 32; i++)
-    {
-        if (ch->p.bitmask[i] & pi->tsm[i])
-        {
-            if (1 || cxt1e1_log_level >= LOG_WARN)
-            {
+    for (i = 0; i < 32; i++) {
+        if (ch->p.bitmask[i] & pi->tsm[i]) {
+            if (1 || cxt1e1_log_level >= LOG_WARN) {
                 pr_info("%s: c4_chan_up[%d] EINVAL (attempt to cfg in-use or unavailable TimeSlot[%d])\n",
                         ci->devname, channum, i);
                 pr_info("+ ask4 %x, currently %x\n",
@@ -1272,8 +1213,7 @@  c4_chan_up (ci_t *ci, int channum)
     }
 
     nbuf = nts / 8 ? nts / 8 : 1;
-    if (!nbuf)
-    {
+    if (!nbuf) {
         /* if( cxt1e1_log_level >= LOG_WARN)  */
         pr_info("%s: c4_chan_up[%d] ENOBUFS (no TimeSlots assigned)\n",
                 ci->devname, channum);
@@ -1294,8 +1234,7 @@  c4_chan_up (ci_t *ci, int channum)
 
         ccd = musycc_chan_proto (ch->p.chan_mode) << MUSYCC_CCD_PROTO_SHIFT;
         if ((ch->p.chan_mode == CFG_CH_PROTO_ISLP_MODE) ||
-            (ch->p.chan_mode == CFG_CH_PROTO_TRANS))
-        {
+            (ch->p.chan_mode == CFG_CH_PROTO_TRANS)) {
             ccd |= MUSYCC_CCD_FCS_XFER; /* Non FSC Mode */
         }
         ccd |= 2 << MUSYCC_CCD_MAX_LENGTH;      /* Select second MTU */
@@ -1327,8 +1266,7 @@  c4_chan_up (ci_t *ci, int channum)
      * the defaults, then use the changed values.  Otherwise, use Transparent
      * mode's specific minimum default settings.
      */
-    if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-    {
+    if (ch->p.chan_mode == CFG_CH_PROTO_TRANS) {
         if (max_rxdesc_used == max_rxdesc_default)      /* use default setting */
             max_rxdesc_used = MUSYCC_RXDESC_TRANS;
         if (max_txdesc_used == max_txdesc_default)      /* use default setting */
@@ -1361,19 +1299,15 @@  c4_chan_up (ci_t *ci, int channum)
     else
                tmp = __constant_cpu_to_le32 (cxt1e1_max_mru);
 
-    for (i = 0, md = ch->mdr; i < rxnum; i++, md++)
-    {
-        if (i == (rxnum - 1))
-        {
+    for (i = 0, md = ch->mdr; i < rxnum; i++, md++) {
+        if (i == (rxnum - 1)) {
             md->snext = &ch->mdr[0];/* wrapness */
-        } else
-        {
+        } else {
             md->snext = &ch->mdr[i + 1];
         }
         md->next = cpu_to_le32 (OS_vtophys (md->snext));
 
-               if (!(m = OS_mem_token_alloc (cxt1e1_max_mru)))
-        {
+               if (!(m = OS_mem_token_alloc (cxt1e1_max_mru))) {
             if (cxt1e1_log_level >= LOG_MONITOR)
                 pr_info("%s: c4_chan_up[%d] - token alloc failure, size = %d.\n",
                                                ci->devname, channum, cxt1e1_max_mru);
@@ -1387,18 +1321,15 @@  c4_chan_up (ci_t *ci, int channum)
                                                  * need to byteSwap */
     }
 
-    for (i = 0, md = ch->mdt; i < txnum; i++, md++)
-    {
+    for (i = 0, md = ch->mdt; i < txnum; i++, md++) {
         md->status = HOST_TX_OWNED; /* Host owns TX descriptor ** CODING
                                      * NOTE: HOST_TX_OWNED = 0 so no need to
                                      * byteSwap */
         md->mem_token = 0;
         md->data = 0;
-        if (i == (txnum - 1))
-        {
+        if (i == (txnum - 1)) {
             md->snext = &ch->mdt[0];/* wrapness */
-        } else
-        {
+        } else {
             md->snext = &ch->mdt[i + 1];
         }
         md->next = cpu_to_le32 (OS_vtophys (md->snext));
@@ -1419,16 +1350,14 @@  c4_chan_up (ci_t *ci, int channum)
 
     /* Activate the Channel */
     FLUSH_MEM_WRITE ();
-    if (ch->p.status & RX_ENABLED)
-    {
+    if (ch->p.status & RX_ENABLED) {
 #ifdef RLD_TRANS_DEBUG
         pr_info("++ c4_chan_up() CHAN RX ACTIVATE: chan %d\n", ch->channum);
 #endif
         ch->ch_start_rx = 0;        /* we are restarting RX... */
         musycc_serv_req (pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | gchan);
     }
-    if (ch->p.status & TX_ENABLED)
-    {
+    if (ch->p.status & TX_ENABLED) {
 #ifdef RLD_TRANS_DEBUG
         pr_info("++ c4_chan_up() CHAN TX ACTIVATE: chan %d <delayed>\n", ch->channum);
 #endif
@@ -1441,8 +1370,7 @@  c4_chan_up (ci_t *ci, int channum)
     return 0;
 
 errfree:
-    while (i > 0)
-    {
+    while (i > 0) {
         /* Don't leak all the previously allocated mbufs in this loop */
         i--;
         OS_mem_token_free (ch->mdr[i].mem_token);
@@ -1484,8 +1412,7 @@  sbecom_get_brdinfo (ci_t *ci, struct sbe_brd_info *bip, u_int8_t *bsn)
     bip->brd_pci_speed = BINFO_PCI_SPEED_unk;   /* PCI speed not yet
                                                  * determinable */
 
-    if (ci->first_if)
-    {
+    if (ci->first_if) {
         {
             struct net_device *dev;
 
@@ -1495,8 +1422,7 @@  sbecom_get_brdinfo (ci_t *ci, struct sbe_brd_info *bip, u_int8_t *bsn)
         strncpy (bip->first_iname, np, CHNM_STRLEN - 1);
     } else
         strcpy (bip->first_iname, "<NULL>");
-    if (ci->last_if)
-    {
+    if (ci->last_if) {
         {
             struct net_device *dev;
 
@@ -1507,19 +1433,15 @@  sbecom_get_brdinfo (ci_t *ci, struct sbe_brd_info *bip, u_int8_t *bsn)
     } else
         strcpy (bip->last_iname, "<NULL>");
 
-    if (bsn)
-    {
-        for (i = 0; i < 3; i++)
-        {
+    if (bsn) {
+        for (i = 0; i < 3; i++) {
             bip->brd_mac_addr[i] = *bsn++;
         }
-        for (; i < 6; i++)
-        {
+        for (; i < 6; i++) {
             bip->brd_mac_addr[i] = *bsn;
             sn = (sn << 8) | *bsn++;
         }
-    } else
-    {
+    } else {
         for (i = 0; i < 6; i++)
             bip->brd_mac_addr[i] = 0;
     }
@@ -1565,26 +1487,22 @@  c4_ebus_intr_th_handler (void *devp)
     /* which COMET caused the interrupt */
     brdno = ci->brdno;
     ists = pci_read_32 ((u_int32_t *) &ci->cpldbase->intr);
-    if (ists & PMCC4_CPLD_INTR_CMT_1)
-    {
+    if (ists & PMCC4_CPLD_INTR_CMT_1) {
         handled = 0x1;
         if (nciInterrupt[brdno][0] != NULL)
             (*nciInterrupt[brdno][0]) ();
     }
-    if (ists & PMCC4_CPLD_INTR_CMT_2)
-    {
+    if (ists & PMCC4_CPLD_INTR_CMT_2) {
         handled |= 0x2;
         if (nciInterrupt[brdno][1] != NULL)
             (*nciInterrupt[brdno][1]) ();
     }
-    if (ists & PMCC4_CPLD_INTR_CMT_3)
-    {
+    if (ists & PMCC4_CPLD_INTR_CMT_3) {
         handled |= 0x4;
         if (nciInterrupt[brdno][2] != NULL)
             (*nciInterrupt[brdno][2]) ();
     }
-    if (ists & PMCC4_CPLD_INTR_CMT_4)
-    {
+    if (ists & PMCC4_CPLD_INTR_CMT_4) {
         handled |= 0x8;
         if (nciInterrupt[brdno][3] != NULL)
             (*nciInterrupt[brdno][3]) ();
@@ -1607,10 +1525,9 @@  wanpmcC4T1E1_getBaseAddress (int cardID, int deviceID)
     unsigned long base = 0;
 
     ci = c4_list;
-    while (ci)
-    {
-        if (ci->brdno == cardID)    /* found valid device */
-        {
+    while (ci) {
+        if (ci->brdno == cardID) {
+	       	/* found valid device */
             if (deviceID < ci->max_port)        /* comet is supported */
                 base = ((unsigned long) ci->port[deviceID].cometbase);
             break;
diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
index 3c6d1c0..c4ac6c0 100644
--- a/drivers/staging/cxt1e1/sbecom_inline_linux.h
+++ b/drivers/staging/cxt1e1/sbecom_inline_linux.h
@@ -70,8 +70,7 @@  OS_mem_token_alloc (size_t size)
     struct sk_buff *skb;
 
     skb = dev_alloc_skb (size);
-    if (!skb)
-    {
+    if (!skb) {
         //pr_warning("no mem in OS_mem_token_alloc !\n");
         return 0;
     }
diff --git a/drivers/staging/cxt1e1/sbeid.c b/drivers/staging/cxt1e1/sbeid.c
index 791993f..ac8ff6d 100644
--- a/drivers/staging/cxt1e1/sbeid.c
+++ b/drivers/staging/cxt1e1/sbeid.c
@@ -24,8 +24,7 @@  sbeid_get_bdname (ci_t *ci)
 {
     char       *np = 0;
 
-    switch (ci->brd_id)
-    {
+    switch (ci->brd_id) {
     case SBE_BOARD_ID (PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1):
         np = "wanPTMC-256T3 <E1>";
         break;
@@ -73,8 +72,7 @@  sbeid_set_hdwbid (ci_t *ci)
      * have this register implemented)
      */
 
-    switch (ci->brd_id)
-    {
+    switch (ci->brd_id) {
         case SBE_BOARD_ID (PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1):
         ci->hdw_bid = SBE_BID_256T3_E1; /* 0x46 - SBE wanPTMC-256T3 (E1
                                          * Version) */
@@ -89,8 +87,7 @@  sbeid_set_hdwbid (ci_t *ci)
          * This Board ID is a generic identification.  Use the found number
          * of ports to further define this hardware.
          */
-        switch (ci->max_port)
-        {
+        switch (ci->max_port) {
         default:                    /* shouldn't need a default, but have one
                                      * anyway */
         case 4:
@@ -130,8 +127,7 @@  sbeid_set_hdwbid (ci_t *ci)
          * This Board ID is a generic identification.  Use the number of
          * found ports to further define this hardware.
          */
-        switch (ci->max_port)
-        {
+        switch (ci->max_port) {
         default:                    /* shouldn't need a default, but have one
                                      * anyway */
         case 4:
@@ -166,8 +162,7 @@  void
 sbeid_set_bdtype (ci_t *ci)
 {
     /* set SBE's unique PCI VENDOR/DEVID */
-    switch (ci->hdw_bid)
-    {
+    switch (ci->hdw_bid) {
         case SBE_BID_C1T3:      /* SBE wanPMC-C1T3 */
         ci->brd_id = SBE_BOARD_ID (PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T3);
         break;
diff --git a/drivers/staging/cxt1e1/sbeproc.c b/drivers/staging/cxt1e1/sbeproc.c
index 9361dd8..2a7d5ef 100644
--- a/drivers/staging/cxt1e1/sbeproc.c
+++ b/drivers/staging/cxt1e1/sbeproc.c
@@ -46,8 +46,7 @@  static void sbecom_proc_get_brdinfo(ci_t *ci, struct sbe_brd_info *bip)
 	hdw_info_t *hi = &hdw_info[ci->brdno];
 	u_int8_t *bsn = 0;
 
-	switch (hi->promfmt)
-	{
+	switch (hi->promfmt) {
 	case PROM_FORMAT_TYPE1:
 		bsn = (u_int8_t *) hi->mfg_info.pft1.Serial;
 		break;