netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: <varkabhadram@gmail.com>
Cc: <netdev@vger.kernel.org>, <mugunthanvnm@ti.com>,
	<linux@rainbow-software.org>, <balbi@ti.com>,
	<george.cherian@ti.com>, <davem@davemloft.net>,
	Varka Bhadram <varkab@cdac.in>
Subject: Re: [PATCH net v2 2/7] net: cpmac: fix comments
Date: Thu, 10 Jul 2014 08:07:23 -0500	[thread overview]
Message-ID: <20140710130723.GB15340@saruman.home> (raw)
In-Reply-To: <1404970545-26508-3-git-send-email-varkabhadram@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4955 bytes --]

On Thu, Jul 10, 2014 at 11:05:40AM +0530, varkabhadram@gmail.com wrote:
> From: Varka Bhadram <varkab@cdac.in>
> 
> This patch convert the normal comments to networking subsystem
> style comments.
> 
> Signed-off-by: Varka Bhadram <varkab@cdac.in>

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/net/ethernet/ti/cpmac.c |   40 ++++++++++++++++++++-------------------
>  1 file changed, 21 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
> index 61eb691..1d8ef39 100644
> --- a/drivers/net/ethernet/ti/cpmac.c
> +++ b/drivers/net/ethernet/ti/cpmac.c
> @@ -118,8 +118,8 @@ MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");
>  #define CPMAC_TX_ACK(channel)		(0x0640 + (channel) * 4)
>  #define CPMAC_RX_ACK(channel)		(0x0660 + (channel) * 4)
>  #define CPMAC_REG_END			0x0680
> -/*
> - * Rx/Tx statistics
> +
> +/* Rx/Tx statistics
>   * TODO: use some of them to fill stats in cpmac_stats()
>   */
>  #define CPMAC_STATS_RX_GOOD		0x0200
> @@ -331,8 +331,7 @@ static void cpmac_set_multicast_list(struct net_device *dev)
>  			cpmac_write(priv->regs, CPMAC_MAC_HASH_LO, 0xffffffff);
>  			cpmac_write(priv->regs, CPMAC_MAC_HASH_HI, 0xffffffff);
>  		} else {
> -			/*
> -			 * cpmac uses some strange mac address hashing
> +			/* cpmac uses some strange mac address hashing
>  			 * (not crc32)
>  			 */
>  			netdev_for_each_mc_addr(ha, dev) {
> @@ -432,10 +431,10 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
>  
>  		if ((desc->dataflags & CPMAC_EOQ) != 0) {
>  			/* The last update to eoq->hw_next didn't happen
> -			* soon enough, and the receiver stopped here.
> -			*Remember this descriptor so we can restart
> -			* the receiver after freeing some space.
> -			*/
> +			 * soon enough, and the receiver stopped here.
> +			 * Remember this descriptor so we can restart
> +			 * the receiver after freeing some space.
> +			 */
>  			if (unlikely(restart)) {
>  				if (netif_msg_rx_err(priv))
>  					printk(KERN_ERR "%s: poll found a"
> @@ -457,25 +456,27 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
>  
>  	if (desc != priv->rx_head) {
>  		/* We freed some buffers, but not the whole ring,
> -		 * add what we did free to the rx list */
> +		 * add what we did free to the rx list
> +		 */
>  		desc->prev->hw_next = (u32)0;
>  		priv->rx_head->prev->hw_next = priv->rx_head->mapping;
>  	}
>  
>  	/* Optimization: If we did not actually process an EOQ (perhaps because
>  	 * of quota limits), check to see if the tail of the queue has EOQ set.
> -	* We should immediately restart in that case so that the receiver can
> -	* restart and run in parallel with more packet processing.
> -	* This lets us handle slightly larger bursts before running
> -	* out of ring space (assuming dev->weight < ring_size) */
> +	 * We should immediately restart in that case so that the receiver can
> +	 * restart and run in parallel with more packet processing.
> +	 * This lets us handle slightly larger bursts before running
> +	 * out of ring space (assuming dev->weight < ring_size)
> +	 */
>  
>  	if (!restart &&
>  	     (priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ))
>  		    == CPMAC_EOQ &&
>  	     (priv->rx_head->dataflags & CPMAC_OWN) != 0) {
>  		/* reset EOQ so the poll loop (above) doesn't try to
> -		* restart this when it eventually gets to this descriptor.
> -		*/
> +		 * restart this when it eventually gets to this descriptor.
> +		 */
>  		priv->rx_head->prev->dataflags &= ~CPMAC_EOQ;
>  		restart = priv->rx_head;
>  	}
> @@ -506,7 +507,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
>  		       priv->dev->name, received);
>  	if (processed == 0) {
>  		/* we ran out of packets to read,
> -		 * revert to interrupt-driven mode */
> +		 * revert to interrupt-driven mode
> +		 */
>  		napi_complete(napi);
>  		cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
>  		return 0;
> @@ -516,8 +518,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
>  
>  fatal_error:
>  	/* Something went horribly wrong.
> -	 * Reset hardware to try to recover rather than wedging. */
> -
> +	 * Reset hardware to try to recover rather than wedging.
> +	 */
>  	if (netif_msg_drv(priv)) {
>  		printk(KERN_ERR "%s: cpmac_poll is confused. "
>  				"Resetting hardware\n", priv->dev->name);
> @@ -751,7 +753,7 @@ static void cpmac_check_status(struct net_device *dev)
>  	if (rx_code || tx_code) {
>  		if (netif_msg_drv(priv) && net_ratelimit()) {
>  			/* Can't find any documentation on what these
> -			 *error codes actually are. So just log them and hope..
> +			 * error codes actually are. So just log them and hope..
>  			 */
>  			if (rx_code)
>  				printk(KERN_WARNING "%s: host error %d on rx "
> -- 
> 1.7.9.5
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-07-10 13:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10  5:35 [PATCH net v2 0/7] cleanup for AR7 CPMAC Ethernet controller driver varkabhadram
2014-07-10  5:35 ` [PATCH net v2 1/7] net: cpmac: remove space in macro defination varkabhadram
2014-07-10 13:07   ` Felipe Balbi
2014-07-10  5:35 ` [PATCH net v2 2/7] net: cpmac: fix comments varkabhadram
2014-07-10 13:07   ` Felipe Balbi [this message]
2014-07-10  5:35 ` [PATCH net v2 3/7] net: cpmac: dynamic debug fixes varkabhadram
2014-07-10  8:31   ` Joe Perches
2014-07-10  8:45     ` Varka Bhadram
2014-07-10  9:03       ` Joe Perches
2014-07-10  9:35         ` Varka Bhadram
2014-07-10 10:10           ` Joe Perches
2014-07-10 10:11             ` Varka Bhadram
2014-07-10 10:17               ` Joe Perches
2014-07-10 13:08   ` Felipe Balbi
2014-07-10  5:35 ` [PATCH net v2 4/7] net: cpmac: fix cpmac driver structure varkabhadram
2014-07-10 13:08   ` Felipe Balbi
2014-07-10  5:35 ` [PATCH net v2 5/7] net: cpmac: fix missing a blank line after declarations varkabhadram
2014-07-10 13:08   ` Felipe Balbi
2014-07-10  5:35 ` [PATCH net v2 6/7] net: cpmac: fix proper spacing before return statement varkabhadram
2014-07-10 13:09   ` Felipe Balbi
2014-07-10  5:35 ` [PATCH net v2 7/7] net: cpmac: fix in releasing resources varkabhadram
2014-07-10 13:11   ` Felipe Balbi
2014-07-10  7:41 ` [PATCH net v2 0/7] cleanup for AR7 CPMAC Ethernet controller driver 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=20140710130723.GB15340@saruman.home \
    --to=balbi@ti.com \
    --cc=davem@davemloft.net \
    --cc=george.cherian@ti.com \
    --cc=linux@rainbow-software.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=varkab@cdac.in \
    --cc=varkabhadram@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).