* [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
@ 2014-03-04 2:08 Daeseok Youn
2014-03-04 3:24 ` Joe Perches
2014-03-04 8:45 ` Dan Carpenter
0 siblings, 2 replies; 5+ messages in thread
From: Daeseok Youn @ 2014-03-04 2:08 UTC (permalink / raw)
To: gregkh
Cc: sachin.kamat, shaun, dulshani.gunawardhana89, ying.xue, davem,
devel, linux-kernel
clean up checkpatch.pl warnings:
WARNING: Line length over 80 characters
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/cxt1e1/linux.c | 48 +++++++++++++++++++++++++--------------
1 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index 17d73f4..579e68e 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -31,7 +31,7 @@
#include "pmcc4_private.h"
#include "sbeproc.h"
-/*****************************************************************************************
+/*******************************************************************************
* Error out early if we have compiler trouble.
*
* (This section is included from the kernel's init/main.c as a friendly
@@ -50,7 +50,7 @@
#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended.
#endif
-/*****************************************************************************************/
+/*******************************************************************************/
#define CHANNAME "hdlc"
@@ -321,7 +321,8 @@ chan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
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
* over, go home
@@ -431,13 +432,15 @@ create_chan(struct net_device *ndev, ci_t *ci,
priv = OS_kmalloc(sizeof(struct c4_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;
}
dev = alloc_hdlcdev(priv);
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);
return NULL;
}
@@ -458,10 +461,12 @@ create_chan(struct net_device *ndev, ci_t *ci,
switch (hi->promfmt)
{
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;
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;
default:
memset(dev->dev_addr, 0, 6);
@@ -691,9 +696,11 @@ do_create_chan(struct net_device *ndev, void *data)
ret = mkret(c4_new_chan(ci, cp.port, cp.channum, dev));
if (ret)
{
- rtnl_unlock(); /* needed due to Ioctl calling sequence */
+ /* needed due to Ioctl calling sequence */
+ rtnl_unlock();
unregister_hdlc_device(dev);
- rtnl_lock(); /* needed due to Ioctl calling sequence */
+ /* needed due to Ioctl calling sequence */
+ rtnl_lock();
free_netdev(dev);
}
return ret;
@@ -753,11 +760,13 @@ do_deluser(struct net_device *ndev, int lockit)
ch->user = NULL; /* will be freed, below */
}
+ /* needed if Ioctl calling sequence */
if (lockit)
- rtnl_unlock(); /* needed if Ioctl calling sequence */
+ rtnl_unlock();
unregister_hdlc_device(ndev);
+ /* needed if Ioctl calling sequence */
if (lockit)
- rtnl_lock(); /* needed if Ioctl calling sequence */
+ rtnl_lock();
free_netdev(ndev);
return 0;
}
@@ -927,7 +936,8 @@ c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
ret = do_pld_rw(ndev, data);
break;
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 (copy_to_user(data, &arg, iolen))
return -EFAULT;
@@ -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);
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;
return NULL;
}
@@ -1022,7 +1033,8 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
IRQF_SHARED,
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);
OS_kfree(netdev_priv(ndev));
OS_kfree(ndev);
@@ -1053,13 +1065,15 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
switch (hi->promfmt)
{
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 */
memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
ci->brd_id = cpu_to_be32(tmp);
break;
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 */
memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
ci->brd_id = cpu_to_be32(tmp);
@@ -1110,7 +1124,7 @@ c4_mod_init(void)
pr_warning("%s\n", pmcc4_OSSI_release);
if ((rtn = c4hw_attach_all()))
- return -rtn; /* installation failure - see system log */
+ return -rtn; /* installation failure - see system log */
/* housekeeping notifications */
if (cxt1e1_log_level != log_level_default)
--
1.7.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
2014-03-04 2:08 [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c Daeseok Youn
@ 2014-03-04 3:24 ` Joe Perches
2014-03-04 5:01 ` DaeSeok Youn
2014-03-04 8:45 ` Dan Carpenter
1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-03-04 3:24 UTC (permalink / raw)
To: Daeseok Youn
Cc: gregkh, sachin.kamat, shaun, dulshani.gunawardhana89, ying.xue,
davem, devel, linux-kernel
On Tue, 2014-03-04 at 11:08 +0900, Daeseok Youn wrote:
> clean up checkpatch.pl warnings:
> WARNING: Line length over 80 characters
Please run your patches through checkpatch.
> diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
> @@ -431,13 +432,15 @@ create_chan(struct net_device *ndev, ci_t *ci,
> priv = OS_kmalloc(sizeof(struct c4_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);
pr_warn would be nice
> @@ -458,10 +461,12 @@ create_chan(struct net_device *ndev, ci_t *ci,
> switch (hi->promfmt)
> {
> 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);
Likely better to remove the (FLD_TYPE1 *) altogether.
> break;
> 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);
Likely better to remove the (FLD_TYPE2 *) too.
Maybe consolidate the blocks too.
> @@ -1053,13 +1065,15 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
> switch (hi->promfmt)
> {
> 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);
unnecessary casts?
> /* unaligned data acquisition */
> memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
here too.
> ci->brd_id = cpu_to_be32(tmp);
> break;
> 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 */
> memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
etc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
2014-03-04 3:24 ` Joe Perches
@ 2014-03-04 5:01 ` DaeSeok Youn
0 siblings, 0 replies; 5+ messages in thread
From: DaeSeok Youn @ 2014-03-04 5:01 UTC (permalink / raw)
To: Joe Perches
Cc: Greg KH, sachin.kamat, Shaun Laing, Dulshani Gunawardhana,
ying.xue, David Miller, devel, linux-kernel
Thanks for review.
How about fix it as your comment within another patch?
I sent many smaller patches for fixing coding style and other things.
And I think this patch has just fixed about long line length, so I
want to let it leave this change and
I will send a patch after fixing as your comment.
just my opinion.
Regards.
Daeseok Youn.
2014-03-04 12:24 GMT+09:00 Joe Perches <joe@perches.com>:
> On Tue, 2014-03-04 at 11:08 +0900, Daeseok Youn wrote:
>> clean up checkpatch.pl warnings:
>> WARNING: Line length over 80 characters
>
> Please run your patches through checkpatch.
>
>> diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
>
>> @@ -431,13 +432,15 @@ create_chan(struct net_device *ndev, ci_t *ci,
>> priv = OS_kmalloc(sizeof(struct c4_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);
>
> pr_warn would be nice
>
>> @@ -458,10 +461,12 @@ create_chan(struct net_device *ndev, ci_t *ci,
>> switch (hi->promfmt)
>> {
>> 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);
>
> Likely better to remove the (FLD_TYPE1 *) altogether.
>
>> break;
>> 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);
>
> Likely better to remove the (FLD_TYPE2 *) too.
> Maybe consolidate the blocks too.
>
>
>> @@ -1053,13 +1065,15 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
>> switch (hi->promfmt)
>> {
>> 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);
>
> unnecessary casts?
>
>> /* unaligned data acquisition */
>> memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
>
> here too.
>
>> ci->brd_id = cpu_to_be32(tmp);
>> break;
>> 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 */
>> memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
>
> etc.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
2014-03-04 2:08 [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c Daeseok Youn
2014-03-04 3:24 ` Joe Perches
@ 2014-03-04 8:45 ` Dan Carpenter
2014-03-04 10:10 ` DaeSeok Youn
1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-03-04 8:45 UTC (permalink / raw)
To: Daeseok Youn
Cc: gregkh, devel, shaun, sachin.kamat, linux-kernel,
dulshani.gunawardhana89, ying.xue, davem
On Tue, Mar 04, 2014 at 11:08:46AM +0900, Daeseok Youn wrote:
>
> clean up checkpatch.pl warnings:
> WARNING: Line length over 80 characters
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/staging/cxt1e1/linux.c | 48 +++++++++++++++++++++++++--------------
> 1 files changed, 31 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
> index 17d73f4..579e68e 100644
> --- a/drivers/staging/cxt1e1/linux.c
> +++ b/drivers/staging/cxt1e1/linux.c
> @@ -31,7 +31,7 @@
> #include "pmcc4_private.h"
> #include "sbeproc.h"
>
> -/*****************************************************************************************
> +/*******************************************************************************
This should just be:
/*
*
*
Not ************************************************** etc.
Fix in a later patch if you want.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
2014-03-04 8:45 ` Dan Carpenter
@ 2014-03-04 10:10 ` DaeSeok Youn
0 siblings, 0 replies; 5+ messages in thread
From: DaeSeok Youn @ 2014-03-04 10:10 UTC (permalink / raw)
To: Dan Carpenter
Cc: gregkh, devel, shaun, sachin.kamat, linux-kernel,
dulshani.gunawardhana89, ying.xue, davem
Thanks for review.
Ok. I Will fix later.
Daeseok Youn
2014-03-04 17:45 GMT+09:00, Dan Carpenter <dan.carpenter@oracle.com>:
> On Tue, Mar 04, 2014 at 11:08:46AM +0900, Daeseok Youn wrote:
>>
>> clean up checkpatch.pl warnings:
>> WARNING: Line length over 80 characters
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> drivers/staging/cxt1e1/linux.c | 48
>> +++++++++++++++++++++++++--------------
>> 1 files changed, 31 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/staging/cxt1e1/linux.c
>> b/drivers/staging/cxt1e1/linux.c
>> index 17d73f4..579e68e 100644
>> --- a/drivers/staging/cxt1e1/linux.c
>> +++ b/drivers/staging/cxt1e1/linux.c
>> @@ -31,7 +31,7 @@
>> #include "pmcc4_private.h"
>> #include "sbeproc.h"
>>
>> -/*****************************************************************************************
>> +/*******************************************************************************
>
> This should just be:
>
> /*
> *
> *
>
> Not ************************************************** etc.
>
> Fix in a later patch if you want.
>
> regards,
> dan carpenter
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-04 10:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 2:08 [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c Daeseok Youn
2014-03-04 3:24 ` Joe Perches
2014-03-04 5:01 ` DaeSeok Youn
2014-03-04 8:45 ` Dan Carpenter
2014-03-04 10:10 ` DaeSeok Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox