mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Daeseok Youn <daeseok.youn@gmail.com>
Cc: gregkh@linuxfoundation.org, sachin.kamat@linaro.org,
	shaun@xresource.ca, dulshani.gunawardhana89@gmail.com,
	ying.xue@windriver.com, davem@davemloft.net,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/7] staging: cxt1e1: Fix line length over 80 characters in linux.c
Date: Mon, 03 Mar 2014 19:24:54 -0800	[thread overview]
Message-ID: <1393903494.20435.13.camel@joe-AO722> (raw)
In-Reply-To: <2825545.2YpN0JuVSn@daeseok-laptop.cloud.net>

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.



  reply	other threads:[~2014-03-04  3:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  2:08 Daeseok Youn
2014-03-04  3:24 ` Joe Perches [this message]
2014-03-04  5:01   ` DaeSeok Youn
2014-03-04  8:45 ` Dan Carpenter
2014-03-04 10:10   ` DaeSeok Youn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393903494.20435.13.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=daeseok.youn@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=dulshani.gunawardhana89@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=shaun@xresource.ca \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®