linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>, David Miller <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Mathieu Maret <mathieu.maret@gmail.com>,
	Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Subject: linux-next: manual merge of the staging tree with the net-next tree
Date: Thu, 27 Mar 2014 16:09:38 +1100	[thread overview]
Message-ID: <20140327160938.c1a4f9a5df6f93e17b55d3cd@canb.auug.org.au> (raw)

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

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/wlags49_h2/wl_netdev.c between commit 8d4ade284a41
("wlags49_h2: Call dev_kfree/consume_skb_any instead of dev_kfree_skb")
from the net-next tree and commit fed3ffd8f7ef ("staging: wlags49_h2:
reindent wl_netdev.c") (and maybe others) from the staging tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/staging/wlags49_h2/wl_netdev.c
index 69bc0a01ae14,77e4be21e44b..000000000000
--- a/drivers/staging/wlags49_h2/wl_netdev.c
+++ b/drivers/staging/wlags49_h2/wl_netdev.c
@@@ -626,103 -605,105 +605,105 @@@ void wl_tx_timeout(struct net_device *d
   *      1 on error
   *
   ******************************************************************************/
- int wl_send( struct wl_private *lp )
+ int wl_send(struct wl_private *lp)
  {
  
-     int                 status;
-     DESC_STRCT          *desc;
-     WVLAN_LFRAME        *txF = NULL;
-     struct list_head    *element;
-     int                 len;
+ 	int status;
+ 	DESC_STRCT *desc;
+ 	WVLAN_LFRAME *txF = NULL;
+ 	struct list_head *element;
+ 	int len;
      /*------------------------------------------------------------------------*/
  
-     if( lp == NULL ) {
-         DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" );
-         return FALSE;
-     }
-     if( lp->dev == NULL ) {
-         DBG_ERROR( DbgInfo, "net_device struct in wl_private is NULL\n" );
-         return FALSE;
-     }
- 
-     /* Check for the availability of FIDs; if none are available, don't take any
-        frames off the txQ */
-     if( lp->hcfCtx.IFB_RscInd == 0 ) {
-         return FALSE;
-     }
- 
-     /* Reclaim the TxQ Elements and place them back on the free queue */
-     if( !list_empty( &( lp->txQ[0] ))) {
-         element = lp->txQ[0].next;
- 
-         txF = (WVLAN_LFRAME * )list_entry( element, WVLAN_LFRAME, node );
-         if( txF != NULL ) {
-             lp->txF.skb  = txF->frame.skb;
-             lp->txF.port = txF->frame.port;
- 
-             txF->frame.skb  = NULL;
-             txF->frame.port = 0;
- 
-             list_del( &( txF->node ));
-             list_add( element, &( lp->txFree ));
- 
-             lp->txQ_count--;
- 
-             if( lp->txQ_count < TX_Q_LOW_WATER_MARK ) {
-                 if( lp->netif_queue_on == FALSE ) {
-                     DBG_TX( DbgInfo, "Kickstarting Q: %d\n", lp->txQ_count );
-                     netif_wake_queue( lp->dev );
-                     WL_WDS_NETIF_WAKE_QUEUE( lp );
-                     lp->netif_queue_on = TRUE;
-                 }
-             }
-         }
-     }
- 
-     if( lp->txF.skb == NULL ) {
-         return FALSE;
-     }
- 
-     /* If the device has resources (FIDs) available, then Tx the packet */
-     /* Format the TxRequest and send it to the adapter */
-     len = lp->txF.skb->len < ETH_ZLEN ? ETH_ZLEN : lp->txF.skb->len;
- 
-     desc                    = &( lp->desc_tx );
-     desc->buf_addr          = lp->txF.skb->data;
-     desc->BUF_CNT           = len;
-     desc->next_desc_addr    = NULL;
- 
-     status = hcf_send_msg( &( lp->hcfCtx ), desc, lp->txF.port );
- 
-     if( status == HCF_SUCCESS ) {
-         lp->dev->trans_start = jiffies;
- 
-         DBG_TX( DbgInfo, "Transmit...\n" );
- 
-         if( lp->txF.port == HCF_PORT_0 ) {
-             lp->stats.tx_packets++;
-             lp->stats.tx_bytes += lp->txF.skb->len;
-         }
+ 	if (lp == NULL) {
+ 		DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
+ 		return FALSE;
+ 	}
+ 	if (lp->dev == NULL) {
+ 		DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
+ 		return FALSE;
+ 	}
+ 
+ 	/*
+ 	 * Check for the availability of FIDs; if none are available,
+ 	 * don't take any frames off the txQ
+ 	 */
+ 	if (lp->hcfCtx.IFB_RscInd == 0)
+ 		return FALSE;
+ 
+ 	/* Reclaim the TxQ Elements and place them back on the free queue */
+ 	if (!list_empty(&(lp->txQ[0]))) {
+ 		element = lp->txQ[0].next;
+ 
+ 		txF = (WVLAN_LFRAME *) list_entry(element, WVLAN_LFRAME, node);
+ 		if (txF != NULL) {
+ 			lp->txF.skb = txF->frame.skb;
+ 			lp->txF.port = txF->frame.port;
+ 
+ 			txF->frame.skb = NULL;
+ 			txF->frame.port = 0;
+ 
+ 			list_del(&(txF->node));
+ 			list_add(element, &(lp->txFree));
+ 
+ 			lp->txQ_count--;
+ 
+ 			if (lp->txQ_count < TX_Q_LOW_WATER_MARK) {
+ 				if (lp->netif_queue_on == FALSE) {
+ 					DBG_TX(DbgInfo, "Kickstarting Q: %d\n",
+ 					       lp->txQ_count);
+ 					netif_wake_queue(lp->dev);
+ 					WL_WDS_NETIF_WAKE_QUEUE(lp);
+ 					lp->netif_queue_on = TRUE;
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (lp->txF.skb == NULL)
+ 		return FALSE;
+ 
+ 	/* If the device has resources (FIDs) available, then Tx the packet */
+ 	/* Format the TxRequest and send it to the adapter */
+ 	len = lp->txF.skb->len < ETH_ZLEN ? ETH_ZLEN : lp->txF.skb->len;
+ 
+ 	desc = &(lp->desc_tx);
+ 	desc->buf_addr = lp->txF.skb->data;
+ 	desc->BUF_CNT = len;
+ 	desc->next_desc_addr = NULL;
+ 
+ 	status = hcf_send_msg(&(lp->hcfCtx), desc, lp->txF.port);
+ 
+ 	if (status == HCF_SUCCESS) {
+ 		lp->dev->trans_start = jiffies;
+ 
+ 		DBG_TX(DbgInfo, "Transmit...\n");
  
+ 		if (lp->txF.port == HCF_PORT_0) {
+ 			lp->stats.tx_packets++;
+ 			lp->stats.tx_bytes += lp->txF.skb->len;
+ 		}
  #ifdef USE_WDS
-         else
-         {
-             lp->wds_port[(( lp->txF.port >> 8 ) - 1)].stats.tx_packets++;
-             lp->wds_port[(( lp->txF.port >> 8 ) - 1)].stats.tx_bytes += lp->txF.skb->len;
-         }
+ 		else {
+ 			lp->wds_port[((lp->txF.port >> 8) -
+ 				      1)].stats.tx_packets++;
+ 			lp->wds_port[((lp->txF.port >> 8) -
+ 				      1)].stats.tx_bytes += lp->txF.skb->len;
+ 		}
  
- #endif  /* USE_WDS */
+ #endif /* USE_WDS */
  
-         /* Free the skb and perform queue cleanup, as the buffer was
-             transmitted successfully */
-         dev_consume_skb_any( lp->txF.skb );
+ 		/* Free the skb and perform queue cleanup, as the buffer was
+ 		   transmitted successfully */
 -		dev_kfree_skb(lp->txF.skb);
++		dev_consume_skb_any(lp->txF.skb);
  
-         lp->txF.skb = NULL;
-         lp->txF.port = 0;
-     }
+ 		lp->txF.skb = NULL;
+ 		lp->txF.port = 0;
+ 	}
+ 
+ 	return TRUE;
+ }				/* wl_send */
  
-     return TRUE;
- } // wl_send
  /*============================================================================*/
  
  /*******************************************************************************
@@@ -1695,70 -1715,71 +1715,71 @@@ void wl_wds_netif_carrier_off(struct wl
   *      1 on error
   *
   ******************************************************************************/
- int wl_send_dma( struct wl_private *lp, struct sk_buff *skb, int port )
+ int wl_send_dma(struct wl_private *lp, struct sk_buff *skb, int port)
  {
-     int         len;
-     DESC_STRCT *desc = NULL;
-     DESC_STRCT *desc_next = NULL;
+ 	int len;
+ 	DESC_STRCT *desc = NULL;
+ 	DESC_STRCT *desc_next = NULL;
      /*------------------------------------------------------------------------*/
  
-     if( lp == NULL ) {
-         DBG_ERROR( DbgInfo, "Private adapter struct is NULL\n" );
-         return FALSE;
-     }
+ 	if (lp == NULL) {
+ 		DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
+ 		return FALSE;
+ 	}
  
-     if( lp->dev == NULL ) {
-         DBG_ERROR( DbgInfo, "net_device struct in wl_private is NULL\n" );
-         return FALSE;
-     }
+ 	if (lp->dev == NULL) {
+ 		DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
+ 		return FALSE;
+ 	}
  
-     /* AGAIN, ALL THE QUEUEING DONE HERE IN I/O MODE IS NOT PERFORMED */
+ 	/* AGAIN, ALL THE QUEUEING DONE HERE IN I/O MODE IS NOT PERFORMED */
  
-     if( skb == NULL ) {
-         DBG_WARNING (DbgInfo, "Nothing to send.\n");
-         return FALSE;
-     }
+ 	if (skb == NULL) {
+ 		DBG_WARNING(DbgInfo, "Nothing to send.\n");
+ 		return FALSE;
+ 	}
  
-     len = skb->len;
+ 	len = skb->len;
  
-     /* Get a free descriptor */
-     desc = wl_pci_dma_get_tx_packet( lp );
+ 	/* Get a free descriptor */
+ 	desc = wl_pci_dma_get_tx_packet(lp);
  
-     if( desc == NULL ) {
-         if( lp->netif_queue_on == TRUE ) {
-             netif_stop_queue( lp->dev );
-             WL_WDS_NETIF_STOP_QUEUE( lp );
-             lp->netif_queue_on = FALSE;
+ 	if (desc == NULL) {
+ 		if (lp->netif_queue_on == TRUE) {
+ 			netif_stop_queue(lp->dev);
+ 			WL_WDS_NETIF_STOP_QUEUE(lp);
+ 			lp->netif_queue_on = FALSE;
  
-             dev_kfree_skb_any( skb );
-             return 0;
-         }
-     }
 -			dev_kfree_skb(skb);
++			dev_kfree_skb_any(skb);
+ 			return 0;
+ 		}
+ 	}
+ 
+ 	SET_BUF_CNT(desc, /*HCF_DMA_FD_CNT */ HFS_ADDR_DEST);
+ 	SET_BUF_SIZE(desc, HCF_DMA_TX_BUF1_SIZE);
  
-     SET_BUF_CNT( desc, /*HCF_DMA_FD_CNT*/HFS_ADDR_DEST );
-     SET_BUF_SIZE( desc, HCF_DMA_TX_BUF1_SIZE );
+ 	desc_next = desc->next_desc_addr;
  
-     desc_next = desc->next_desc_addr;
+ 	if (desc_next->buf_addr == NULL) {
+ 		DBG_ERROR(DbgInfo, "DMA descriptor buf_addr is NULL\n");
+ 		return FALSE;
+ 	}
  
-     if( desc_next->buf_addr == NULL ) {
-         DBG_ERROR( DbgInfo, "DMA descriptor buf_addr is NULL\n" );
-         return FALSE;
-     }
+ 	/* Copy the payload into the DMA packet */
+ 	memcpy(desc_next->buf_addr, skb->data, len);
  
-     /* Copy the payload into the DMA packet */
-     memcpy( desc_next->buf_addr, skb->data, len );
+ 	SET_BUF_CNT(desc_next, len);
+ 	SET_BUF_SIZE(desc_next, HCF_MAX_PACKET_SIZE);
  
-     SET_BUF_CNT( desc_next, len );
-     SET_BUF_SIZE( desc_next, HCF_MAX_PACKET_SIZE );
+ 	hcf_dma_tx_put(&(lp->hcfCtx), desc, 0);
  
-     hcf_dma_tx_put( &( lp->hcfCtx ), desc, 0 );
+ 	/* Free the skb and perform queue cleanup, as the buffer was
+ 	   transmitted successfully */
 -	dev_kfree_skb(skb);
++	dev_consume_skb_any(skb);
  
-     /* Free the skb and perform queue cleanup, as the buffer was
-             transmitted successfully */
-     dev_consume_skb_any( skb );
+ 	return TRUE;
+ }				/* wl_send_dma */
  
-     return TRUE;
- } // wl_send_dma
  /*============================================================================*/
  
  /*******************************************************************************

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

             reply	other threads:[~2014-03-27  5:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27  5:09 Stephen Rothwell [this message]
2014-03-27 19:14 ` linux-next: manual merge of the staging tree with the net-next tree Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2023-10-23  3:47 Stephen Rothwell
2023-10-23  7:27 ` Greg KH
2021-08-02 23:33 Mark Brown
2021-08-03  8:57 ` Phillip Potter
2021-08-03  9:23   ` Arnd Bergmann
2021-08-09  7:55     ` Stephen Rothwell
2021-08-09 12:46       ` Phillip Potter
2021-08-09 20:00         ` Arnd Bergmann
2021-08-09 21:45           ` Phillip Potter
2019-02-28  4:52 Stephen Rothwell
2019-02-28  7:04 ` Greg KH
2018-03-15  7:35 Stephen Rothwell
2016-12-07  4:04 Stephen Rothwell
2016-12-07  7:02 ` Greg KH
2016-11-24  3:42 Stephen Rothwell
2016-10-21  1:21 Stephen Rothwell
2014-07-16  6:43 Stephen Rothwell
2014-07-16 20:52 ` Greg KH
2014-05-28  8:28 Stephen Rothwell
2014-05-28 15:49 ` Greg KH
2014-03-17  8:08 Stephen Rothwell
2014-03-17 18:30 ` Greg KH
2013-05-29  4:14 Stephen Rothwell
2013-05-29  8:03 ` Greg KH
2013-01-23  4:45 Stephen Rothwell
2013-01-23  4:52 ` Greg KH
2011-10-25  8:26 Stephen Rothwell

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=20140327160938.c1a4f9a5df6f93e17b55d3cd@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=jelena.bjelja.ing@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mathieu.maret@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).