Netdev List
 help / color / mirror / Atom feed
* [PATCH v2 1/2] net: core: introduce netif_skb_dev_features
From: Florian Westphal @ 2014-02-13 22:09 UTC (permalink / raw)
  To: netdev; +Cc: Florian Westphal

Will be used by upcoming ipv4 forward path change that needs to
determine feature mask using skb->dst->dev instead of skb->dev.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
Changes since v1:
 no more 'illegal_highdma' discards 'const' qualifier from pointer target type'

 include/linux/netdevice.h |  7 ++++++-
 net/core/dev.c            | 22 ++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 440a02e..21d4e6b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3068,7 +3068,12 @@ void netdev_change_features(struct net_device *dev);
 void netif_stacked_transfer_operstate(const struct net_device *rootdev,
 					struct net_device *dev);
 
-netdev_features_t netif_skb_features(struct sk_buff *skb);
+netdev_features_t netif_skb_dev_features(struct sk_buff *skb,
+					 const struct net_device *dev);
+static inline netdev_features_t netif_skb_features(struct sk_buff *skb)
+{
+	return netif_skb_dev_features(skb, skb->dev);
+}
 
 static inline bool net_gso_ok(netdev_features_t features, int gso_type)
 {
diff --git a/net/core/dev.c b/net/core/dev.c
index 3721db7..afc4e47 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2420,7 +2420,7 @@ EXPORT_SYMBOL(netdev_rx_csum_fault);
  * 2. No high memory really exists on this machine.
  */
 
-static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
+static int illegal_highdma(const struct net_device *dev, struct sk_buff *skb)
 {
 #ifdef CONFIG_HIGHMEM
 	int i;
@@ -2495,34 +2495,36 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features)
 }
 
 static netdev_features_t harmonize_features(struct sk_buff *skb,
-	netdev_features_t features)
+					    const struct net_device *dev,
+					    netdev_features_t features)
 {
 	if (skb->ip_summed != CHECKSUM_NONE &&
 	    !can_checksum_protocol(features, skb_network_protocol(skb))) {
 		features &= ~NETIF_F_ALL_CSUM;
-	} else if (illegal_highdma(skb->dev, skb)) {
+	} else if (illegal_highdma(dev, skb)) {
 		features &= ~NETIF_F_SG;
 	}
 
 	return features;
 }
 
-netdev_features_t netif_skb_features(struct sk_buff *skb)
+netdev_features_t netif_skb_dev_features(struct sk_buff *skb,
+					 const struct net_device *dev)
 {
 	__be16 protocol = skb->protocol;
-	netdev_features_t features = skb->dev->features;
+	netdev_features_t features = dev->features;
 
-	if (skb_shinfo(skb)->gso_segs > skb->dev->gso_max_segs)
+	if (skb_shinfo(skb)->gso_segs > dev->gso_max_segs)
 		features &= ~NETIF_F_GSO_MASK;
 
 	if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) {
 		struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
 		protocol = veh->h_vlan_encapsulated_proto;
 	} else if (!vlan_tx_tag_present(skb)) {
-		return harmonize_features(skb, features);
+		return harmonize_features(skb, dev, features);
 	}
 
-	features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX |
+	features &= (dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX |
 					       NETIF_F_HW_VLAN_STAG_TX);
 
 	if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD))
@@ -2530,9 +2532,9 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
 				NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_CTAG_TX |
 				NETIF_F_HW_VLAN_STAG_TX;
 
-	return harmonize_features(skb, features);
+	return harmonize_features(skb, dev, features);
 }
-EXPORT_SYMBOL(netif_skb_features);
+EXPORT_SYMBOL(netif_skb_dev_features);
 
 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 			struct netdev_queue *txq)
-- 
1.8.1.5

^ permalink raw reply related

* Re: [PATCH net-next] net: remove unnecessary return's
From: Julia Lawall @ 2014-02-13 22:06 UTC (permalink / raw)
  To: Dave Jones; +Cc: Joe Perches, Stephen Hemminger, David Miller, netdev
In-Reply-To: <20140213220021.GA1174@redhat.com>

On Thu, 13 Feb 2014, Dave Jones wrote:

> On Thu, Feb 13, 2014 at 10:55:23PM +0100, Julia Lawall wrote:
> 
>  > The patch below converts label: return; } to label: ; }.  I have only 
>  > scanned through the patches, not patched the code and looked at the 
>  > results, so I am not sure that it is completely correct.  On the other 
>  > hand, I'm also not sure that label: ; } is better than label: return; }, 
>  > either.  If people think it is, then I can cheack the results in more 
>  > detail.
> 
> Why not delete the label, and just replace the goto with a return if
> the label is at the end of the function ?

Good point :)

julia

^ permalink raw reply

* Re: [PATCH regression] dma debug: account for cachelines and read-only mappings in overlap tracking
From: Andrew Morton @ 2014-02-13 22:05 UTC (permalink / raw)
  To: Dan Williams
  Cc: Wei Liu, Eric Dumazet, Konrad Rzeszutek Wilk, netdev,
	linux-kernel, Sander Eikelenboom, Francois Romieu, Dave Jones
In-Reply-To: <20140213215652.22950.12180.stgit@viggo.jf.intel.com>

On Thu, 13 Feb 2014 13:58:00 -0800 Dan Williams <dan.j.williams@intel.com> wrote:

> While debug_dma_assert_idle() checks if a given *page* is actively
> undergoing dma the valid granularity of a dma mapping is a *cacheline*.
> Sander's testing shows that the warning message "DMA-API: exceeded 7
> overlapping mappings of pfn..." is falsely triggering.  The test is
> simply mapping multiple cachelines in a given page.
> 
> Ultimately we want overlap tracking to be valid as it is a real api
> violation, so we need to track active mappings by cachelines.  Update
> the active dma tracking to use the page-frame-relative cacheline of the
> mapping as the key, and update debug_dma_assert_idle() to check for all
> possible mapped cachelines for a given page.
> 
> However, the need to track active mappings is only relevant when the
> dma-mapping is writable by the device.  In fact it is fairly standard
> for read-only mappings to have hundreds or thousands of overlapping
> mappings at once.  Limiting the overlap tracking to writable
> (!DMA_TO_DEVICE) eliminates this class of false-positive overlap
> reports.
> 
> Note, the radix gang lookup is sub-optimal.  It would be best if it
> stopped fetching entries once the search passed a page boundary.
> Nevertheless, this implementation does not perturb the original net_dma
> failing case.  That is to say the extra overhead does not show up in
> terms of making the failing case pass due to a timing change.
> 
> References:
> http://marc.info/?l=linux-netdev&m=139232263419315&w=2
> http://marc.info/?l=linux-netdev&m=139217088107122&w=2
> 
> ...
>
> --- a/lib/dma-debug.c
> +++ b/lib/dma-debug.c
> @@ -424,111 +424,132 @@ void debug_dma_dump_mappings(struct device *dev)
>  EXPORT_SYMBOL(debug_dma_dump_mappings);
>  
>  /*
> - * For each page mapped (initial page in the case of
> - * dma_alloc_coherent/dma_map_{single|page}, or each page in a
> - * scatterlist) insert into this tree using the pfn as the key. At
> + * For each mapping (initial cacheline in the case of
> + * dma_alloc_coherent/dma_map_page, initial cacheline in each page of a
> + * scatterlist, or the cacheline specified in dma_map_single) insert
> + * into this tree using the cacheline as the key. At
>   * dma_unmap_{single|sg|page} or dma_free_coherent delete the entry.  If
> - * the pfn already exists at insertion time add a tag as a reference
> + * the entry already exists at insertion time add a tag as a reference
>   * count for the overlapping mappings.  For now, the overlap tracking
> - * just ensures that 'unmaps' balance 'maps' before marking the pfn
> - * idle, but we should also be flagging overlaps as an API violation.
> + * just ensures that 'unmaps' balance 'maps' before marking the
> + * cacheline idle, but we should also be flagging overlaps as an API
> + * violation.
>   *
>   * Memory usage is mostly constrained by the maximum number of available
>   * dma-debug entries in that we need a free dma_debug_entry before
> - * inserting into the tree.  In the case of dma_map_{single|page} and
> - * dma_alloc_coherent there is only one dma_debug_entry and one pfn to
> - * track per event.  dma_map_sg(), on the other hand,
> - * consumes a single dma_debug_entry, but inserts 'nents' entries into
> - * the tree.
> + * inserting into the tree.  In the case of dma_map_page and
> + * dma_alloc_coherent there is only one dma_debug_entry and one
> + * dma_active_cacheline entry to track per event.  dma_map_sg(), on the
> + * other hand, consumes a single dma_debug_entry, but inserts 'nents'
> + * entries into the tree.
>   *
>   * At any time debug_dma_assert_idle() can be called to trigger a
> - * warning if the given page is in the active set.
> + * warning if any cachelines in the given page are in the active set.
>   */
> -static RADIX_TREE(dma_active_pfn, GFP_NOWAIT);
> +static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT);
>  static DEFINE_SPINLOCK(radix_lock);
> -#define ACTIVE_PFN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
> +#define ACTIVE_CLN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
> +#define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)
> +#define CACHELINES_PER_PAGE (1 << CACHELINE_PER_PAGE_SHIFT)
>  
> -static int active_pfn_read_overlap(unsigned long pfn)
> +unsigned long to_cln(struct dma_debug_entry *entry)
> +{
> +	return (entry->pfn << CACHELINE_PER_PAGE_SHIFT) +
> +		(entry->offset >> L1_CACHE_SHIFT);
> +}

"cln" is ugly and isn't a well-known kernel abbreviation.  We typically
spell these things out, so "cacheline".  But I think you mean
"cacheline number", and that is too long to spell out.

So I guess "cln" just became a well-known kernel abbreviation.

> ....
>
>  void debug_dma_assert_idle(struct page *page)
>  {
> +	unsigned long cln = page_to_pfn(page) << CACHELINE_PER_PAGE_SHIFT;

This worries me.  Are you sure we cannot overflow the ulong here under
any circumstances?  32GB PAE with sparsemem or whatever?

^ permalink raw reply

* Re: [PATCH net-next] net: remove unnecessary return's
From: Dave Jones @ 2014-02-13 22:00 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Joe Perches, Stephen Hemminger, David Miller, netdev
In-Reply-To: <alpine.DEB.2.02.1402132252290.1967@localhost6.localdomain6>

On Thu, Feb 13, 2014 at 10:55:23PM +0100, Julia Lawall wrote:

 > The patch below converts label: return; } to label: ; }.  I have only 
 > scanned through the patches, not patched the code and looked at the 
 > results, so I am not sure that it is completely correct.  On the other 
 > hand, I'm also not sure that label: ; } is better than label: return; }, 
 > either.  If people think it is, then I can cheack the results in more 
 > detail.

Why not delete the label, and just replace the goto with a return if
the label is at the end of the function ?

	Dave

^ permalink raw reply

* [PATCH regression] dma debug: account for cachelines and read-only mappings in overlap tracking
From: Dan Williams @ 2014-02-13 21:58 UTC (permalink / raw)
  To: akpm
  Cc: Wei Liu, Eric Dumazet, Konrad Rzeszutek Wilk, netdev,
	linux-kernel, Sander Eikelenboom, Francois Romieu, Dave Jones

While debug_dma_assert_idle() checks if a given *page* is actively
undergoing dma the valid granularity of a dma mapping is a *cacheline*.
Sander's testing shows that the warning message "DMA-API: exceeded 7
overlapping mappings of pfn..." is falsely triggering.  The test is
simply mapping multiple cachelines in a given page.

Ultimately we want overlap tracking to be valid as it is a real api
violation, so we need to track active mappings by cachelines.  Update
the active dma tracking to use the page-frame-relative cacheline of the
mapping as the key, and update debug_dma_assert_idle() to check for all
possible mapped cachelines for a given page.

However, the need to track active mappings is only relevant when the
dma-mapping is writable by the device.  In fact it is fairly standard
for read-only mappings to have hundreds or thousands of overlapping
mappings at once.  Limiting the overlap tracking to writable
(!DMA_TO_DEVICE) eliminates this class of false-positive overlap
reports.

Note, the radix gang lookup is sub-optimal.  It would be best if it
stopped fetching entries once the search passed a page boundary.
Nevertheless, this implementation does not perturb the original net_dma
failing case.  That is to say the extra overhead does not show up in
terms of making the failing case pass due to a timing change.

References:
http://marc.info/?l=linux-netdev&m=139232263419315&w=2
http://marc.info/?l=linux-netdev&m=139217088107122&w=2

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Dave Jones <davej@redhat.com>
Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 lib/dma-debug.c |  125 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 79 insertions(+), 46 deletions(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 2defd1308b04..320619db176b 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -424,111 +424,132 @@ void debug_dma_dump_mappings(struct device *dev)
 EXPORT_SYMBOL(debug_dma_dump_mappings);
 
 /*
- * For each page mapped (initial page in the case of
- * dma_alloc_coherent/dma_map_{single|page}, or each page in a
- * scatterlist) insert into this tree using the pfn as the key. At
+ * For each mapping (initial cacheline in the case of
+ * dma_alloc_coherent/dma_map_page, initial cacheline in each page of a
+ * scatterlist, or the cacheline specified in dma_map_single) insert
+ * into this tree using the cacheline as the key. At
  * dma_unmap_{single|sg|page} or dma_free_coherent delete the entry.  If
- * the pfn already exists at insertion time add a tag as a reference
+ * the entry already exists at insertion time add a tag as a reference
  * count for the overlapping mappings.  For now, the overlap tracking
- * just ensures that 'unmaps' balance 'maps' before marking the pfn
- * idle, but we should also be flagging overlaps as an API violation.
+ * just ensures that 'unmaps' balance 'maps' before marking the
+ * cacheline idle, but we should also be flagging overlaps as an API
+ * violation.
  *
  * Memory usage is mostly constrained by the maximum number of available
  * dma-debug entries in that we need a free dma_debug_entry before
- * inserting into the tree.  In the case of dma_map_{single|page} and
- * dma_alloc_coherent there is only one dma_debug_entry and one pfn to
- * track per event.  dma_map_sg(), on the other hand,
- * consumes a single dma_debug_entry, but inserts 'nents' entries into
- * the tree.
+ * inserting into the tree.  In the case of dma_map_page and
+ * dma_alloc_coherent there is only one dma_debug_entry and one
+ * dma_active_cacheline entry to track per event.  dma_map_sg(), on the
+ * other hand, consumes a single dma_debug_entry, but inserts 'nents'
+ * entries into the tree.
  *
  * At any time debug_dma_assert_idle() can be called to trigger a
- * warning if the given page is in the active set.
+ * warning if any cachelines in the given page are in the active set.
  */
-static RADIX_TREE(dma_active_pfn, GFP_NOWAIT);
+static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT);
 static DEFINE_SPINLOCK(radix_lock);
-#define ACTIVE_PFN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
+#define ACTIVE_CLN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
+#define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)
+#define CACHELINES_PER_PAGE (1 << CACHELINE_PER_PAGE_SHIFT)
 
-static int active_pfn_read_overlap(unsigned long pfn)
+unsigned long to_cln(struct dma_debug_entry *entry)
+{
+	return (entry->pfn << CACHELINE_PER_PAGE_SHIFT) +
+		(entry->offset >> L1_CACHE_SHIFT);
+}
+
+static int active_cln_read_overlap(unsigned long cln)
 {
 	int overlap = 0, i;
 
 	for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--)
-		if (radix_tree_tag_get(&dma_active_pfn, pfn, i))
+		if (radix_tree_tag_get(&dma_active_cacheline, cln, i))
 			overlap |= 1 << i;
 	return overlap;
 }
 
-static int active_pfn_set_overlap(unsigned long pfn, int overlap)
+static int active_cln_set_overlap(unsigned long cln, int overlap)
 {
 	int i;
 
-	if (overlap > ACTIVE_PFN_MAX_OVERLAP || overlap < 0)
+	if (overlap > ACTIVE_CLN_MAX_OVERLAP || overlap < 0)
 		return overlap;
 
 	for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--)
 		if (overlap & 1 << i)
-			radix_tree_tag_set(&dma_active_pfn, pfn, i);
+			radix_tree_tag_set(&dma_active_cacheline, cln, i);
 		else
-			radix_tree_tag_clear(&dma_active_pfn, pfn, i);
+			radix_tree_tag_clear(&dma_active_cacheline, cln, i);
 
 	return overlap;
 }
 
-static void active_pfn_inc_overlap(unsigned long pfn)
+static void active_cln_inc_overlap(unsigned long cln)
 {
-	int overlap = active_pfn_read_overlap(pfn);
+	int overlap = active_cln_read_overlap(cln);
 
-	overlap = active_pfn_set_overlap(pfn, ++overlap);
+	overlap = active_cln_set_overlap(cln, ++overlap);
 
 	/* If we overflowed the overlap counter then we're potentially
 	 * leaking dma-mappings.  Otherwise, if maps and unmaps are
 	 * balanced then this overflow may cause false negatives in
-	 * debug_dma_assert_idle() as the pfn may be marked idle
+	 * debug_dma_assert_idle() as the cln may be marked idle
 	 * prematurely.
 	 */
-	WARN_ONCE(overlap > ACTIVE_PFN_MAX_OVERLAP,
-		  "DMA-API: exceeded %d overlapping mappings of pfn %lx\n",
-		  ACTIVE_PFN_MAX_OVERLAP, pfn);
+	WARN_ONCE(overlap > ACTIVE_CLN_MAX_OVERLAP,
+		  "DMA-API: exceeded %d overlapping mappings of cln %lx\n",
+		  ACTIVE_CLN_MAX_OVERLAP, cln);
 }
 
-static int active_pfn_dec_overlap(unsigned long pfn)
+static int active_cln_dec_overlap(unsigned long cln)
 {
-	int overlap = active_pfn_read_overlap(pfn);
+	int overlap = active_cln_read_overlap(cln);
 
-	return active_pfn_set_overlap(pfn, --overlap);
+	return active_cln_set_overlap(cln, --overlap);
 }
 
-static int active_pfn_insert(struct dma_debug_entry *entry)
+static int active_cln_insert(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 	int rc;
 
+	/* If the device is not writing memory then we don't have any
+	 * concerns about the cpu consuming stale data.  This mitigates
+	 * legitimate usages of overlapping mappings.
+	 */
+	if (entry->direction == DMA_TO_DEVICE)
+		return 0;
+
 	spin_lock_irqsave(&radix_lock, flags);
-	rc = radix_tree_insert(&dma_active_pfn, entry->pfn, entry);
+	rc = radix_tree_insert(&dma_active_cacheline, to_cln(entry), entry);
 	if (rc == -EEXIST)
-		active_pfn_inc_overlap(entry->pfn);
+		active_cln_inc_overlap(to_cln(entry));
 	spin_unlock_irqrestore(&radix_lock, flags);
 
 	return rc;
 }
 
-static void active_pfn_remove(struct dma_debug_entry *entry)
+static void active_cln_remove(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 
+	/* ...mirror the insert case */
+	if (entry->direction == DMA_TO_DEVICE)
+		return;
+
 	spin_lock_irqsave(&radix_lock, flags);
 	/* since we are counting overlaps the final put of the
-	 * entry->pfn will occur when the overlap count is 0.
-	 * active_pfn_dec_overlap() returns -1 in that case
+	 * cacheline will occur when the overlap count is 0.
+	 * active_cln_dec_overlap() returns -1 in that case
 	 */
-	if (active_pfn_dec_overlap(entry->pfn) < 0)
-		radix_tree_delete(&dma_active_pfn, entry->pfn);
+	if (active_cln_dec_overlap(to_cln(entry)) < 0)
+		radix_tree_delete(&dma_active_cacheline, to_cln(entry));
 	spin_unlock_irqrestore(&radix_lock, flags);
 }
 
 /**
  * debug_dma_assert_idle() - assert that a page is not undergoing dma
- * @page: page to lookup in the dma_active_pfn tree
+ * @page: page to lookup in the dma_active_cacheline tree
  *
  * Place a call to this routine in cases where the cpu touching the page
  * before the dma completes (page is dma_unmapped) will lead to data
@@ -536,22 +557,34 @@ static void active_pfn_remove(struct dma_debug_entry *entry)
  */
 void debug_dma_assert_idle(struct page *page)
 {
+	unsigned long cln = page_to_pfn(page) << CACHELINE_PER_PAGE_SHIFT;
+	static struct dma_debug_entry *ents[CACHELINES_PER_PAGE];
+	struct dma_debug_entry *entry = NULL;
+	void **results = (void **) &ents;
+	unsigned int nents, i;
 	unsigned long flags;
-	struct dma_debug_entry *entry;
 
 	if (!page)
 		return;
 
 	spin_lock_irqsave(&radix_lock, flags);
-	entry = radix_tree_lookup(&dma_active_pfn, page_to_pfn(page));
+	nents = radix_tree_gang_lookup(&dma_active_cacheline, results, cln,
+				       CACHELINES_PER_PAGE);
+	for (i = 0; i < nents; i++) {
+		if (to_cln(ents[i]) == cln) {
+			entry = ents[i];
+			break;
+		} else if (to_cln(ents[i]) >= cln + CACHELINES_PER_PAGE)
+			break;
+	}
 	spin_unlock_irqrestore(&radix_lock, flags);
 
 	if (!entry)
 		return;
 
 	err_printk(entry->dev, entry,
-		   "DMA-API: cpu touching an active dma mapped page "
-		   "[pfn=0x%lx]\n", entry->pfn);
+		   "DMA-API: cpu touching an active dma mapped page [cln=0x%lx]\n",
+		   to_cln(entry));
 }
 
 /*
@@ -568,9 +601,9 @@ static void add_dma_entry(struct dma_debug_entry *entry)
 	hash_bucket_add(bucket, entry);
 	put_hash_bucket(bucket, &flags);
 
-	rc = active_pfn_insert(entry);
+	rc = active_cln_insert(entry);
 	if (rc == -ENOMEM) {
-		pr_err("DMA-API: pfn tracking ENOMEM, dma-debug disabled\n");
+		pr_err("DMA-API: cacheline tracking ENOMEM, dma-debug disabled\n");
 		global_disable = true;
 	}
 
@@ -631,7 +664,7 @@ static void dma_entry_free(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 
-	active_pfn_remove(entry);
+	active_cln_remove(entry);
 
 	/*
 	 * add to beginning of the list - this way the entries are

^ permalink raw reply related

* Re: [PATCH net-next] net: remove unnecessary return's
From: Julia Lawall @ 2014-02-13 21:55 UTC (permalink / raw)
  To: Joe Perches; +Cc: Stephen Hemminger, David Miller, netdev
In-Reply-To: <1392273125.2214.25.camel@joe-AO722>

On Wed, 12 Feb 2014, Joe Perches wrote:

> On Wed, 2014-02-12 at 20:51 -0800, Stephen Hemminger wrote:
> > One of my pet coding style peeves is the practice of
> > adding extra return; at the end of function.
> > Kill several instances of this in network code.
> > I suppose some coccinelle wizardy could do this automatically.
> 
> Maybe, but grep version 2.5.4 will show most of them.
> 
> $ grep-2.5.4 -rP --include=*.[ch] "return;\n}" *
> [...]
> 
> Fixing them has to make sure that there's no
> label before the close brace.
> 
> gcc has to have a statement before the close brace
> of a void return after a label.
> 
> label:
> }
> 
> must be:
> 
> label:
> 	;
> }
> 
> to compile.

The patch below converts label: return; } to label: ; }.  I have only 
scanned through the patches, not patched the code and looked at the 
results, so I am not sure that it is completely correct.  On the other 
hand, I'm also not sure that label: ; } is better than label: return; }, 
either.  If people think it is, then I can cheack the results in more 
detail.

julia


diff -u -p a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -80,7 +80,7 @@ static void __iop13xx_iounmap(volatile v
 	__iounmap(addr);
 
 skip:
-	return;
+	;
 }
 
 void __init iop13xx_init_early(void)
diff -u -p a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -269,7 +269,7 @@ static void __init balloon3_lcd_init(voi
 err2:
 	gpio_free(BALLOON3_GPIO_RUN_BACKLIGHT);
 err:
-	return;
+	;
 }
 #else
 static inline void balloon3_lcd_init(void) {}
diff -u -p a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -577,7 +577,7 @@ static void __init vpac270_lcd_init(void
 err2:
 	gpio_free(GPIO81_VPAC270_BKL_ON);
 err:
-	return;
+	;
 }
 #else
 static inline void vpac270_lcd_init(void) {}
diff -u -p a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -236,7 +236,7 @@ err_set_clk:
 err_pll:
 	clk_put(gclk);
 err_gclk:
-	return;
+	;
 }
 #else
 static void __init atstk1002_setup_extdac(void)
diff -u -p a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c
--- a/arch/avr32/boards/atstk1000/atstk1003.c
+++ b/arch/avr32/boards/atstk1000/atstk1003.c
@@ -103,7 +103,7 @@ err_set_clk:
 err_pll:
 	clk_put(gclk);
 err_gclk:
-	return;
+	;
 }
 #else
 static void __init atstk1003_setup_extdac(void)
diff -u -p a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c
--- a/arch/avr32/boards/atstk1000/atstk1004.c
+++ b/arch/avr32/boards/atstk1000/atstk1004.c
@@ -108,7 +108,7 @@ err_set_clk:
 err_pll:
 	clk_put(gclk);
 err_gclk:
-	return;
+	;
 }
 #else
 static void __init atstk1004_setup_extdac(void)
diff -u -p a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -105,7 +105,7 @@ static void dump_mem(const char *str, co
 	}
 
 out:
-	return;
+	;
 }
 
 static inline int valid_stack_ptr(struct thread_info *tinfo, unsigned long p)
diff -u -p a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
--- a/arch/mips/kvm/kvm_mips.c
+++ b/arch/mips/kvm/kvm_mips.c
@@ -260,7 +260,7 @@ void kvm_arch_commit_memory_region(struc
 		}
 	}
 out:
-	return;
+	;
 }
 
 void kvm_arch_flush_shadow_all(struct kvm *kvm)
diff -u -p a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -328,7 +328,7 @@ asmlinkage void plat_irq_dispatch(void)
 	pr_alert("Spurious IRQ: CAUSE=0x%08x\n", read_c0_status());
 
 out:
-	return;
+	;
 }
 
 static int icu_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
diff -u -p a/arch/powerpc/boot/wii.c b/arch/powerpc/boot/wii.c
--- a/arch/powerpc/boot/wii.c
+++ b/arch/powerpc/boot/wii.c
@@ -134,7 +134,7 @@ static void platform_fixups(void)
 	}
 
 out:
-	return;
+	;
 }
 
 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
diff -u -p a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -750,7 +750,7 @@ debug_unregister(debug_info_t * id)
 	mutex_unlock(&debug_mutex);
 
 out:
-	return;
+	;
 }
 EXPORT_SYMBOL(debug_unregister);
 
diff -u -p a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -116,7 +116,7 @@ void os_free_irq_by_cb(int (*test)(struc
 		i++;
 	}
  out:
-	return;
+	;
 }
 
 int os_get_pollfd(int i)
diff -u -p a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c
--- a/arch/x86/lib/insn.c
+++ b/arch/x86/lib/insn.c
@@ -173,7 +173,7 @@ vex_end:
 	prefixes->got = 1;
 
 err_out:
-	return;
+	;
 }
 
 /**
@@ -226,7 +226,7 @@ end:
 	opcode->got = 1;
 
 err_out:
-	return;
+	;
 }
 
 /**
@@ -264,7 +264,7 @@ void insn_get_modrm(struct insn *insn)
 	modrm->got = 1;
 
 err_out:
-	return;
+	;
 }
 
 
@@ -316,7 +316,7 @@ void insn_get_sib(struct insn *insn)
 	insn->sib.got = 1;
 
 err_out:
-	return;
+	;
 }
 
 
@@ -380,7 +380,7 @@ out:
 	insn->displacement.got = 1;
 
 err_out:
-	return;
+	;
 }
 
 /* Decode moffset16/32/64. Return 0 if failed */
@@ -559,7 +559,7 @@ done:
 	insn->immediate.got = 1;
 
 err_out:
-	return;
+	;
 }
 
 /**
diff -u -p a/crypto/tcrypt.c b/crypto/tcrypt.c
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -401,7 +401,7 @@ out_nooutbuf:
 out_noaxbuf:
 	testmgr_free_buf(xbuf);
 out_noxbuf:
-	return;
+	;
 }
 
 static void test_cipher_speed(const char *algo, int enc, unsigned int sec,
diff -u -p a/drivers/atm/iphase.c b/drivers/atm/iphase.c
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -693,7 +693,7 @@ static void ia_tx_poll (IADEV *iadev) {
     }
     ia_que_tx(iadev);
 out:
-    return;
+    ;
 }
 #if 0
 static void ia_eeprom_put (IADEV *iadev, u32 addr, u_short val)
diff -u -p a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -1056,7 +1056,7 @@ static void push_rxbufs(ns_dev * card, s
 	}
 
 out:
-	return;
+	;
 }
 
 static irqreturn_t ns_irq_handler(int irq, void *dev_id)
diff -u -p a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1795,7 +1795,7 @@ err_2:
 err_1:
   	kfree(id_ldrive);
 err_0:
-	return;
+	;
 }
 
 static void __exit cpqarray_exit(void)
diff -u -p a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2789,7 +2789,7 @@ channel_handler(ipmi_smi_t intf, struct
 		}
 	}
  out:
-	return;
+	;
 }
 
 static void ipmi_poll(ipmi_smi_t intf)
@@ -3924,7 +3924,7 @@ void ipmi_smi_msg_received(ipmi_smi_t
 
 	tasklet_schedule(&intf->recv_tasklet);
  out:
-	return;
+	;
 }
 EXPORT_SYMBOL(ipmi_smi_msg_received);
 
diff -u -p a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -310,7 +310,7 @@ static void ipmi_poweroff_atca(ipmi_user
 	if (atca_oem_poweroff_hook)
 		atca_oem_poweroff_hook(user);
  out:
-	return;
+	;
 }
 
 /*
@@ -434,7 +434,7 @@ static void ipmi_poweroff_cpi1(ipmi_user
 		goto out;
 
  out:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -1098,7 +1098,7 @@ static void ipmi_unregister_watchdog(int
 	watchdog_user = NULL;
 
  out:
-	return;
+	;
 }
 
 #ifdef HAVE_DIE_NMI
diff -u -p a/drivers/clk/clk.c b/drivers/clk/clk.c
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -523,7 +523,7 @@ unlock_out:
 	clk_enable_unlock(flags);
 
 out:
-	return;
+	;
 }
 
 static bool clk_ignore_unused;
diff -u -p a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -736,7 +736,7 @@ void oaktrail_hdmi_setup(struct drm_devi
 free:
 	kfree(hdmi_dev);
 out:
-	return;
+	;
 }
 
 void oaktrail_hdmi_teardown(struct drm_device *dev)
diff -u -p a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -974,7 +974,7 @@ mapped:
 	}
 
 ignore:
-	return;
+	;
 
 }
 
diff -u -p a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -154,7 +154,7 @@ static void wacom_set_image(struct hid_d
 				HID_FEATURE_REPORT);
 
 err:
-	return;
+	;
 }
 
 static void wacom_leds_set_brightness(struct led_classdev *led_dev,
diff -u -p a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c
--- a/drivers/ide/ide-park.c
+++ b/drivers/ide/ide-park.c
@@ -55,7 +55,7 @@ static void issue_park_cmd(ide_drive_t *
 	elv_add_request(q, rq, ELEVATOR_INSERT_FRONT);
 
 out:
-	return;
+	;
 }
 
 ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)
diff -u -p a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -1552,7 +1552,7 @@ vendor_check:
 	}
 
 out:
-	return;
+	;
 }
 
 static struct ib_mad_agent_private *
diff -u -p a/drivers/infiniband/hw/cxgb4/ev.c b/drivers/infiniband/hw/cxgb4/ev.c
--- a/drivers/infiniband/hw/cxgb4/ev.c
+++ b/drivers/infiniband/hw/cxgb4/ev.c
@@ -172,7 +172,7 @@ done:
 		wake_up(&chp->wait);
 	c4iw_qp_rem_ref(&qhp->ibqp);
 out:
-	return;
+	;
 }
 
 int c4iw_ev_handler(struct c4iw_dev *dev, u32 qid)
diff -u -p a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -2613,5 +2613,5 @@ void ipath_user_remove(struct ipath_devd
 		atomic_set(&user_setup, 0);
 	}
 bail:
-	return;
+	;
 }
diff -u -p a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -446,7 +446,7 @@ static void handle_e_ibstatuschanged(str
 skip_ibchange:
 	dd->ipath_lastibcstat = ibcs;
 done:
-	return;
+	;
 }
 
 static void handle_supp_msgs(struct ipath_devdata *dd,
diff -u -p a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -709,7 +709,7 @@ queue_ack:
 	}
 	spin_unlock_irqrestore(&qp->s_lock, flags);
 done:
-	return;
+	;
 }
 
 /**
@@ -835,7 +835,7 @@ void ipath_restart_rc(struct ipath_qp *q
 	ipath_schedule_send(qp);
 
 bail:
-	return;
+	;
 }
 
 static inline void update_last_psn(struct ipath_qp *qp, u32 psn)
@@ -1312,7 +1312,7 @@ ack_err:
 ack_done:
 	spin_unlock_irqrestore(&qp->s_lock, flags);
 bail:
-	return;
+	;
 }
 
 /**
@@ -1965,5 +1965,5 @@ send_ack:
 unlock:
 	spin_unlock_irqrestore(&qp->s_lock, flags);
 done:
-	return;
+	;
 }
diff -u -p a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c
--- a/drivers/infiniband/hw/ipath/ipath_sdma.c
+++ b/drivers/infiniband/hw/ipath/ipath_sdma.c
@@ -355,7 +355,7 @@ resched_noprint:
 unlock:
 	spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags);
 done:
-	return;
+	;
 }
 
 /*
@@ -633,7 +633,7 @@ void ipath_restart_sdma(struct ipath_dev
 	ipath_ib_piobufavail(dd->verbs_dev);
 
 bail:
-	return;
+	;
 }
 
 static inline void make_sdma_desc(struct ipath_devdata *dd,
diff -u -p a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c
--- a/drivers/infiniband/hw/ipath/ipath_uc.c
+++ b/drivers/infiniband/hw/ipath/ipath_uc.c
@@ -543,5 +543,5 @@ void ipath_uc_rcv(struct ipath_ibdev *de
 	qp->r_psn++;
 	qp->r_state = opcode;
 done:
-	return;
+	;
 }
diff -u -p a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -2969,7 +2969,7 @@ static void build_kernel_pbes(struct ib_
 		}
 	}
 mr_tbl_done:
-	return;
+	;
 }
 
 struct ib_mr *ocrdma_reg_kernel_mr(struct ib_pd *ibpd,
diff -u -p a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -1122,7 +1122,7 @@ static void handle_6120_errors(struct qi
 			qib_stats.sps_hdrfull++;
 	}
 done:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/infiniband/hw/qib/qib_iba7220.c b/drivers/infiniband/hw/qib/qib_iba7220.c
--- a/drivers/infiniband/hw/qib/qib_iba7220.c
+++ b/drivers/infiniband/hw/qib/qib_iba7220.c
@@ -1221,7 +1221,7 @@ static void handle_7220_errors(struct qi
 			qib_stats.sps_hdrfull++;
 	}
 done:
-	return;
+	;
 }
 
 /* enable/disable chip from delivering interrupts */
diff -u -p a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -1741,7 +1741,7 @@ static noinline void handle_7322_errors(
 	}
 
 done:
-	return;
+	;
 }
 
 static void qib_error_tasklet(unsigned long data)
@@ -2016,7 +2016,7 @@ static noinline void handle_7322_p_error
 	if (ppd->state_wanted & ppd->lflags)
 		wake_up_interruptible(&ppd->state_wait);
 done:
-	return;
+	;
 }
 
 /* enable/disable chip from delivering interrupts */
diff -u -p a/drivers/infiniband/hw/qib/qib_rc.c b/drivers/infiniband/hw/qib/qib_rc.c
--- a/drivers/infiniband/hw/qib/qib_rc.c
+++ b/drivers/infiniband/hw/qib/qib_rc.c
@@ -768,7 +768,7 @@ queue_ack:
 unlock:
 	spin_unlock_irqrestore(&qp->s_lock, flags);
 done:
-	return;
+	;
 }
 
 /**
@@ -1601,7 +1601,7 @@ ack_err:
 ack_done:
 	spin_unlock_irqrestore(&qp->s_lock, flags);
 bail:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/infiniband/hw/qib/qib_sd7220.c b/drivers/infiniband/hw/qib/qib_sd7220.c
--- a/drivers/infiniband/hw/qib/qib_sd7220.c
+++ b/drivers/infiniband/hw/qib/qib_sd7220.c
@@ -160,7 +160,7 @@ void qib_sd7220_clr_ibpar(struct qib_dev
 		QLOGIC_IB_HWE_IB_UC_MEMORYPARITYERR);
 	qib_read_kreg32(dd, kr_scratch);
 bail:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1926,7 +1926,7 @@ static void srpt_handle_new_iu(struct sr
 
 	srpt_post_recv(ch->sport->sdev, recv_ioctx);
 out:
-	return;
+	;
 }
 
 static void srpt_process_rcv_completion(struct ib_cq *cq,
diff -u -p a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -1037,7 +1037,7 @@ static void device_8607_init(struct pm86
 	device_power_init(chip, pdata);
 	device_codec_init(chip, pdata);
 out:
-	return;
+	;
 }
 
 static void device_8606_init(struct pm860x_chip *chip,
diff -u -p a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c
--- a/drivers/mfd/ab3100-core.c
+++ b/drivers/mfd/ab3100-core.c
@@ -624,7 +624,7 @@ static void ab3100_setup_debugfs(struct
  exit_destroy_dir:
 	debugfs_remove(ab3100_dir);
  exit_no_debugfs:
-	return;
+	;
 }
 static inline void ab3100_remove_debugfs(void)
 {
diff -u -p a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c
--- a/drivers/mtd/maps/vmu-flash.c
+++ b/drivers/mtd/maps/vmu-flash.c
@@ -592,7 +592,7 @@ fail_mpart:
 		MAPLE_FUNC_MEMCARD);
 	kfree(part_cur->name);
 fail_name:
-	return;
+	;
 }
 
 /* Handles very basic info about the flash, queries for details */
diff -u -p a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -1071,7 +1071,7 @@ void gpmi_begin(struct gpmi_nand_data *t
 	udelay(dll_wait_time_in_us);
 
 err_out:
-	return;
+	;
 }
 
 void gpmi_end(struct gpmi_nand_data *this)
diff -u -p a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -1221,7 +1221,7 @@ error3:
 error2:
 	kfree(ftl);
 error1:
-	return;
+	;
 }
 
 /* main interface: device {surprise,} removal */
diff -u -p a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -1396,7 +1396,7 @@ static inline void atl1e_rx_checksum(str
 	}
 
 hw_xsum :
-	return;
+	;
 }
 
 static struct atl1e_rx_page *atl1e_get_rx_page(struct atl1e_adapter *adapter,
diff -u -p a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9815,7 +9815,7 @@ static void bnx2x_period_task(struct wor
 
 	bnx2x_release_phy_lock(bp);
 period_task_exit:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -352,7 +352,7 @@ op_err:
 op_done:
 	bnx2x_vfop_end(bp, vf, vfop);
 op_pending:
-	return;
+	;
 }
 
 static int bnx2x_vfop_qctor_cmd(struct bnx2x *bp,
@@ -447,7 +447,7 @@ op_done:
 		bnx2x_vfop_default(state);
 	}
 op_pending:
-	return;
+	;
 }
 
 static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
@@ -670,7 +670,7 @@ op_done:
 	bnx2x_vfop_credit(bp, vfop, obj);
 	bnx2x_vfop_end(bp, vf, vfop);
 op_pending:
-	return;
+	;
 }
 
 struct bnx2x_vfop_vlan_mac_flags {
@@ -1083,7 +1083,7 @@ op_done:
 		bnx2x_vfop_default(state);
 	}
 op_pending:
-	return;
+	;
 }
 
 static int bnx2x_vfop_qflr_cmd(struct bnx2x *bp,
@@ -1159,7 +1159,7 @@ op_done:
 	kfree(args->mc);
 	bnx2x_vfop_end(bp, vf, vfop);
 op_pending:
-	return;
+	;
 }
 
 int bnx2x_vfop_mcast_cmd(struct bnx2x *bp,
@@ -1240,7 +1240,7 @@ op_done:
 		bnx2x_vfop_default(state);
 	}
 op_pending:
-	return;
+	;
 }
 
 static void bnx2x_vf_prep_rx_mode(struct bnx2x *bp, u8 qid,
@@ -2912,7 +2912,7 @@ op_done:
 	bnx2x_vfop_end(bp, vf, vfop);
 op_pending:
 	/* Not supported at the moment; Exists for macros only */
-	return;
+	;
 }
 
 int bnx2x_vfop_close_cmd(struct bnx2x *bp,
@@ -3014,7 +3014,7 @@ op_done:
 		bnx2x_vfop_default(state);
 	}
 op_pending:
-	return;
+	;
 }
 
 int bnx2x_vfop_release_cmd(struct bnx2x *bp,
diff -u -p a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
@@ -2013,7 +2013,7 @@ void bnx2x_vf_mbx(struct bnx2x *bp, stru
 mbx_error:
 	bnx2x_vf_release(bp, vf, false); /* non blocking */
 mbx_done:
-	return;
+	;
 }
 
 /* propagate local bulletin board to vf */
diff -u -p a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1216,7 +1216,7 @@ static void be_set_rx_mode(struct net_de
 		be_cmd_rx_filter(adapter, IFF_ALLMULTI, ON);
 	}
 done:
-	return;
+	;
 }
 
 static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
diff -u -p a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -2820,7 +2820,7 @@ static void ehea_rereg_mrs(void)
 		}
 	pr_info("re-initializing driver complete\n");
 out:
-	return;
+	;
 }
 
 static void ehea_tx_watchdog(struct net_device *dev)
diff -u -p a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -487,7 +487,7 @@ static void e1000_power_down_phy(struct
 		msleep(1);
 	}
 out:
-	return;
+	;
 }
 
 static void e1000_down_and_stop(struct e1000_adapter *adapter)
@@ -3457,7 +3457,7 @@ rx_ring_summary:
 			readl(adapter->hw.hw_addr + i+8));
 	}
 exit:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -569,7 +569,7 @@ rx_ring_summary:
 	}
 
 exit:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -655,7 +655,7 @@ static void ixgbe_set_fiber_fixed_speed(
 		goto out;
 	}
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -705,7 +705,7 @@ rx_ring_summary:
 	}
 
 exit:
-	return;
+	;
 }
 
 static void ixgbe_release_hw_control(struct ixgbe_adapter *adapter)
diff -u -p a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3187,7 +3187,7 @@ static void myri10ge_set_multicast_list(
 	return;
 
 abort:
-	return;
+	;
 }
 
 static int myri10ge_set_mac_address(struct net_device *dev, void *addr)
diff -u -p a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -1126,7 +1126,7 @@ static void __vxge_hw_blockpool_destroy(
 	}
 	ret = 0;
 exit:
-	return;
+	;
 }
 
 /*
@@ -2311,7 +2311,7 @@ static void vxge_hw_blockpool_block_add(
 
 	req_out = blockpool->req_out;
 exit:
-	return;
+	;
 }
 
 static inline void
@@ -4651,7 +4651,7 @@ static void __vxge_hw_vp_terminate(struc
 	vpath->sw_stats = NULL;
 
 exit:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2265,7 +2265,7 @@ static void rtl_work_func_t(struct work_
 		_rtl8152_set_rx_mode(tp->netdev);
 
 out1:
-	return;
+	;
 }
 
 static int rtl8152_open(struct net_device *netdev)
diff -u -p a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -409,7 +409,7 @@ void i2400m_rx_ctl(struct i2400m *i2400m
 	} else		/* an ack to a CMD, GET or SET */
 		i2400m_rx_ctl_ack(i2400m, payload, size);
 error_check:
-	return;
+	;
 }
 
 
@@ -456,7 +456,7 @@ void i2400m_rx_trace(struct i2400m *i240
 		dev_err(dev, "error sending trace to userspace: %d\n",
 			result);
 error_check:
-	return;
+	;
 }
 
 
diff -u -p a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -660,7 +660,7 @@ static void ar5523_rx_refill_work(struct
 
 	} while (true);
 done:
-	return;
+	;
 }
 
 static void ar5523_cancel_rx_bufs(struct ar5523 *ar)
diff -u -p a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -675,7 +675,7 @@ static void wcn36xx_bss_info_changed(str
 		}
 	}
 out:
-	return;
+	;
 }
 
 /* this is required when using IEEE80211_HW_HAS_RATE_CONTROL */
diff -u -p a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -1397,7 +1397,7 @@ static void dma_rx(struct b43legacy_dmar
 
 	b43legacy_rx(ring->dev, skb, rxhdr);
 drop:
-	return;
+	;
 }
 
 void b43legacy_dma_rx(struct b43legacy_dmaring *ring)
diff -u -p a/drivers/net/wireless/cw1200/txrx.c b/drivers/net/wireless/cw1200/txrx.c
--- a/drivers/net/wireless/cw1200/txrx.c
+++ b/drivers/net/wireless/cw1200/txrx.c
@@ -1223,7 +1223,7 @@ void cw1200_rx_cb(struct cw1200_common *
 
 drop:
 	/* TODO: update failure counters */
-	return;
+	;
 }
 
 /* ******************************************************************** */
diff -u -p a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -1871,7 +1871,7 @@ il_set_ht_add_station(struct il_priv *il
 
 	il->stations[idx].sta.station_flags = sta_flags;
 done:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -796,7 +796,7 @@ void lbs_debugfs_init_one(struct lbs_pri
 	lbs_debug_init(priv);
 #endif
 exit:
-	return;
+	;
 }
 
 void lbs_debugfs_remove_one(struct lbs_private *priv)
diff -u -p a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -510,7 +510,7 @@ static void ezusb_req_queue_run(struct e
 	spin_unlock_irqrestore(&upriv->req_lock, flags);
 
  done:
-	return;
+	;
 }
 
 static void ezusb_req_enqueue_run(struct ezusb_priv *upriv,
@@ -532,7 +532,7 @@ static void ezusb_req_enqueue_run(struct
 	ezusb_req_queue_run(upriv);
 
  done:
-	return;
+	;
 }
 
 static void ezusb_request_out_callback(struct urb *urb)
diff -u -p a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -4103,7 +4103,7 @@ static void wl1271_bss_info_changed_ap(s
 	}
 
 out:
-	return;
+	;
 }
 
 static int wlcore_set_bssid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
@@ -4418,7 +4418,7 @@ static void wl1271_bss_info_changed_sta(
 	}
 
 out:
-	return;
+	;
 }
 
 static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
diff -u -p a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -806,7 +806,7 @@ static void wl3501_esbq_req_free(struct
 	if (this->esbq_req_tail >= this->esbq_req_end)
 		this->esbq_req_tail = this->esbq_req_start;
 out:
-	return;
+	;
 }
 
 static int wl3501_esbq_confirm(struct wl3501_card *this)
diff -u -p a/drivers/power/88pm860x_battery.c b/drivers/power/88pm860x_battery.c
--- a/drivers/power/88pm860x_battery.c
+++ b/drivers/power/88pm860x_battery.c
@@ -527,7 +527,7 @@ static void pm860x_init_battery(struct p
 	info->last_capacity = info->start_soc;
 	dev_dbg(info->dev, "init soc : %d\n", info->last_capacity);
 out:
-	return;
+	;
 }
 
 static void set_temp_threshold(struct pm860x_battery_info *info,
diff -u -p a/drivers/s390/net/ctcm_fsms.c b/drivers/s390/net/ctcm_fsms.c
--- a/drivers/s390/net/ctcm_fsms.c
+++ b/drivers/s390/net/ctcm_fsms.c
@@ -1054,7 +1054,7 @@ static void ctcm_chx_txretry(fsm_instanc
 		}
 	}
 done:
-	return;
+	;
 }
 
 /**
@@ -1590,7 +1590,7 @@ void ctcmpc_chx_rxidle(fsm_instance *fi,
 
 	fsm_event(priv->fsm, DEV_EVENT_RXUP, dev);
 done:
-	return;
+	;
 }
 
 /*
@@ -1734,7 +1734,7 @@ static void ctcmpc_chx_attnbusy(fsm_inst
 				CTCM_FUNTAIL, dev->name, ch->id);
 
 done:
-	return;
+	;
 }
 
 /*
@@ -1847,7 +1847,7 @@ static void ctcmpc_chx_send_sweep(fsm_in
 		ctcm_ccw_check_rc(wch, rc, "send sweep");
 
 done:
-	return;
+	;
 }
 
 
diff -u -p a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1177,7 +1177,7 @@ static void qeth_notify_skbs(struct qeth
 			skb = skb_queue_next(&buf->skb_list, skb);
 	}
 out:
-	return;
+	;
 }
 
 static void qeth_release_skbs(struct qeth_qdio_out_buffer *buf)
@@ -3576,7 +3576,7 @@ static void qeth_qdio_cq_handler(struct
 		card->perf_stats.cq_time += delta_t;
 	}
 out:
-	return;
+	;
 }
 
 void qeth_qdio_input_handler(struct ccw_device *ccwdev, unsigned int qdio_err,
@@ -4709,7 +4709,7 @@ out_offline:
 	if (ddev_offline == 1)
 		ccw_device_set_offline(ddev);
 out:
-	return;
+	;
 }
 
 static inline void qeth_qdio_establish_cq(struct qeth_card *card,
diff -u -p a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c
--- a/drivers/scsi/bfa/bfad_debugfs.c
+++ b/drivers/scsi/bfa/bfad_debugfs.c
@@ -519,7 +519,7 @@ bfad_debugfs_init(struct bfad_port_s *po
 	}
 
 err:
-	return;
+	;
 }
 
 inline void
diff -u -p a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2148,7 +2148,7 @@ csio_hw_configure(struct csio_hw *hw)
 	} /* if not master */
 
 out:
-	return;
+	;
 }
 
 /*
@@ -2218,7 +2218,7 @@ csio_hw_initialize(struct csio_hw *hw)
 free_and_out:
 	mempool_free(mbp, hw->mb_mempool);
 out:
-	return;
+	;
 }
 
 #define PF_INTR_MASK (PFSW | PFCIM)
diff -u -p a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -424,7 +424,7 @@ static void fnic_fcoe_process_vlan_resp(
 	sol_time = jiffies + msecs_to_jiffies(FCOE_CTLR_START_DELAY);
 	mod_timer(&fnic->fip_timer, round_jiffies(sol_time));
 out:
-	return;
+	;
 }
 
 static void fnic_fcoe_start_fcf_disc(struct fnic *fnic)
diff -u -p a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1179,7 +1179,7 @@ force:
 	qla25xx_write_risc_sema_reg(vha, RISC_SEMAPHORE_FORCE_SET);
 
 acquired:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c
--- a/drivers/scsi/qla2xxx/qla_nx2.c
+++ b/drivers/scsi/qla2xxx/qla_nx2.c
@@ -1497,7 +1497,7 @@ exit_read_template_error:
 	vfree(vha->reset_tmplt.buff);
 
 exit_read_reset_template:
-	return;
+	;
 }
 
 void
diff -u -p a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
--- a/drivers/scsi/qla4xxx/ql4_83xx.c
+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
@@ -962,7 +962,7 @@ exit_read_template_error:
 	vfree(ha->reset_tmplt.buff);
 
 exit_read_reset_template:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1819,7 +1819,7 @@ free_stats:
 	dma_free_coherent(&ha->pdev->dev, stats_size, ql_iscsi_stats,
 			  iscsi_stats_dma);
 exit_get_stats:
-	return;
+	;
 }
 
 static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc)
diff -u -p a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -4637,7 +4637,7 @@ out_clrack:
 	OUTL_DSP(np, SCRIPTA_BA(np, clrack));
 	return;
 out_stuck:
-	return;
+	;
 }
 
 /*
@@ -5090,7 +5090,7 @@ static void sym_alloc_lcb_tags (struct s
 
 	return;
 fail:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2740,7 +2740,7 @@ static void ufshcd_async_scan(void *data
 	scsi_scan_host(hba->host);
 	pm_runtime_put_sync(hba->dev);
 out:
-	return;
+	;
 }
 
 static struct scsi_host_template ufshcd_driver_template = {
diff -u -p a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c
--- a/drivers/staging/lustre/lnet/selftest/brw_test.c
+++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
@@ -355,7 +355,7 @@ brw_client_done_rpc(sfw_test_unit_t *tsu
 	}
 
 out:
-	return;
+	;
 }
 
 void
diff -u -p a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c
--- a/drivers/staging/lustre/lustre/llite/llite_close.c
+++ b/drivers/staging/lustre/lustre/llite/llite_close.c
@@ -201,7 +201,7 @@ void ll_ioepoch_close(struct inode *inod
 	ll_done_writing_attr(inode, op_data);
 
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c
--- a/drivers/staging/lustre/lustre/llite/llite_close.c
+++ b/drivers/staging/lustre/lustre/llite/llite_close.c
@@ -201,7 +201,7 @@ void ll_ioepoch_close(struct inode *inod
 	ll_done_writing_attr(inode, op_data);
 
 out:
-	return;
+	;
 }
 
 /**
(sfw_test_unit_t *tsu
 	}
 
 out:
-	return;
+	;
 }
 
 void
diff -u -p a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -2041,7 +2041,7 @@ static void __cvmx_usb_perform_complete(
 					 transaction->urb);
 	kfree(transaction);
 done:
-	return;
+	;
 }
 
 
diff -u -p a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -7700,7 +7700,7 @@ void survey_timer_hdl(struct adapter *pa
 
 
 exit_survey_timer_hdl:
-	return;
+	;
 }
 
 void link_timer_hdl(struct adapter *padapter)
diff -u -p a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -199,7 +199,7 @@ void rtl8188e_HalDmWatchDog(struct adapt
 skip_dm:
 	/*  Check GPIO to determine current RF on/off and Pbc status. */
 	/*  Check Hardware Radio ON/OFF or not */
-	return;
+	;
 }
 
 void rtl8188e_init_dm_priv(struct adapter *Adapter)
diff -u -p a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -955,7 +955,7 @@ static void ReadEFuseByIC(struct adapter
 	Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
 
 exit:
-	return;
+	;
 }
 
 static void ReadEFuse_Pseudo(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest)
diff -u -p a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
--- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
@@ -249,7 +249,7 @@ void rtw_free_netdev(struct net_device *
 	free_netdev(netdev);
 
 RETURN:
-	return;
+	;
 }
 
 int rtw_change_ifname(struct adapter *padapter, const char *ifname)
diff -u -p a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -475,5 +475,5 @@ void r8712_event_handle(struct _adapter
 		event_callback(padapter, (u8 *)peventbuf);
 	pevt_priv->evt_done_cnt++;
 _abort_event_:
-	return;
+	;
 }
diff -u -p a/drivers/staging/rts5139/rts51x_transport.c b/drivers/staging/rts5139/rts51x_transport.c
--- a/drivers/staging/rts5139/rts51x_transport.c
+++ b/drivers/staging/rts5139/rts51x_transport.c
@@ -732,5 +732,5 @@ void rts51x_invoke_transport(struct scsi
 	 * by issuing a port reset.  If that fails, try a class-specific
 	 * device reset. */
 Handle_Errors:
-	return;
+	;
 }
diff -u -p a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -788,7 +788,7 @@ void io_cancel_chnl(struct io_mgr *hio_m
 
 	sm_interrupt_dsp(pio_mgr->bridge_context, MBX_PCPY_CLASS);
 func_end:
-	return;
+	;
 }
 
 
@@ -899,7 +899,7 @@ void io_dpc(unsigned long ref_data)
 	} while (serviced != requested);
 	pio_mgr->dpc_sched = requested;
 func_end:
-	return;
+	;
 }
 
 /*
@@ -964,7 +964,7 @@ void io_request_chnl(struct io_mgr *io_m
 	} else {
 	}
 func_end:
-	return;
+	;
 }
 
 /*
@@ -1136,7 +1136,7 @@ static void input_chnl(struct io_mgr *pi
 		notify_chnl_complete(pchnl, chnl_packet_obj);
 	}
 func_end:
-	return;
+	;
 }
 
 /*
@@ -1271,7 +1271,7 @@ static void notify_chnl_complete(struct
 	/* Notify that IO is complete */
 	ntfy_notify(pchnl->ntfy_obj, DSP_STREAMIOCOMPLETION);
 func_end:
-	return;
+	;
 }
 
 /*
@@ -1355,7 +1355,7 @@ static void output_chnl(struct io_mgr *p
 		ntfy_notify(pchnl->ntfy_obj, DSP_STREAMDONE);
 
 func_end:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -2473,7 +2473,7 @@ static void delete_node(struct node_obje
 	kfree(hnode);
 	hnode = NULL;
 func_end:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3541,7 +3541,7 @@ static void hfa384x_usbin_rx(wlandevice_
 	}
 
 done:
-	return;
+	;
 }
 
 /*----------------------------------------------------------------
diff -u -p a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -332,7 +332,7 @@ static void receive_chars(struct serial_
 		tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
 	tty_flip_buffer_push(&info->tport);
 out:
-	return;
+	;
 }
 
 static void transmit_chars(struct serial_state *info)
diff -u -p a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -470,7 +470,7 @@ static void read_mem32(u32 *buf, const v
 		ptr++;
 	}
 out:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -338,7 +338,7 @@ static void transmit_chars(struct m68k_s
 
 clear_and_return:
 	/* Clear interrupt (should be auto)*/
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -1589,7 +1589,7 @@ static void ch9clearfeature(struct mv_ud
 	if (udc_prime_status(udc, EP_DIR_IN, 0, true))
 		ep0_stall(udc);
 out:
-	return;
+	;
 }
 
 static void ch9setfeature(struct mv_udc *udc, struct usb_ctrlrequest *setup)
@@ -1641,7 +1641,7 @@ static void ch9setfeature(struct mv_udc
 	if (udc_prime_status(udc, EP_DIR_IN, 0, true))
 		ep0_stall(udc);
 out:
-	return;
+	;
 }
 
 static void handle_setup_packet(struct mv_udc *udc, u8 ep_num,
diff -u -p a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
--- a/drivers/usb/mon/mon_main.c
+++ b/drivers/usb/mon/mon_main.c
@@ -302,7 +302,7 @@ static void mon_bus_init(struct usb_bus
 	return;
 
 err_alloc:
-	return;
+	;
 }
 
 static void mon_bus0_init(void)
diff -u -p a/drivers/usb/wusbcore/wa-nep.c b/drivers/usb/wusbcore/wa-nep.c
--- a/drivers/usb/wusbcore/wa-nep.c
+++ b/drivers/usb/wusbcore/wa-nep.c
@@ -251,7 +251,7 @@ static void wa_nep_cb(struct urb *urb)
 		wa_reset_all(wa);
 	}
 out:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -2610,7 +2610,7 @@ static void wa_dti_cb(struct urb *urb)
 		}
 	}
 out:
-	return;
+	;
 }
 
 /*
diff -u -p a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1863,7 +1863,7 @@ static void aty128_bl_init(struct aty128
 	return;
 
 error:
-	return;
+	;
 }
 
 static void aty128_bl_exit(struct backlight_device *bd)
diff -u -p a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2260,7 +2260,7 @@ static void aty_bl_init(struct atyfb_par
 	return;
 
 error:
-	return;
+	;
 }
 
 #ifdef CONFIG_PCI
diff -u -p a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c
--- a/drivers/video/nvidia/nv_backlight.c
+++ b/drivers/video/nvidia/nv_backlight.c
@@ -135,7 +135,7 @@ void nvidia_bl_init(struct nvidia_par *p
 	return;
 
 error:
-	return;
+	;
 }
 
 void nvidia_bl_exit(struct nvidia_par *par)
diff -u -p a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -379,7 +379,7 @@ static void riva_bl_init(struct riva_par
 	return;
 
 error:
-	return;
+	;
 }
 
 static void riva_bl_exit(struct fb_info *info)
diff -u -p a/fs/buffer.c b/fs/buffer.c
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1557,7 +1557,7 @@ void block_invalidatepage(struct page *p
 	if (offset == 0)
 		try_to_release_page(page, 0);
 out:
-	return;
+	;
 }
 EXPORT_SYMBOL(block_invalidatepage);
 
diff -u -p a/fs/coredump.c b/fs/coredump.c
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -676,7 +676,7 @@ fail_unlock:
 fail_creds:
 	put_cred(cred);
 fail:
-	return;
+	;
 }
 
 /*
diff -u -p a/fs/dlm/recover.c b/fs/dlm/recover.c
--- a/fs/dlm/recover.c
+++ b/fs/dlm/recover.c
@@ -808,7 +808,7 @@ static void recover_lvb(struct dlm_rsb *
 		memset(r->res_lvbptr, 0, lvblen);
 	}
  out:
-	return;
+	;
 }
 
 /* All master rsb's flagged RECOVER_CONVERT need to be looked at.  The locks
diff -u -p a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1860,7 +1860,7 @@ static void ecryptfs_encode_for_filename
 		block_num++;
 	}
 out:
-	return;
+	;
 }
 
 static size_t ecryptfs_max_decoded_size(size_t encoded_size)
@@ -1925,7 +1925,7 @@ ecryptfs_decode_from_filename(unsigned c
 	}
 	(*dst_size) = dst_byte_offset;
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/fs/ext3/inode.c b/fs/ext3/inode.c
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -3525,7 +3525,7 @@ void ext3_dirty_inode(struct inode *inod
 	}
 	ext3_journal_stop(handle);
 out:
-	return;
+	;
 }
 
 #if 0
diff -u -p a/fs/ext4/inode.c b/fs/ext4/inode.c
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4959,7 +4959,7 @@ void ext4_dirty_inode(struct inode *inod
 
 	ext4_journal_stop(handle);
 out:
-	return;
+	;
 }
 
 #if 0
diff -u -p a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -64,7 +64,7 @@ void hpfs_del_pos(struct inode *inode, l
 	return;
 	not_f:
 	/*printk("HPFS: warning: position pointer %p->%08x not found\n", pos, (int)*pos);*/
-	return;
+	;
 }
 
 static void for_all_poss(struct inode *inode, void (*f)(loff_t *, loff_t, loff_t),
diff -u -p a/fs/jbd/transaction.c b/fs/jbd/transaction.c
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1682,7 +1682,7 @@ __journal_try_to_free_buffer(journal_t *
 	}
 	spin_unlock(&journal->j_list_lock);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1830,7 +1830,7 @@ __journal_try_to_free_buffer(journal_t *
 	}
 	spin_unlock(&journal->j_list_lock);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -435,7 +435,7 @@ blocked:
 	}
 
 leave:
-	return;
+	;
 }
 
 /* must have NO locks when calling this with res !=NULL * */
diff -u -p a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -1766,7 +1766,7 @@ void ocfs2_open_unlock(struct inode *ino
 				     DLM_LOCK_EX);
 
 out:
-	return;
+	;
 }
 
 static int ocfs2_flock_handle_signal(struct ocfs2_lock_res *lockres,
diff -u -p a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1050,7 +1050,7 @@ bail_unlock_nfs_sync:
 bail_unblock:
 	ocfs2_unblock_signals(&oldset);
 bail:
-	return;
+	;
 }
 
 static void ocfs2_clear_inode(struct inode *inode)
diff -u -p a/fs/proc/base.c b/fs/proc/base.c
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2734,7 +2734,7 @@ static void proc_flush_task_mnt(struct v
 out_put_leader:
 	dput(leader);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -3029,7 +3029,7 @@ static void reiserfs_invalidatepage(stru
 		/* maybe should BUG_ON(!ret); - neilb */
 	}
       out:
-	return;
+	;
 }
 
 static int reiserfs_set_page_dirty(struct page *page)
diff -u -p a/kernel/audit.c b/kernel/audit.c
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1424,7 +1424,7 @@ static void audit_log_vformat(struct aud
 out_va_end:
 	va_end(args2);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/mm/highmem.c b/mm/highmem.c
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -408,7 +408,7 @@ void set_page_address(struct page *page,
 		spin_unlock_irqrestore(&pas->lock, flags);
 	}
 done:
-	return;
+	;
 }
 
 void __init page_address_init(void)
diff -u -p a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -135,7 +135,7 @@ static void hugetlb_cgroup_move_parent(i
 
 	set_hugetlb_cgroup(page, parent);
 out:
-	return;
+	;
 }
 
 /*
diff -u -p a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -1572,7 +1572,7 @@ free_skb:
 free_nc_path:
 	batadv_nc_path_free_ref(nc_path);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -423,7 +423,7 @@ void batadv_interface_rx(struct net_devi
 dropped:
 	kfree_skb(skb);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1216,7 +1216,7 @@ void fib_select_default(struct fib_resul
 		fib_result_assign(res, last_resort);
 	tb->tb_default = last_idx;
 out:
-	return;
+	;
 }
 
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
diff -u -p a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1346,7 +1346,7 @@ void ip_mc_inc_group(struct in_device *i
 	if (!in_dev->dead)
 		ip_rt_multicast_event(in_dev);
 out:
-	return;
+	;
 }
 EXPORT_SYMBOL(ip_mc_inc_group);
 
diff -u -p a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -1172,5 +1172,5 @@ cleanup_subsys:
 	unregister_pernet_subsys(&tcp_net_metrics_ops);
 
 cleanup:
-	return;
+	;
 }
diff -u -p a/net/ipv6/ah6.c b/net/ipv6/ah6.c
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -207,7 +207,7 @@ static void ipv6_rearrange_destopt(struc
 	}
 	/* Note: ok if len == 0 */
 bad:
-	return;
+	;
 }
 #else
 static void ipv6_rearrange_destopt(struct ipv6hdr *iph, struct ipv6_opt_hdr *destopt) {}
diff -u -p a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1007,7 +1007,7 @@ static void ndisc_recv_rs(struct sk_buff
 		neigh_release(neigh);
 	}
 out:
-	return;
+	;
 }
 
 static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt)
diff -u -p a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -125,7 +125,7 @@ static void ipx_remove_socket(struct soc
 	spin_unlock_bh(&intrfc->if_sklist_lock);
 	ipxitf_put(intrfc);
 out:
-	return;
+	;
 }
 
 static void ipx_destroy_socket(struct sock *sk)
diff -u -p a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1347,7 +1347,7 @@ static void l2tp_tunnel_destruct(struct
 	if (sk->sk_destruct)
 		(*sk->sk_destruct)(sk);
 end:
-	return;
+	;
 }
 
 /* When the tunnel is closed, all the attached sessions need to go too.
diff -u -p a/security/tomoyo/audit.c b/security/tomoyo/audit.c
--- a/security/tomoyo/audit.c
+++ b/security/tomoyo/audit.c
@@ -399,7 +399,7 @@ void tomoyo_write_log2(struct tomoyo_req
 	}
 	wake_up(&tomoyo_log_wait);
 out:
-	return;
+	;
 }
 
 /**
diff -u -p a/sound/oss/vidc.c b/sound/oss/vidc.c
--- a/sound/oss/vidc.c
+++ b/sound/oss/vidc.c
@@ -502,7 +502,7 @@ mem_failed:
 mixer_failed:
 	sound_unload_audiodev(adev);
 audio_failed:
-	return;
+	;
 }
 
 static int __init probe_vidc(struct address_info *hw_config)

^ permalink raw reply

* Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe
From: Sander Eikelenboom @ 2014-02-13 21:49 UTC (permalink / raw)
  To: Dan Williams
  Cc: Eric Dumazet, Konrad Rzeszutek Wilk, Wei Liu, Francois Romieu,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Jones,
	Russell King
In-Reply-To: <1392322487.11022.4.camel@dwillia2-mobl2.amr.corp.intel.com>


Thursday, February 13, 2014, 9:14:47 PM, you wrote:

> On Tue, 2014-02-11 at 20:17 -0800, Eric Dumazet wrote:
>> On Tue, 2014-02-11 at 18:07 -0800, Dan Williams wrote:
>> 
>> > The overlap granularity is too large.  Multiple dma_map_single
>> > mappings are allowed to a given page as long as they don't collide on
>> > the same cache line.
>> > 
>> 
>> I am not sure why you try number of mappings of a page.
>> 
>> Try launching 100 concurrent netperf -t TCP_SENFILE
>> 
>> Same page might be mapped more than 100 times, more than 10000 times in
>> some cases.

> Thanks for that test case.

> I updated the fix patch with the following.

> diff --git a/lib/dma-debug.c b/lib/dma-debug.c
> index 42b12740940b..611010df1e9c 100644
> --- a/lib/dma-debug.c
> +++ b/lib/dma-debug.c
> @@ -513,6 +513,13 @@ static int active_cln_insert(struct dma_debug_entry *entry)
>         unsigned long flags;
>         int rc;
>  
> +       /* If the device is not writing memory then we don't have any
> +        * concerns about the cpu consuming stale data.  This mitigates
> +        * legitimate usages of overlapping mappings.
> +        */
+       if (entry->>direction == DMA_TO_DEVICE)
> +               return 0;
> +
>         spin_lock_irqsave(&radix_lock, flags);
>         rc = radix_tree_insert(&dma_active_cacheline, to_cln(entry), entry);
>         if (rc == -EEXIST)
> @@ -526,6 +533,10 @@ static void active_cln_remove(struct dma_debug_entry *entry)
>  {
>         unsigned long flags;
>  
> +       /* ...mirror the insert case */
+       if (entry->>direction == DMA_TO_DEVICE)
> +               return;
> +
>         spin_lock_irqsave(&radix_lock, flags);
>         /* since we are counting overlaps the final put of the
>          * cacheline will occur when the overlap count is 0.


> Sander, barring a negative test result from you I'll send the attached
> patch to Andrew.

Hi Dan,

That seems to effectively suppress the warning, thanks and:

Tested-by; Sander Eikelenboom <linux@eikelenboom.it>

--
Sander

> --
> Dan

^ permalink raw reply

* Re: [net-next 2/5] ixgbe: implement SIOCGHWTSTAMP ioctl
From: Keller, Jacob E @ 2014-02-13 21:46 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Brown, Aaron F, davem@davemloft.net, netdev@vger.kernel.org,
	gospo@redhat.com, sassmann@redhat.com
In-Reply-To: <1392321789.15615.49.camel@deadeye.wl.decadent.org.uk>

On Thu, 2014-02-13 at 20:03 +0000, Ben Hutchings wrote:
> On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
> [...]
> > +int ixgbe_ptp_set_ts_config(struct ixgbe_adapter *adapter, struct ifreq *ifr)
> >  {
> >  	struct ixgbe_hw *hw = &adapter->hw;
> > -	struct hwtstamp_config config;
> > +	struct hwtstamp_config *config = &adapter->tstamp_config;
> >  	u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
> >  	u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
> >  	u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
> >  	bool is_l2 = false;
> >  	u32 regval;
> >  
> > -	if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
> > +	if (copy_from_user(config, ifr->ifr_data, sizeof(*config)))
> >  		return -EFAULT;
> [...]
> 
> This is wrong.  You overwrite the current config before validating it.
> 
> Ben.
> 

Oops. Thanks for the catch. I'll respin this.

Regards,
Jake

^ permalink raw reply

* Re: [PATCH net] tipc: fix message corruption bug for deferred packets
From: David Miller @ 2014-02-13 21:35 UTC (permalink / raw)
  To: erik.hugne; +Cc: netdev, jon.maloy, ying.xue, paul.gortmaker, tipc-discussion
In-Reply-To: <1392115106-16178-1-git-send-email-erik.hugne@ericsson.com>

From: <erik.hugne@ericsson.com>
Date: Tue, 11 Feb 2014 11:38:26 +0100

> From: Erik Hugne <erik.hugne@ericsson.com>
> 
> If a packet received on a link is out-of-sequence, it will be
> placed on a deferred queue and later reinserted in the receive
> path once the preceding packets have been processed. The problem
> with this is that it will be subject to the buffer adjustment from
> link_recv_buf_validate twice. The second adjustment for 20 bytes
> header space will corrupt the packet.
> 
> We solve this by tagging the deferred packets and bail out from
> receive buffer validation for packets that have already been
> subjected to this.
> 
> Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3 0/3] net: stmmac: Add STi GMAC ethernet
From: David Miller @ 2014-02-13 21:25 UTC (permalink / raw)
  To: srinivas.kandagatla
  Cc: netdev, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	rob, linux, stuart.menefy, peppe.cavallaro, devicetree, linux-doc,
	linux-kernel, linux-arm-kernel, kernel
In-Reply-To: <1392112716-30803-1-git-send-email-srinivas.kandagatla@st.com>

From: <srinivas.kandagatla@st.com>
Date: Tue, 11 Feb 2014 09:58:36 +0000

> Dave, Can I request you to take the first patch via net tree for v3.15, I can
> request Arnd or Olof to take the DT patches via the arm-soc tree for v3.15.

Since it's a new driver, I decided to add it to the plain 'net' tree.

Thanks.


^ permalink raw reply

* AX.25
From: folkert @ 2014-02-13 21:08 UTC (permalink / raw)
  To: netdev

Hi,

In my neighbourhood (the Netherlands) I'm trying to make people
enthousiast again for packet radio (AX.25) over CB radio (27mc).

For that I'm setting up a couple of nodes spread out of the netherlands
which I want to interconnect over the internet (untill there is enough
coverage).
Each node has a radio and a pc with a baycom- or soundmodem setup (and
maybe in the future these nice tnc-pi devices).

I've been investigating how to do this. For the distribution over the
internet there's ax25ipd. Documention is a bit sparse though. Also I
could not find how to bridge the ax.25 device of the baycom/sound-modem
and the network device brought up by ax25ipd. It does mention bpqether
module but from the name (and the modinfo output) I concluded that it is
for bridging over ethernet, so not for bridging between two ax.25
devices. Also I did not find anything like "ax25_forward" or so
underneath /proc (like the /proc/sys/net/ipv4/ip_forward we have for
ipv4).
I think I read something about interfacing to TNC devices directly by
ax25ipd but that won't work with baycom- and soundmodems.

I'm capable of developing my own software, I wrote a network sniffer
(in "sysopview") and stuff that creates raw-packets for IP, so how
difficult can ax.25 be?
	My plan is: using pcap sniff each packet from the two network
devices and then using raw sockets feed them to the opposite interface.
Yeah or I could create my own ax25ipd alike program, that does not
matter.
	My question is: apart from the design, is this the way to go?
Should I indeed inject packets using raw ax25 sockets and retrieve them
using pcap? Or also retrieve them using raw sockets? Or is there maybe
even ready-made solution that I overlooked during the lengthy google
search?


regards,

Folkert van Heusden

-- 
MultiTail is a versatile tool for watching logfiles and output of
commands. Filtering, coloring, merging, diff-view, etc.
http://www.vanheusden.com/multitail/
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

^ permalink raw reply

* [PATCH net] net: of_mdio: fix of_set_phy_supported after driver probing
From: Florian Fainelli @ 2014-02-13 21:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, Florian Fainelli

Commit 8fdade4 ("net: of_mdio: parse "max-speed" property to set PHY
supported features") introduced a typo in of_set_phy_supported for the
first assignment of phydev->supported which will not effectively limit
the PHY device supported features bits if the PHY driver contains
"higher" features (e.g: max-speed = <100> and PHY driver has
PHY_GBIT_FEATURES set).

Fix this by making sure that the very first thing is to reset to sane
defaults (PHY_BASIC_FEATURES) and then progressively add speed features
as we parse them.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/of/of_mdio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 875b7b6..495facc 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -24,7 +24,11 @@ MODULE_LICENSE("GPL");
 
 static void of_set_phy_supported(struct phy_device *phydev, u32 max_speed)
 {
-	phydev->supported |= PHY_DEFAULT_FEATURES;
+	/* The default values for phydev->supported are provided by the PHY
+	 * driver "features" member, we want to reset to sane defaults fist
+	 * before supporting higher speeds.
+	 */
+	phydev->supported &= PHY_DEFAULT_FEATURES;
 
 	switch (max_speed) {
 	default:
-- 
1.8.3.2

^ permalink raw reply related

* Re: [PATCH 1/1] Micrel PHY: Allow setting of config flag MICREL_PHY_50MHZ_CLK for KSZ8081/KSZ8091 PHY
From: David Miller @ 2014-02-13 20:59 UTC (permalink / raw)
  To: Georg.Waibel; +Cc: netdev, linux-kernel
In-Reply-To: <E1C9442006A9AE48A7A4B85E0D01C4D4753FB9@stwexdb.stww2k.local>

From: Waibel Georg <Georg.Waibel@sensor-technik.de>
Date: Tue, 11 Feb 2014 08:28:50 +0000

> From fe6aad7bb4c61b3ccd14bf637025e87df05ca14c Mon Sep 17 00:00:00 2001
> From: Georg Waibel <georg.waibel@sensor-technik.de>
> Date: Tue, 11 Feb 2014 08:15:56 +0100
> Subject: [PATCH 1/1] Micrel PHY: Allow setting of config flag MICREL_PHY_50MHZ_CLK for KSZ8081/KSZ8091 PHY
> 
> The Micrel KSZ8081 and KSZ8091 PHYs support the RMII 50MHz mode. In this
> mode, the PHY can be driven by an external 50MHz clock source. This mode
> can be selected by the PHY device flag MICREL_PHY_50MHZ_CLK.
> The driver already supports this feature for the KSZ8051 PHY. Thus, the
> config_init function of this device can be used for the KSZ8081/8091 PHY
> too.
> 
> Signed-off-by: Georg Waibel <georg.waibel@sensor-technik.de>

The only thing in the entire tree which sets MICREL_PHY_50MHZ_CLK is
the apx4devkit_phy_fixup() in arch/arm/mach-mxs/mach-mxs.c, and it
is doing so for an 8051 PHY device.

If you plan to submit a patch which will set this flag in some other
situation, you can submit this patch at the same time.

^ permalink raw reply

* Re: ip_set: protocol %u message -- useful?
From: Jozsef Kadlecsik @ 2014-02-13 20:55 UTC (permalink / raw)
  To: Florian Westphal
  Cc: Ilia Mirkin, Patrick McHardy, Cong Wang, netdev,
	linux-kernel@vger.kernel.org, Vitaly Lavrov
In-Reply-To: <20140213195908.GK25153@breakpoint.cc>

On Thu, 13 Feb 2014, Florian Westphal wrote:

> Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > > Maybe printing "using protocol version X" will make it appear less like
> > > a debugging message referring to packet contents or something similar.
> > 
> > With pr_info it'll still appear in dmesg, and it'll still be "random
> > non-sensical message appears over and over in dmesg" type of
> > situation, to the vast majority of users. Do we need a print every
> > time someone creates a new tcp connection too? I'm still not totally
> > clear on the cause of this message getting printed, but I was seeing
> > it a whole bunch in my configuration...
> 
> Yes, because it erronously got moved into the netns init function.
> 
> And thats what causes the spew.  Moving it back into module init
> function should be enough.

Florian has got right, that'd be the best.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply

* Re: [PATCH] net: fix macvtap type name in Kconfig
From: David Miller @ 2014-02-13 20:49 UTC (permalink / raw)
  To: jlu; +Cc: netdev
In-Reply-To: <1392064851-25879-1-git-send-email-jlu@pengutronix.de>

From: Jan Luebbe <jlu@pengutronix.de>
Date: Mon, 10 Feb 2014 21:40:51 +0100

> The netlink kind (and iproute2 type option) is actually called
> 'macvtap', not 'macvlan'.
> 
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH 1/2] net: core: introduce netif_skb_dev_features
From: David Miller @ 2014-02-13 20:43 UTC (permalink / raw)
  To: fw; +Cc: netdev
In-Reply-To: <1392064537-30646-1-git-send-email-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Mon, 10 Feb 2014 21:35:36 +0100

> @@ -2495,34 +2495,36 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features)
>  }
>  
>  static netdev_features_t harmonize_features(struct sk_buff *skb,
> -	netdev_features_t features)
> +					    const struct net_device *dev,
> +					    netdev_features_t features)
 ...
> -	} else if (illegal_highdma(skb->dev, skb)) {
> +	} else if (illegal_highdma(dev, skb)) {

illegal_highdma() is not prepared to take a "const struct net_device *",
you must have seen the warning in your build.  At least I did.

Please fix this and resubmit this series, thanks.

^ permalink raw reply

* Re: [PATCH net-next v2 01/10] net: phy: add "internal" PHY mode
From: Florian Fainelli @ 2014-02-13 20:41 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Kevin Cernekee, devicetree@vger.kernel.org
In-Reply-To: <20140213.153409.1193335923050383308.davem@davemloft.net>

2014-02-13 12:34 GMT-08:00 David Miller <davem@davemloft.net>:
> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Wed, 12 Feb 2014 21:29:46 -0800
>
>> On some systems, the PHY can be internal, in the same package as the
>> Ethernet MAC, and still be responding to a specific address on the MDIO
>> bus, in that case, the Ethernet MAC might need to know about it to
>> properly configure a port multiplexer to switch to an internal or
>> external PHY. Add a new PHY interface mode for this and update the
>> Device Tree of_get_phy_mode() function to look for it.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> Changes since v1:
>> - rebased against lastest net-next master branch
>
> This is over-engineering.
>
> The only thing that even uses this value is phy_is_internal(), and
> the only user of phy_is_internal() is the generic PHY layer ethtool
> operation for get-settings.
>
> The PHY layer already has a place to indicate whether a PHY is
> internal or not, overriding that using the PHY mode is trouble
> waiting to happen.
>
> Please, just provide some way to propagate this device tree property
> into phy->is_internal.

I just realized that I am able to drop this change completely since I
add a PHY driver for the Ethernet MAC which already flags particular
devices of interest as internal PHYs. This change originally came up
as I needed to know that before probing for the PHY, which can be
resolved by doing some re-ordering.

Thanks for the feedback.
-- 
Florian

^ permalink raw reply

* Re: [PATCH v2] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
From: Ben Hutchings @ 2014-02-13 20:40 UTC (permalink / raw)
  To: Stefan Sørensen; +Cc: mugunthanvnm, davem, netdev
In-Reply-To: <1392301574-24233-1-git-send-email-stefan.sorensen@spectralink.com>

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

On Thu, 2014-02-13 at 15:26 +0100, Stefan Sørensen wrote:
> This patch allows the use of a generic timestamping phy connected
> to the cpsw if CPTS support is not enabled. This also adds support
> of the SIOCGMIIREG and SIOCSMIIREG, and moves handling of SIOCGMIIPHY
> to the generic driver.
> 
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
> ---
> Changes since v1:
>   - Remove SIOCGMIIPHY from cpsw
>   - Mention that SIOCGMIIREG and SIOCSMIIREG support is gained
> 
>  drivers/net/ethernet/ti/cpsw.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 1d860ce..6ecea1d 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -1471,7 +1471,6 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
>  static int cpsw_ndo_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
>  {
>  	struct cpsw_priv *priv = netdev_priv(dev);
> -	struct mii_ioctl_data *data = if_mii(req);
>  	int slave_no = cpsw_slave_index(priv);
>  
>  	if (!netif_running(dev))
> @@ -1484,14 +1483,11 @@ static int cpsw_ndo_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
>  	case SIOCGHWTSTAMP:
>  		return cpsw_hwtstamp_get(dev, req);
>  #endif
> -	case SIOCGMIIPHY:
> -		data->phy_id = priv->slaves[slave_no].phy->addr;
> -		break;
> -	default:
> -		return -ENOTSUPP;
>  	}
>  
> -	return 0;
> +	if (!priv->slaves[slave_no].phy)
> +		return -EINVAL;

Sorry I didn't spot this before - the error code here should be
-EOPNOTSUPP.

(Note this is different from -ENOTSUPP as was used before.  That's an
NFS error code that shouldn't be seen by userland.)

Ben.

> +	return phy_mii_ioctl(priv->slaves[slave_no].phy, req, cmd);
>  }
>  
>  static void cpsw_ndo_tx_timeout(struct net_device *ndev)

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v2 01/10] net: phy: add "internal" PHY mode
From: David Miller @ 2014-02-13 20:34 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, cernekee, devicetree
In-Reply-To: <1392269395-23513-2-git-send-email-f.fainelli@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 12 Feb 2014 21:29:46 -0800

> On some systems, the PHY can be internal, in the same package as the
> Ethernet MAC, and still be responding to a specific address on the MDIO
> bus, in that case, the Ethernet MAC might need to know about it to
> properly configure a port multiplexer to switch to an internal or
> external PHY. Add a new PHY interface mode for this and update the
> Device Tree of_get_phy_mode() function to look for it.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> Changes since v1:
> - rebased against lastest net-next master branch

This is over-engineering.

The only thing that even uses this value is phy_is_internal(), and
the only user of phy_is_internal() is the generic PHY layer ethtool
operation for get-settings.

The PHY layer already has a place to indicate whether a PHY is
internal or not, overriding that using the PHY mode is trouble
waiting to happen.

Please, just provide some way to propagate this device tree property
into phy->is_internal.

^ permalink raw reply

* Re: [RFC PATCH v2 tip 0/7] 64-bit BPF insn set and tracing filters
From: Daniel Borkmann @ 2014-02-13 20:20 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Ingo Molnar, David S. Miller, Steven Rostedt, Peter Zijlstra,
	H. Peter Anvin, Thomas Gleixner, Masami Hiramatsu, Tom Zanussi,
	Jovi Zhangwei, Eric Dumazet, Linus Torvalds, Andrew Morton,
	Frederic Weisbecker, Arnaldo Carvalho de Melo, Pekka Enberg,
	Arjan van de Ven, Christoph Hellwig, linux-kernel, netdev
In-Reply-To: <CAMEtUuza3NuM7L0RnVVgU-MTfjE2M==8wb4UY2TAo0Pg6DKZqA@mail.gmail.com>

On 02/07/2014 02:20 AM, Alexei Starovoitov wrote:
...
> Hi Daniel,

Thanks for your answer and sorry for the late reply.

> Thank you for taking a look. Good questions. I had the same concerns.
> Old BPF was carefully extended in specific places.
> End result may look big at first glance, but every extension has specific
> reason behind it. I tried to explain the reasoning in Documentation/bpf_jit.txt
>
> I'm planning to write an on-the-fly converter from old BPF to BPF64
> when BPF64 manages to demonstrate that it is equally safe.
> It is straight forward to convert. Encoding is very similar.
> Core concepts are the same.
> Try diff include/uapi/linux/filter.h include/linux/bpf.h
> to see how much is reused.
>
> I believe that old BPF outlived itself and BPF64 should
> replace it in all current use cases plus a lot more.
> It just cannot happen at once.
> BPF64 can come in. bpf32->bpf64 converter functioning.
> JIT from bpf64->aarch64 and may be sparc64 needs to be in place.
> Then old bpf can fade away.

Do you see a possibility to integrate your work step by step? That is,
to first integrate the interpreter part only; meaning, to detect "old"
BPF programs e.g. coming from SO_ATTACH_FILTER et al and run them in
compatibility mode while extended BPF is fully integrated and replaces
the old engine in net/core/filter.c. Maybe, "old" programs can be
transformed transparently to the new representation and then would be
good to execute in eBPF. If possible, in such a way that in the first
step JIT compilers won't need any upgrades. Once that is resolved,
JIT compilers could successively migrate, arch by arch, to compile the
new code? And last but not least the existing tools as well for handling
eBPF. I think, if possible, that would be great. Also, I unfortunately
haven't looked into your code too deeply yet due to time constraints,
but I'm wondering e.g. for accessing some skb fields we currently use
the "hack" to "overload" load instructions with negative arguments. Do
we have a sort of "meta" instruction that is extendible in eBPF to avoid
such things in future?

>> First of all, I think it's very interesting work ! I'm just a bit concerned
>> that this _huge_ patchset with 64 bit BPF, or however we call it, will line
>
> Huge?
> kernel is only 2k
> the rest is 6k of userspace LLVM backend where most of it is llvm's
> boilerplate code. GCC backend for BPF is 3k.
> The goal is to have both GCC and LLVM backends to be upstreamed
> when kernel pieces are agreed upon.
> For comparison existing tools/net/bpf* is 2.5k
> but here with 6k we get optimizing compiler from C and assembler.
>
>> up in one row next to the BPF code we currently have and next to new
>> nftables
>> engine and we will end up with three such engines which do quite similar
>> things and are all exposed to user space thus they need to be maintained
>> _forever_, adding up legacy even more. What would be the long-term future
>> use
>> cases where the 64 bit engine comes into place compared to the current BPF
>> engine? What are the concrete killer features? I didn't went through your
>
> killer features vs old bpf are:
> - zero-cost function calls
> - 32-bit vs 64-bit
> - optimizing compiler that can compile C into BPF64
>
> Why call kernel function from BPF?
> So that BPF instruction set has to be extended only once and JITs are
> written only once.
> Over the years many extensions crept into old BPF as 'negative offsets'.
> but JITs don't support all of them and assume bpf input as 'skb' only.
> seccomp is using old bpf, but, because of these limitations, cannot use JIT.
> BPF64 allows seccomp to be JITed, since bpf input is generalized
> as 'struct bpf_context'.
> New 'negative offset' extension for old bpf would mean implementing it in
> JITs of all architectures? Painful, but doable. We can do better.
>
> Fixed instruction set that allows zero-overhead calls into kernel functions
> is much more flexible and extendable in a clean way.
> Take a look at kernel/trace/bpf_trace_callbacks.c
> It is a customization of generic BPF64 core for 'tracing filters'.
> The set of functions for networking and definition of 'bpf_context'
> will be different.
> So BPF64 for tracing need X extensions, BPF64 for networking needs Y
> extensions, but core framework stays the same and JIT stays the same.
>
> How to do zero-overhead call?
> Map BPF registers to native registers one to one
> and have compatible calling convention between BPF and native.
> Then BPF asm code:
> mov R1, 1
> mov R2, 2
> call foo
> will be JITed into x86-64:
> mov rdi, 1
> mov rsi, 2
> call foo
> That makes BPF64 calls into kernel as fast as possible.
> Especially for networking we don't want overhead of FFI mechanisms.
>
> That's why A and X regs and lack of callee-saved regs make old BPF
> impractical to support generic function calls.
>
> BPF64 defines R1-R5 as function arguments and R6-R9 as
> callee-saved, so kernel can natively call into JIT-ed BPF and back
> with no extra argument shuffling.
> gcc/llvm backends know that R6-R9 will be preserved while BPF is
> calling into kernel functions and can make proper optimizations.
> R6-R9 map to rbx-r15 on x86-64. On aarch64 we have
> even more freedom of mapping.
>
>> code
>> in detail, but although we might/could have _some_ performance benefits but
>> at
>> the _huge_ cost of adding complexity. The current BPF I find okay to debug
>> and
>> to follow, but how would be debug'ability of 64 bit programs end up, as you
>> mention, it becomes "unbearably complex"?
>
> "unbearably complex" was the reference to x86 static analyzer :)
> It's difficult to reconstruct and verify control and data flow of x86 asm code.
> Binary compilers do that (like transmeta and others), but that's not suitable
> for kernel.
>
> Both old bpf asm and bpf64 asm code I find equivalent in readability.
>
> clang dropmon.c ...|llc -filetype=asm
> will produce the following bpf64 asm code:
>          mov     r6, r1
>          ldd     r1, 8(r6)
>          std     -8(r10), r1
>          mov     r7, 0
>          mov     r3, r10
>          addi    r3, -8
>          mov     r1, r6
>          mov     r2, r7
>          call    bpf_table_lookup
>          jeqi    r0, 0 goto .LBB0_2
>
> which corresponds to C:
> void dropmon(struct bpf_context *ctx)
> {       void *loc;
>          uint64_t *drop_cnt;
>          loc = (void *)ctx->arg2;
>          drop_cnt = bpf_table_lookup(ctx, 0, &loc);
>          if (drop_cnt) ...
>
> I think restricted C is easier to program and debug.
> Which is another killer feature of bpf64.
>
> Interesting use case would be if some kernel subsystem
> decides to generate BPF64 insns on the fly and JIT them.
> Sort of self-modifieable kernel code.
> It's certainly easier to generate BPF64 binary with macroses
> from linux/bpf.h instead of x86 binary...
> I may be dreaming here :)
>
>> Did you instead consider to
>> replace
>> the current BPF engine instead, and add a sort of built-in compatibility
>> mode for current BPF programs? I think that this would be the way better
>> option to go with instead of adding a new engine next to the other. For
>> maintainability, trying to replace the old one might be harder to do on the
>> short term but better to maintain on the long run for everyone, no?
>
> Exactly. I think on-the-fly converter from bpf32->bpf64 is this built-in
> compatibility layer. I completely agree that replacing bpf32 is hard
> short term, since it will raise too many concerns about
> stability/safety, but long term it's a way to go.

Yes, I agree.

> I'm open to all suggestions on how to make it more generic, useful,
> faster.
>
> Thank you for feedback.

Thank you, must have been really fun to implement this. :)

> Regards,
> Alexei
>

^ permalink raw reply

* Re: ovs inconsistent lock state
From: David Miller @ 2014-02-13 20:23 UTC (permalink / raw)
  To: jiri-rHqAuBHg3fBzbRFIqnYvSA
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20140213200753.GE2829-RDzucLLXGGI88b5SBfVpbw@public.gmane.org>

From: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
Date: Thu, 13 Feb 2014 21:07:53 +0100

> Thu, Feb 13, 2014 at 08:26:54PM CET, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org wrote:
>>From: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>
>>Date: Thu, 13 Feb 2014 19:12:57 +0100
>>
>>>>> [ 3014.524118]  [<ffffffff815eb585>] ? __dev_queue_xmit+0x5/0x6a0
>>  ...
>>> I fail to see where bh is disabled. ovs_dp_process_received_packet() is
>>> called with rcu_read_lock...
>>
>>It happens in __dev_queue_xmit(), which does rcu_read_lock_bh().
> 
> On tx yes. But how about rx? I don't see it there (rx_handler path).
> Maybe I'm missing something.

For this code path they are one in the same.

^ permalink raw reply

* Re: [net-next 5/5] ixgbe: fixup warning regarding max_vfs parameter
From: David Miller @ 2014-02-13 20:20 UTC (permalink / raw)
  To: ben; +Cc: aaron.f.brown, jacob.e.keller, netdev, gospo, sassmann
In-Reply-To: <1392321692.15615.48.camel@deadeye.wl.decadent.org.uk>

From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 13 Feb 2014 20:01:32 +0000

> On Thu, 2014-02-13 at 00:00 -0800, Aaron Brown wrote:
>> From: Jacob Keller <jacob.e.keller@intel.com>
>> 
>> The max_vfs parameter for ixgbe is deprecated in favor of using the
>> sysfs sriov_numvfs field to assign VFs as needed, instead of fixing the
>> value at module load time. The current message only indicates that you
>> should use this, without adequately explaining how to do so.
> 
> I don't think the kernel log is the correct place to put documentation.
> A reference alone should be enough.
> 
> [...]
>> +               e_dev_warn("See 'Documentation/PCI/pci-iov-howto.txt for more information.\n");
> [...]
> 
> This doesn't seem very helpful to non-developers.  You could instead
> give the URL:
> 
> https://www.kernel.org/doc/Documentation/PCI/pci-iov-howto.txt

I even think this is not desirable.  The kernel log isn't supposed to be
a hyper-linked "all the information you could possibly need" repository
for every interesting situation the kernel encounters.

Just say plainly what the problem is, people need a certainly level of
understanding to interpret kernel messages properly.

^ permalink raw reply

* Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe
From: Dave Jones @ 2014-02-13 20:16 UTC (permalink / raw)
  To: Dan Williams
  Cc: Sander Eikelenboom, Konrad Rzeszutek Wilk, Wei Liu,
	Francois Romieu, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <CAPcyv4juAS0ODRPKE-_wXYu5bixLnvsgs3jgo4vzWcatfnyVsw@mail.gmail.com>

On Tue, Feb 11, 2014 at 06:07:10PM -0800, Dan Williams wrote:

 > The overlap granularity is too large.  Multiple dma_map_single
 > mappings are allowed to a given page as long as they don't collide on
 > the same cache line.
 > 
 > 
 > Please try the attached patch to see if it fixes this issue.  Works ok for me.

FWIW, since applying this, I haven't seen the 8169 warnings.

thanks,

	Dave

^ permalink raw reply

* Re: 3.14-mw regression: rtl8169 WARNING: DMA-API: exceeded 7 overlapping mappings of pfn 55ebe
From: Dan Williams @ 2014-02-13 20:14 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Sander Eikelenboom, Konrad Rzeszutek Wilk, Wei Liu,
	Francois Romieu, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Dave Jones, Russell King
In-Reply-To: <1392178661.1752.1.camel@edumazet-glaptop2.roam.corp.google.com>

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

On Tue, 2014-02-11 at 20:17 -0800, Eric Dumazet wrote:
> On Tue, 2014-02-11 at 18:07 -0800, Dan Williams wrote:
> 
> > The overlap granularity is too large.  Multiple dma_map_single
> > mappings are allowed to a given page as long as they don't collide on
> > the same cache line.
> > 
> 
> I am not sure why you try number of mappings of a page.
> 
> Try launching 100 concurrent netperf -t TCP_SENFILE
> 
> Same page might be mapped more than 100 times, more than 10000 times in
> some cases.

Thanks for that test case.

I updated the fix patch with the following.

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 42b12740940b..611010df1e9c 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -513,6 +513,13 @@ static int active_cln_insert(struct dma_debug_entry *entry)
        unsigned long flags;
        int rc;
 
+       /* If the device is not writing memory then we don't have any
+        * concerns about the cpu consuming stale data.  This mitigates
+        * legitimate usages of overlapping mappings.
+        */
+       if (entry->direction == DMA_TO_DEVICE)
+               return 0;
+
        spin_lock_irqsave(&radix_lock, flags);
        rc = radix_tree_insert(&dma_active_cacheline, to_cln(entry), entry);
        if (rc == -EEXIST)
@@ -526,6 +533,10 @@ static void active_cln_remove(struct dma_debug_entry *entry)
 {
        unsigned long flags;
 
+       /* ...mirror the insert case */
+       if (entry->direction == DMA_TO_DEVICE)
+               return;
+
        spin_lock_irqsave(&radix_lock, flags);
        /* since we are counting overlaps the final put of the
         * cacheline will occur when the overlap count is 0.


Sander, barring a negative test result from you I'll send the attached
patch to Andrew.

--
Dan


[-- Attachment #2: fix-dma-debug-overlap-v2.patch --]
[-- Type: text/x-patch, Size: 10506 bytes --]

dma debug: account for cachelines and read-only mappings in overlap tracking

From: Dan Williams <dan.j.williams@intel.com>

While debug_dma_assert_idle() checks if a given *page* is actively
undergoing dma the valid granularity of a dma mapping is a *cacheline*.
Sander's testing shows that the warning message "DMA-API: exceeded 7
overlapping mappings of pfn..." is falsely triggering.  The test is
simply mapping multiple cachelines in a given page.

Ultimately we want overlap tracking to be valid as it is a real api
violation, to that end we need to track active mappings by cachelines.
To this end, update the active dma tracking to use the
page-frame-relative cacheline of the mapping as the key, and update
debug_dma_assert_idle() to check for all possible mapped cachelines for
a given page.  However, this is only a problem when the dma-mapping is
writable by the device.  In fact it is fairly standard for read-only
mappings to have hundreds or thousands of mappings at once.  Limiting
the overlap tracking to writable (!DMA_TO_DEVICE) mappings mitigates
false-positive reports of overlap violations.

Note, the radix gang lookup is sub-optimal.  It would be best if it
stopped fetching entries once the search passed a page boundary.
Nevertheless, this implementation does not perturb the original net_dma
failing case.  That is to say the extra overhead does not show up in
terms of making the failing case pass due to a timing change.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Reported-by: Dave Jones <davej@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 lib/dma-debug.c |  123 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 78 insertions(+), 45 deletions(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 2defd1308b04..611010df1e9c 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -424,111 +424,132 @@ void debug_dma_dump_mappings(struct device *dev)
 EXPORT_SYMBOL(debug_dma_dump_mappings);
 
 /*
- * For each page mapped (initial page in the case of
- * dma_alloc_coherent/dma_map_{single|page}, or each page in a
- * scatterlist) insert into this tree using the pfn as the key. At
+ * For each mapping (initial cacheline in the case of
+ * dma_alloc_coherent/dma_map_page, initial cacheline in each page of a
+ * scatterlist, or the cacheline specified in dma_map_single) insert
+ * into this tree using the cacheline as the key. At
  * dma_unmap_{single|sg|page} or dma_free_coherent delete the entry.  If
- * the pfn already exists at insertion time add a tag as a reference
+ * the entry already exists at insertion time add a tag as a reference
  * count for the overlapping mappings.  For now, the overlap tracking
- * just ensures that 'unmaps' balance 'maps' before marking the pfn
- * idle, but we should also be flagging overlaps as an API violation.
+ * just ensures that 'unmaps' balance 'maps' before marking the
+ * cacheline idle, but we should also be flagging overlaps as an API
+ * violation.
  *
  * Memory usage is mostly constrained by the maximum number of available
  * dma-debug entries in that we need a free dma_debug_entry before
- * inserting into the tree.  In the case of dma_map_{single|page} and
- * dma_alloc_coherent there is only one dma_debug_entry and one pfn to
- * track per event.  dma_map_sg(), on the other hand,
- * consumes a single dma_debug_entry, but inserts 'nents' entries into
- * the tree.
+ * inserting into the tree.  In the case of dma_map_page and
+ * dma_alloc_coherent there is only one dma_debug_entry and one
+ * dma_active_cacheline entry to track per event.  dma_map_sg(), on the
+ * other hand, consumes a single dma_debug_entry, but inserts 'nents'
+ * entries into the tree.
  *
  * At any time debug_dma_assert_idle() can be called to trigger a
- * warning if the given page is in the active set.
+ * warning if any cachelines in the given page are in the active set.
  */
-static RADIX_TREE(dma_active_pfn, GFP_NOWAIT);
+static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT);
 static DEFINE_SPINLOCK(radix_lock);
-#define ACTIVE_PFN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
+#define ACTIVE_CLN_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
+#define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)
+#define CACHELINES_PER_PAGE (1 << CACHELINE_PER_PAGE_SHIFT)
 
-static int active_pfn_read_overlap(unsigned long pfn)
+unsigned long to_cln(struct dma_debug_entry *entry)
+{
+	return (entry->pfn << CACHELINE_PER_PAGE_SHIFT) +
+		(entry->offset >> L1_CACHE_SHIFT);
+}
+
+static int active_cln_read_overlap(unsigned long cln)
 {
 	int overlap = 0, i;
 
 	for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--)
-		if (radix_tree_tag_get(&dma_active_pfn, pfn, i))
+		if (radix_tree_tag_get(&dma_active_cacheline, cln, i))
 			overlap |= 1 << i;
 	return overlap;
 }
 
-static int active_pfn_set_overlap(unsigned long pfn, int overlap)
+static int active_cln_set_overlap(unsigned long cln, int overlap)
 {
 	int i;
 
-	if (overlap > ACTIVE_PFN_MAX_OVERLAP || overlap < 0)
+	if (overlap > ACTIVE_CLN_MAX_OVERLAP || overlap < 0)
 		return overlap;
 
 	for (i = RADIX_TREE_MAX_TAGS - 1; i >= 0; i--)
 		if (overlap & 1 << i)
-			radix_tree_tag_set(&dma_active_pfn, pfn, i);
+			radix_tree_tag_set(&dma_active_cacheline, cln, i);
 		else
-			radix_tree_tag_clear(&dma_active_pfn, pfn, i);
+			radix_tree_tag_clear(&dma_active_cacheline, cln, i);
 
 	return overlap;
 }
 
-static void active_pfn_inc_overlap(unsigned long pfn)
+static void active_cln_inc_overlap(unsigned long cln)
 {
-	int overlap = active_pfn_read_overlap(pfn);
+	int overlap = active_cln_read_overlap(cln);
 
-	overlap = active_pfn_set_overlap(pfn, ++overlap);
+	overlap = active_cln_set_overlap(cln, ++overlap);
 
 	/* If we overflowed the overlap counter then we're potentially
 	 * leaking dma-mappings.  Otherwise, if maps and unmaps are
 	 * balanced then this overflow may cause false negatives in
-	 * debug_dma_assert_idle() as the pfn may be marked idle
+	 * debug_dma_assert_idle() as the cln may be marked idle
 	 * prematurely.
 	 */
-	WARN_ONCE(overlap > ACTIVE_PFN_MAX_OVERLAP,
-		  "DMA-API: exceeded %d overlapping mappings of pfn %lx\n",
-		  ACTIVE_PFN_MAX_OVERLAP, pfn);
+	WARN_ONCE(overlap > ACTIVE_CLN_MAX_OVERLAP,
+		  "DMA-API: exceeded %d overlapping mappings of cln %lx\n",
+		  ACTIVE_CLN_MAX_OVERLAP, cln);
 }
 
-static int active_pfn_dec_overlap(unsigned long pfn)
+static int active_cln_dec_overlap(unsigned long cln)
 {
-	int overlap = active_pfn_read_overlap(pfn);
+	int overlap = active_cln_read_overlap(cln);
 
-	return active_pfn_set_overlap(pfn, --overlap);
+	return active_cln_set_overlap(cln, --overlap);
 }
 
-static int active_pfn_insert(struct dma_debug_entry *entry)
+static int active_cln_insert(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 	int rc;
 
+	/* If the device is not writing memory then we don't have any
+	 * concerns about the cpu consuming stale data.  This mitigates
+	 * legitimate usages of overlapping mappings.
+	 */
+	if (entry->direction == DMA_TO_DEVICE)
+		return 0;
+
 	spin_lock_irqsave(&radix_lock, flags);
-	rc = radix_tree_insert(&dma_active_pfn, entry->pfn, entry);
+	rc = radix_tree_insert(&dma_active_cacheline, to_cln(entry), entry);
 	if (rc == -EEXIST)
-		active_pfn_inc_overlap(entry->pfn);
+		active_cln_inc_overlap(to_cln(entry));
 	spin_unlock_irqrestore(&radix_lock, flags);
 
 	return rc;
 }
 
-static void active_pfn_remove(struct dma_debug_entry *entry)
+static void active_cln_remove(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 
+	/* ...mirror the insert case */
+	if (entry->direction == DMA_TO_DEVICE)
+		return;
+
 	spin_lock_irqsave(&radix_lock, flags);
 	/* since we are counting overlaps the final put of the
-	 * entry->pfn will occur when the overlap count is 0.
-	 * active_pfn_dec_overlap() returns -1 in that case
+	 * cacheline will occur when the overlap count is 0.
+	 * active_cln_dec_overlap() returns -1 in that case
 	 */
-	if (active_pfn_dec_overlap(entry->pfn) < 0)
-		radix_tree_delete(&dma_active_pfn, entry->pfn);
+	if (active_cln_dec_overlap(to_cln(entry)) < 0)
+		radix_tree_delete(&dma_active_cacheline, to_cln(entry));
 	spin_unlock_irqrestore(&radix_lock, flags);
 }
 
 /**
  * debug_dma_assert_idle() - assert that a page is not undergoing dma
- * @page: page to lookup in the dma_active_pfn tree
+ * @page: page to lookup in the dma_active_cacheline tree
  *
  * Place a call to this routine in cases where the cpu touching the page
  * before the dma completes (page is dma_unmapped) will lead to data
@@ -536,14 +557,26 @@ static void active_pfn_remove(struct dma_debug_entry *entry)
  */
 void debug_dma_assert_idle(struct page *page)
 {
+	unsigned long cln = page_to_pfn(page) << CACHELINE_PER_PAGE_SHIFT;
+	static struct dma_debug_entry *ents[CACHELINES_PER_PAGE];
+	struct dma_debug_entry *entry = NULL;
+	void **results = (void **) &ents;
+	unsigned int nents, i;
 	unsigned long flags;
-	struct dma_debug_entry *entry;
 
 	if (!page)
 		return;
 
 	spin_lock_irqsave(&radix_lock, flags);
-	entry = radix_tree_lookup(&dma_active_pfn, page_to_pfn(page));
+	nents = radix_tree_gang_lookup(&dma_active_cacheline, results, cln,
+				       CACHELINES_PER_PAGE);
+	for (i = 0; i < nents; i++) {
+		if (to_cln(ents[i]) == cln) {
+			entry = ents[i];
+			break;
+		} else if (to_cln(ents[i]) >= cln + CACHELINES_PER_PAGE)
+			break;
+	}
 	spin_unlock_irqrestore(&radix_lock, flags);
 
 	if (!entry)
@@ -551,7 +584,7 @@ void debug_dma_assert_idle(struct page *page)
 
 	err_printk(entry->dev, entry,
 		   "DMA-API: cpu touching an active dma mapped page "
-		   "[pfn=0x%lx]\n", entry->pfn);
+		   "[cln=0x%lx]\n", to_cln(entry));
 }
 
 /*
@@ -568,9 +601,9 @@ static void add_dma_entry(struct dma_debug_entry *entry)
 	hash_bucket_add(bucket, entry);
 	put_hash_bucket(bucket, &flags);
 
-	rc = active_pfn_insert(entry);
+	rc = active_cln_insert(entry);
 	if (rc == -ENOMEM) {
-		pr_err("DMA-API: pfn tracking ENOMEM, dma-debug disabled\n");
+		pr_err("DMA-API: cacheline tracking ENOMEM, dma-debug disabled\n");
 		global_disable = true;
 	}
 
@@ -631,7 +664,7 @@ static void dma_entry_free(struct dma_debug_entry *entry)
 {
 	unsigned long flags;
 
-	active_pfn_remove(entry);
+	active_cln_remove(entry);
 
 	/*
 	 * add to beginning of the list - this way the entries are

^ permalink raw reply related

* Re: [PATCH 09/28] Remove ATHEROS_AR231X
From: John W. Linville @ 2014-02-13 20:14 UTC (permalink / raw)
  To: Sergey Ryazanov
  Cc: Oleksij Rempel, Richard Weinberger, Jonathan Bither,
	OpenWrt Development List, Hauke Mehrtens, Jiri Slaby,
	Nick Kossifidis, Luis R. Rodriguez,
	open list:ATHEROS ATH5K WIR..., open list:ATHEROS ATH5K WIR...,
	open-5/S+JYg5SzeELgA04lAiVw,
	list-5/S+JYg5SzeELgA04lAiVw@public.gmane.org:NETWORKING DRIVERS,
	open list, antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Florian Fainelli
In-Reply-To: <CAHNKnsRQp7WLSJNAXEYPTd=qs1DquOfNgKtHES-Utvcy1=FEgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Feb 12, 2014 at 02:50:30PM +0400, Sergey Ryazanov wrote:
> 2014-02-11 3:43 GMT+04:00 Sergey Ryazanov <ryazanov.s.a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > 2014-02-11 2:37 GMT+04:00 Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>:
> >> 2014-02-10 4:38 GMT-08:00 Sergey Ryazanov <ryazanov.s.a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> >>> 2014-02-10 16:17 GMT+04:00 Oleksij Rempel <linux-YEK0n+YFykbzxQdaRaTXBw@public.gmane.org>:
> >>>> Am 10.02.2014 13:05, schrieb Sergey Ryazanov:
> >>>>> 2014-02-10 0:03 GMT+04:00 Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>:
> >>>>>> Am 09.02.2014 20:18, schrieb Hauke Mehrtens:
> >>>>>>> On 02/09/2014 07:47 PM, Richard Weinberger wrote:
> >>>>>>>> The symbol is an orphan, get rid of it.
> >>>>>>>>
> >>>>>>>> Signed-off-by: Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
> >>>>>>>> ---
> >>>>>>>>  drivers/net/wireless/ath/ath5k/Kconfig | 10 +++++-----
> >>>>>>>>  drivers/net/wireless/ath/ath5k/ath5k.h | 28 ----------------------------
> >>>>>>>>  drivers/net/wireless/ath/ath5k/base.c  | 14 --------------
> >>>>>>>>  drivers/net/wireless/ath/ath5k/led.c   |  7 -------
> >>>>>>>>  4 files changed, 5 insertions(+), 54 deletions(-)
> >>>>>>>>
> >>>>>>>
> >>>>>>> This code is used in OpenWrt with an out of tree arch code for the
> >>>>>>> Atheros 231x/531x SoC. [0] I do not think anyone is working on adding
> >>>>>>> this code to mainline Linux kernel, because of lack of time/interest.
> >>>>>>
> >>>>>> Sorry, we don't maintain out of tree code.
> >>>>>>
> >>>>>
> >>>>> Oleksij, Jonathan do you still working to make ar231x devices work
> >>>>> with upstream, since your posts [1, 2]? Or may be someone from OpenWRT
> >>>>> team would like to add upstream support?
> >>>>>
> >>>>> 1. https://lkml.org/lkml/2013/5/13/321
> >>>>> 2. https://lkml.org/lkml/2013/5/13/358
> >>>>>
> >>>>
> >>>> Hi,
> >>>> my current target was to provide barebox and openocd support.
> >>>> - ar2313 is already upstream on barebox.
> >>>> - ar2315-2318 (barebox) awaiting review by Anthony Pavlov.
> >>>> - openocd (EJTAG) support is ready and i'll push it ASUP.
> >>>>
> >>> WOW, Impressive.
> >>
> >> That's a nice toy project, although since there are is an existing
> >> bootloader with sources, I would have shifted the priority towards
> >> getting the kernel support merged such that the bootloader can be used
> >> for something. BTW I sent a few devices to Jonathan, not sure if he
> >> ever got those...
> >>
> >>>
> >>>> I hope Jonathan do kernel part. If not, i can provide some work, since i
> >>>> have testing boards and expiriance on this hardware.
> >>>>
> >>> If you need, I can test kernel part, or even do some porting work. I
> >>> have some AR231x based boards, e.g. Ubnt LS2 and NS2.
> >>
> >> I guess you could start splitting the OpenWrt patches into a format
> >> that makes them suitable for being merged upstream and starting with
> >> the MIPS parts. There might be a bunch of checkpatch.pl cleanup work
> >> to do before getting those submitted.
> >
> > I will do that if Jonathan does not have a working solution, which he
> > would like to push upstream. So, let's wait for his reply.
> >
> 
> John, can you delay the merging of this patch for a few months, I will
> try to prepare the necessary patches to add AR231x architecture to the
> kernel and send them to linux-mips.

OK -- looking forward to your patches.

-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox