Commit 293ed461 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: cxt1e1: Fix line length over 80 characters in linux.c

clean up checkpatch.pl warnings:
 WARNING: Line length over 80 characters
Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa562fa7
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "pmcc4_private.h" #include "pmcc4_private.h"
#include "sbeproc.h" #include "sbeproc.h"
/***************************************************************************************** /*******************************************************************************
* Error out early if we have compiler trouble. * Error out early if we have compiler trouble.
* *
* (This section is included from the kernel's init/main.c as a friendly * (This section is included from the kernel's init/main.c as a friendly
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. #warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended.
#endif #endif
/*****************************************************************************************/ /*******************************************************************************/
#define CHANNAME "hdlc" #define CHANNAME "hdlc"
...@@ -321,7 +321,8 @@ chan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -321,7 +321,8 @@ chan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int static int
chan_attach_noop(struct net_device *ndev, unsigned short foo_1, unsigned short foo_2) chan_attach_noop(struct net_device *ndev, unsigned short foo_1,
unsigned short foo_2)
{ {
/* our driver has nothing to do here, show's /* our driver has nothing to do here, show's
* over, go home * over, go home
...@@ -431,13 +432,15 @@ create_chan(struct net_device *ndev, ci_t *ci, ...@@ -431,13 +432,15 @@ create_chan(struct net_device *ndev, ci_t *ci,
priv = OS_kmalloc(sizeof(struct c4_priv)); priv = OS_kmalloc(sizeof(struct c4_priv));
if (!priv) if (!priv)
{ {
pr_warning("%s: no memory for net_device !\n", ci->devname); pr_warning("%s: no memory for net_device !\n",
ci->devname);
return NULL; return NULL;
} }
dev = alloc_hdlcdev(priv); dev = alloc_hdlcdev(priv);
if (!dev) if (!dev)
{ {
pr_warning("%s: no memory for hdlc_device !\n", ci->devname); pr_warning("%s: no memory for hdlc_device !\n",
ci->devname);
OS_kfree(priv); OS_kfree(priv);
return NULL; return NULL;
} }
...@@ -458,10 +461,12 @@ create_chan(struct net_device *ndev, ci_t *ci, ...@@ -458,10 +461,12 @@ create_chan(struct net_device *ndev, ci_t *ci,
switch (hi->promfmt) switch (hi->promfmt)
{ {
case PROM_FORMAT_TYPE1: case PROM_FORMAT_TYPE1:
memcpy(dev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6); memcpy(dev->dev_addr,
(FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
break; break;
case PROM_FORMAT_TYPE2: case PROM_FORMAT_TYPE2:
memcpy(dev->dev_addr, (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6); memcpy(dev->dev_addr,
(FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
break; break;
default: default:
memset(dev->dev_addr, 0, 6); memset(dev->dev_addr, 0, 6);
...@@ -691,9 +696,11 @@ do_create_chan(struct net_device *ndev, void *data) ...@@ -691,9 +696,11 @@ do_create_chan(struct net_device *ndev, void *data)
ret = mkret(c4_new_chan(ci, cp.port, cp.channum, dev)); ret = mkret(c4_new_chan(ci, cp.port, cp.channum, dev));
if (ret) if (ret)
{ {
rtnl_unlock(); /* needed due to Ioctl calling sequence */ /* needed due to Ioctl calling sequence */
rtnl_unlock();
unregister_hdlc_device(dev); unregister_hdlc_device(dev);
rtnl_lock(); /* needed due to Ioctl calling sequence */ /* needed due to Ioctl calling sequence */
rtnl_lock();
free_netdev(dev); free_netdev(dev);
} }
return ret; return ret;
...@@ -753,11 +760,13 @@ do_deluser(struct net_device *ndev, int lockit) ...@@ -753,11 +760,13 @@ do_deluser(struct net_device *ndev, int lockit)
ch->user = NULL; /* will be freed, below */ ch->user = NULL; /* will be freed, below */
} }
/* needed if Ioctl calling sequence */
if (lockit) if (lockit)
rtnl_unlock(); /* needed if Ioctl calling sequence */ rtnl_unlock();
unregister_hdlc_device(ndev); unregister_hdlc_device(ndev);
/* needed if Ioctl calling sequence */
if (lockit) if (lockit)
rtnl_lock(); /* needed if Ioctl calling sequence */ rtnl_lock();
free_netdev(ndev); free_netdev(ndev);
return 0; return 0;
} }
...@@ -927,7 +936,8 @@ c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd) ...@@ -927,7 +936,8 @@ c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
ret = do_pld_rw(ndev, data); ret = do_pld_rw(ndev, data);
break; break;
case SBE_IOC_IID_GET: case SBE_IOC_IID_GET:
ret = (iolen == sizeof(struct sbe_iid_info)) ? c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT; ret = (iolen == sizeof(struct sbe_iid_info)) ?
c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT;
if (ret == 0) /* no error, copy data */ if (ret == 0) /* no error, copy data */
if (copy_to_user(data, &arg, iolen)) if (copy_to_user(data, &arg, iolen))
return -EFAULT; return -EFAULT;
...@@ -962,7 +972,8 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1, ...@@ -962,7 +972,8 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
ndev = alloc_netdev(sizeof(ci_t), SBE_IFACETMPL, c4_setup); 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); pr_warning("%s: no memory for struct net_device !\n",
hi->devname);
error_flag = ENOMEM; error_flag = ENOMEM;
return NULL; return NULL;
} }
...@@ -1022,7 +1033,8 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1, ...@@ -1022,7 +1033,8 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
IRQF_SHARED, IRQF_SHARED,
ndev->name, ndev)) ndev->name, ndev))
{ {
pr_warning("%s: MUSYCC could not get irq: %d\n", ndev->name, irq0); pr_warning("%s: MUSYCC could not get irq: %d\n",
ndev->name, irq0);
unregister_netdev(ndev); unregister_netdev(ndev);
OS_kfree(netdev_priv(ndev)); OS_kfree(netdev_priv(ndev));
OS_kfree(ndev); OS_kfree(ndev);
...@@ -1053,13 +1065,15 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1, ...@@ -1053,13 +1065,15 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
switch (hi->promfmt) switch (hi->promfmt)
{ {
case PROM_FORMAT_TYPE1: case PROM_FORMAT_TYPE1:
memcpy(ndev->dev_addr, (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6); memcpy(ndev->dev_addr,
(FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
/* unaligned data acquisition */ /* unaligned data acquisition */
memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4); memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
ci->brd_id = cpu_to_be32(tmp); ci->brd_id = cpu_to_be32(tmp);
break; break;
case PROM_FORMAT_TYPE2: case PROM_FORMAT_TYPE2:
memcpy(ndev->dev_addr, (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6); memcpy(ndev->dev_addr,
(FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
/* unaligned data acquisition */ /* unaligned data acquisition */
memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4); memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
ci->brd_id = cpu_to_be32(tmp); ci->brd_id = cpu_to_be32(tmp);
...@@ -1110,7 +1124,7 @@ c4_mod_init(void) ...@@ -1110,7 +1124,7 @@ c4_mod_init(void)
pr_warning("%s\n", pmcc4_OSSI_release); pr_warning("%s\n", pmcc4_OSSI_release);
if ((rtn = c4hw_attach_all())) if ((rtn = c4hw_attach_all()))
return -rtn; /* installation failure - see system log */ return -rtn; /* installation failure - see system log */
/* housekeeping notifications */ /* housekeeping notifications */
if (cxt1e1_log_level != log_level_default) if (cxt1e1_log_level != log_level_default)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment