public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mark Einon <mark.einon@gmail.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
	o.hartmann@telovital.com
Subject: Re: [PATCH v2 7/7] staging: et131x: Removing '_t' from ce_stats_t struct
Date: Mon, 06 Jun 2011 11:31:45 -0700	[thread overview]
Message-ID: <1307385105.4994.15.camel@Joe-Laptop> (raw)
In-Reply-To: <1307383624-8740-8-git-send-email-mark.einon@gmail.com>

On Mon, 2011-06-06 at 19:07 +0100, Mark Einon wrote:
> Removing '_t' from ce_stats_t struct name and renaming et131x_adapter ce_stats member from
>  'Stats' to 'stats'
[]
> diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
[]
> @@ -452,7 +452,7 @@ void ConfigFlowControl(struct et131x_adapter *etdev)
>   */
>  void UpdateMacStatHostCounters(struct et131x_adapter *etdev)
>  {
> -	struct ce_stats_t *stats = &etdev->Stats;
> +	struct ce_stats *stats = &etdev->stats;
>  	struct macstat_regs __iomem *macstat =
>  		&etdev->regs->macstat;
>  
> @@ -503,33 +503,33 @@ void HandleMacStatInterrupt(struct et131x_adapter *etdev)

Might as well copy from UpdateMacStatHostCounters and add

	struct ce_stats *stats = &etdev->stats;

>  	 * block indicates that one of the counters has wrapped.
>  	 */
>  	if (Carry1 & (1 << 14))
> -		etdev->Stats.code_violations += COUNTER_WRAP_16_BIT;
> +		etdev->stats.code_violations += COUNTER_WRAP_16_BIT;

and change these to
		stats->foo += bar...

>  	if (Carry1 & (1 << 8))
> -		etdev->Stats.alignment_err += COUNTER_WRAP_12_BIT;
> +		etdev->stats.alignment_err += COUNTER_WRAP_12_BIT;
>  	if (Carry1 & (1 << 7))
> -		etdev->Stats.length_err += COUNTER_WRAP_16_BIT;
> +		etdev->stats.length_err += COUNTER_WRAP_16_BIT;
>  	if (Carry1 & (1 << 2))
> -		etdev->Stats.other_errors += COUNTER_WRAP_16_BIT;
> +		etdev->stats.other_errors += COUNTER_WRAP_16_BIT;
>  	if (Carry1 & (1 << 6))
> -		etdev->Stats.crc_err += COUNTER_WRAP_16_BIT;
> +		etdev->stats.crc_err += COUNTER_WRAP_16_BIT;
>  	if (Carry1 & (1 << 3))
> -		etdev->Stats.rx_ov_flow += COUNTER_WRAP_16_BIT;
> +		etdev->stats.rx_ov_flow += COUNTER_WRAP_16_BIT;
>  	if (Carry1 & (1 << 0))
> -		etdev->Stats.norcvbuf += COUNTER_WRAP_16_BIT;
> +		etdev->stats.norcvbuf += COUNTER_WRAP_16_BIT;
>  	if (Carry2 & (1 << 16))
> -		etdev->Stats.max_pkt_error += COUNTER_WRAP_12_BIT;
> +		etdev->stats.max_pkt_error += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 15))
> -		etdev->Stats.tx_uflo += COUNTER_WRAP_12_BIT;
> +		etdev->stats.tx_uflo += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 6))
> -		etdev->Stats.first_collision += COUNTER_WRAP_12_BIT;
> +		etdev->stats.first_collision += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 8))
> -		etdev->Stats.tx_deferred += COUNTER_WRAP_12_BIT;
> +		etdev->stats.tx_deferred += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 5))
> -		etdev->Stats.excessive_collisions += COUNTER_WRAP_12_BIT;
> +		etdev->stats.excessive_collisions += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 4))
> -		etdev->Stats.late_collisions += COUNTER_WRAP_12_BIT;
> +		etdev->stats.late_collisions += COUNTER_WRAP_12_BIT;
>  	if (Carry2 & (1 << 2))
> -		etdev->Stats.collisions += COUNTER_WRAP_12_BIT;
> +		etdev->stats.collisions += COUNTER_WRAP_12_BIT;
>  }



      reply	other threads:[~2011-06-06 18:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 17:35 [PATCH 0/5] staging: et131x: checkpatch fixes Mark Einon
2011-06-05 17:35 ` [PATCH 1/5] staging: et131x: et1310_address_map.h " Mark Einon
2011-06-05 19:14   ` Alan Cox
2011-06-05 17:35 ` [PATCH 2/5] staging: et131x: et1310_rx.c " Mark Einon
2011-06-05 19:08   ` Alan Cox
2011-06-05 17:35 ` [PATCH 3/5] staging: et131x: et131x_adapter.h " Mark Einon
2011-06-05 19:11   ` Alan Cox
2011-06-05 17:35 ` [PATCH 4/5] staging: et131x: et131x_initpci.c " Mark Einon
2011-06-05 19:09   ` Alan Cox
2011-06-06  6:00   ` Dan Carpenter
2011-06-05 17:35 ` [PATCH 5/5] staging: et131x: et131x_netdev.c " Mark Einon
2011-06-05 19:10   ` Alan Cox
2011-06-05 19:11 ` [PATCH 0/5] staging: et131x: " Alan Cox
2011-06-06 18:06 ` [PATCH v2 0/7] " Mark Einon
2011-06-06 18:06   ` [PATCH v2 1/7] staging: et131x: checkpatch fixes for et1310_address_map.h (All 'do not add new typedefs') Mark Einon
2011-06-06 18:06   ` [PATCH v2 2/7] staging: et131x: et1310_rx.c checkpatch fixes Mark Einon
2011-06-06 18:07   ` [PATCH v2 3/7] staging: et131x: et131x_adapter.h " Mark Einon
2011-06-06 18:07   ` [PATCH v2 4/7] staging: et131x: et131x_initpci.c " Mark Einon
2011-06-06 18:07   ` [PATCH v2 5/7] staging: et131x: et131x_netdev.c " Mark Einon
2011-06-06 18:07   ` [PATCH v2 6/7] staging: et131x: Fixes multiple 'WARNING: do not add new typedefs' Mark Einon
2011-06-06 18:07   ` [PATCH v2 7/7] staging: et131x: Removing '_t' from ce_stats_t struct Mark Einon
2011-06-06 18:31     ` Joe Perches [this message]

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=1307385105.4994.15.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.einon@gmail.com \
    --cc=o.hartmann@telovital.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