All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Karsten Keil <isdn@linux-pingi.de>, Jiri Kosina <jkosina@suse.cz>,
	Randy Dunlap <rdunlap@infradead.org>,
	Masanari Iida <standby24x7@gmail.com>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] isdn: hisax: clean up some indenting
Date: Sun, 04 May 2014 18:59:08 +0000	[thread overview]
Message-ID: <53668DFC.6040106@bfs.de> (raw)
In-Reply-To: <20140503202012.GC32753@mwanda>



Am 03.05.2014 22:20, schrieb Dan Carpenter:
> The indenting is off the ifdefed code is intended to be a part of the
> body of the if statement.  I have cleaned it up a bit.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
> index 414dbf6..aaade90 100644
> --- a/drivers/isdn/hisax/hfc4s8s_l1.c
> +++ b/drivers/isdn/hisax/hfc4s8s_l1.c
> @@ -738,12 +738,13 @@ rx_d_frame(struct hfc4s8s_l1 *l1p, int ech)
>  					z1 -= 4;
>  				}
>  
> -				while (z1--)
> +				while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  					Read_hfc8(l1p->hw, A_FIFO_DATA0);
>  #else
> -				fRead_hfc8(l1p->hw);
> +					fRead_hfc8(l1p->hw);
>  #endif
> +				}
>  
>  				Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1);
>  				wait_busy(l1p->hw);
> @@ -768,12 +769,13 @@ rx_d_frame(struct hfc4s8s_l1 *l1p, int ech)
>  			z1 -= 4;
>  		}
>  
> -		while (z1--)
> +		while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			*cp++ = Read_hfc8(l1p->hw, A_FIFO_DATA0);
>  #else
> -		*cp++ = fRead_hfc8(l1p->hw);
> +			*cp++ = fRead_hfc8(l1p->hw);
>  #endif
> +		}
>  
>  		Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1);	/* increment f counter */
>  		wait_busy(l1p->hw);
> @@ -875,12 +877,13 @@ rx_b_frame(struct hfc4s8s_btype *bch)
>  			z1 -= 4;
>  		}
>  
> -		while (z1--)
> +		while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			*(bch->rx_ptr++) = Read_hfc8(l1->hw, A_FIFO_DATA0);
>  #else
> -		*(bch->rx_ptr++) = fRead_hfc8(l1->hw);
> +			*(bch->rx_ptr++) = fRead_hfc8(l1->hw);
>  #endif
> +		}
>  
>  		if (hdlc_complete) {
>  			/* increment f counter */
> @@ -1051,12 +1054,13 @@ tx_b_frame(struct hfc4s8s_btype *bch)
>  			cnt -= 4;
>  		}
>  
> -		while (cnt--)
> +		while (cnt--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			fWrite_hfc8(l1->hw, A_FIFO_DATA0, *cp++);
>  #else
> -		fWrite_hfc8(l1->hw, *cp++);
> +			fWrite_hfc8(l1->hw, *cp++);
>  #endif
> +		}

This looks wrong. The read above uses Read_hfc8/fRead_hfc8 (easy to confuse but i am not the maintainer ....)
here we have 2* fWrite_hfc8() ?
Does this compile with HISAX_HFC4S8S_PCIMEM ??

re,
 wh


>  
>  		if (bch->tx_cnt >= skb->len) {
>  			if (bch->mode = L1_MODE_HDLC) {
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Karsten Keil <isdn@linux-pingi.de>, Jiri Kosina <jkosina@suse.cz>,
	Randy Dunlap <rdunlap@infradead.org>,
	Masanari Iida <standby24x7@gmail.com>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] isdn: hisax: clean up some indenting
Date: Sun, 04 May 2014 20:59:08 +0200	[thread overview]
Message-ID: <53668DFC.6040106@bfs.de> (raw)
In-Reply-To: <20140503202012.GC32753@mwanda>



Am 03.05.2014 22:20, schrieb Dan Carpenter:
> The indenting is off the ifdefed code is intended to be a part of the
> body of the if statement.  I have cleaned it up a bit.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
> index 414dbf6..aaade90 100644
> --- a/drivers/isdn/hisax/hfc4s8s_l1.c
> +++ b/drivers/isdn/hisax/hfc4s8s_l1.c
> @@ -738,12 +738,13 @@ rx_d_frame(struct hfc4s8s_l1 *l1p, int ech)
>  					z1 -= 4;
>  				}
>  
> -				while (z1--)
> +				while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  					Read_hfc8(l1p->hw, A_FIFO_DATA0);
>  #else
> -				fRead_hfc8(l1p->hw);
> +					fRead_hfc8(l1p->hw);
>  #endif
> +				}
>  
>  				Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1);
>  				wait_busy(l1p->hw);
> @@ -768,12 +769,13 @@ rx_d_frame(struct hfc4s8s_l1 *l1p, int ech)
>  			z1 -= 4;
>  		}
>  
> -		while (z1--)
> +		while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			*cp++ = Read_hfc8(l1p->hw, A_FIFO_DATA0);
>  #else
> -		*cp++ = fRead_hfc8(l1p->hw);
> +			*cp++ = fRead_hfc8(l1p->hw);
>  #endif
> +		}
>  
>  		Write_hfc8(l1p->hw, A_INC_RES_FIFO, 1);	/* increment f counter */
>  		wait_busy(l1p->hw);
> @@ -875,12 +877,13 @@ rx_b_frame(struct hfc4s8s_btype *bch)
>  			z1 -= 4;
>  		}
>  
> -		while (z1--)
> +		while (z1--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			*(bch->rx_ptr++) = Read_hfc8(l1->hw, A_FIFO_DATA0);
>  #else
> -		*(bch->rx_ptr++) = fRead_hfc8(l1->hw);
> +			*(bch->rx_ptr++) = fRead_hfc8(l1->hw);
>  #endif
> +		}
>  
>  		if (hdlc_complete) {
>  			/* increment f counter */
> @@ -1051,12 +1054,13 @@ tx_b_frame(struct hfc4s8s_btype *bch)
>  			cnt -= 4;
>  		}
>  
> -		while (cnt--)
> +		while (cnt--) {
>  #ifdef HISAX_HFC4S8S_PCIMEM
>  			fWrite_hfc8(l1->hw, A_FIFO_DATA0, *cp++);
>  #else
> -		fWrite_hfc8(l1->hw, *cp++);
> +			fWrite_hfc8(l1->hw, *cp++);
>  #endif
> +		}

This looks wrong. The read above uses Read_hfc8/fRead_hfc8 (easy to confuse but i am not the maintainer ....)
here we have 2* fWrite_hfc8() ?
Does this compile with HISAX_HFC4S8S_PCIMEM ??

re,
 wh


>  
>  		if (bch->tx_cnt >= skb->len) {
>  			if (bch->mode == L1_MODE_HDLC) {
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2014-05-04 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 20:20 [patch] isdn: hisax: clean up some indenting Dan Carpenter
2014-05-03 20:20 ` Dan Carpenter
2014-05-04 18:59 ` walter harms [this message]
2014-05-04 18:59   ` walter harms
2014-05-05  7:44   ` Dan Carpenter
2014-05-05  7:44     ` Dan Carpenter
2014-05-05  8:53   ` [patch v] isdn: hisax: remove some dead code Dan Carpenter
2014-05-05  8:53     ` Dan Carpenter
2014-05-07 19:44     ` David Miller
2014-05-07 19:44       ` David Miller

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=53668DFC.6040106@bfs.de \
    --to=wharms@bfs.de \
    --cc=dan.carpenter@oracle.com \
    --cc=isdn@linux-pingi.de \
    --cc=jkosina@suse.cz \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=standby24x7@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.