<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/netlogic, branch v4.11</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>net: Remove usage of net_device last_rx member</title>
<updated>2017-01-18T22:22:49+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2017-01-18T16:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a7c972644c1151f6dd34ff4b5f7eacb239e22ee'/>
<id>4a7c972644c1151f6dd34ff4b5f7eacb239e22ee</id>
<content type='text'>
The network stack no longer uses the last_rx member of struct net_device
since the bonding driver switched to use its own private last_rx in
commit 9f242738376d ("bonding: use last_arp_rx in slave_last_rx()").

However, some drivers still (ab)use the field for their own purposes and
some driver just update it without actually using it.

Previously, there was an accompanying comment for the last_rx member
added in commit 4dc89133f49b ("net: add a comment on netdev-&gt;last_rx")
which asked drivers not to update is, unless really needed. However,
this commend was removed in commit f8ff080dacec ("bonding: remove
useless updating of slave-&gt;dev-&gt;last_rx"), so some drivers added later
on still did update last_rx.

Remove all usage of last_rx and switch three drivers (sky2, atp and
smc91c92_cs) which actually read and write it to use their own private
copy in netdev_priv.

Compile-tested with allyesconfig and allmodconfig on x86 and arm.

Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
Cc: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Cc: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Cc: Mirko Lindner &lt;mlindner@marvell.com&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Jay Vosburgh &lt;jay.vosburgh@canonical.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The network stack no longer uses the last_rx member of struct net_device
since the bonding driver switched to use its own private last_rx in
commit 9f242738376d ("bonding: use last_arp_rx in slave_last_rx()").

However, some drivers still (ab)use the field for their own purposes and
some driver just update it without actually using it.

Previously, there was an accompanying comment for the last_rx member
added in commit 4dc89133f49b ("net: add a comment on netdev-&gt;last_rx")
which asked drivers not to update is, unless really needed. However,
this commend was removed in commit f8ff080dacec ("bonding: remove
useless updating of slave-&gt;dev-&gt;last_rx"), so some drivers added later
on still did update last_rx.

Remove all usage of last_rx and switch three drivers (sky2, atp and
smc91c92_cs) which actually read and write it to use their own private
copy in netdev_priv.

Compile-tested with allyesconfig and allmodconfig on x86 and arm.

Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
Cc: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Cc: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Cc: Mirko Lindner &lt;mlindner@marvell.com&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Jay Vosburgh &lt;jay.vosburgh@canonical.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: make ndo_get_stats64 a void function</title>
<updated>2017-01-08T22:51:44+00:00</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2017-01-07T03:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221'/>
<id>bc1f44709cf27fb2a5766cadafe7e2ad5e9cb221</id>
<content type='text'>
The network device operation for reading statistics is only called
in one place, and it ignores the return value. Having a structure
return value is potentially confusing because some future driver could
incorrectly assume that the return value was used.

Fix all drivers with ndo_get_stats64 to have a void function.

Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The network device operation for reading statistics is only called
in one place, and it ignores the return value. Having a structure
return value is potentially confusing because some future driver could
incorrectly assume that the return value was used.

Fix all drivers with ndo_get_stats64 to have a void function.

Signed-off-by: Stephen Hemminger &lt;sthemmin@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: netlogic: Compress return logic into one line</title>
<updated>2016-10-16T08:27:33+00:00</updated>
<author>
<name>Mihaela Muraru</name>
<email>mihaela.muraru21@gmail.com</email>
</author>
<published>2016-10-13T16:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1cbe7adb9c6d10830494e81f2867858da2fd4c53'/>
<id>1cbe7adb9c6d10830494e81f2867858da2fd4c53</id>
<content type='text'>
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret;

Signed-off-by: Mihaela Muraru &lt;mihaela.muraru21@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret;

Signed-off-by: Mihaela Muraru &lt;mihaela.muraru21@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: net: netlogic: use new api ethtool_{get|set}_link_ksettings</title>
<updated>2016-10-16T08:25:57+00:00</updated>
<author>
<name>Philippe Reynes</name>
<email>tremyfr@gmail.com</email>
</author>
<published>2016-10-09T13:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f7417a55104cb0ecdf86a1c0ca89b09b4f2c70ec'/>
<id>f7417a55104cb0ecdf86a1c0ca89b09b4f2c70ec</id>
<content type='text'>
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ethtool api {get|set}_settings is deprecated.
We move this driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes &lt;tremyfr@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: netlogic: Remove unused function</title>
<updated>2016-09-16T08:10:34+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2016-09-15T14:17:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=30fde3a91ce7c0ea61f1b672e256d574b53f132f'/>
<id>30fde3a91ce7c0ea61f1b672e256d574b53f132f</id>
<content type='text'>
The function xlr_wakeup_queue is not used anywhere in the kernel.
Therefore, remove it. The static unused functions were detected
using Coccinelle but the change was done by hand.
Script used:

@initialize:python@
@@
def display(name,p):
	print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func &lt;&lt; r1.func;
p &lt;&lt; r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function xlr_wakeup_queue is not used anywhere in the kernel.
Therefore, remove it. The static unused functions were detected
using Coccinelle but the change was done by hand.
Script used:

@initialize:python@
@@
def display(name,p):
	print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func &lt;&lt; r1.func;
p &lt;&lt; r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: netlogic: Make net_device_ops const</title>
<updated>2016-09-13T13:01:29+00:00</updated>
<author>
<name>Mike Kofron</name>
<email>mpkofron@gmail.com</email>
</author>
<published>2016-09-12T18:23:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8b70d6961f03483a7c9db9aecba2c3b3b467cce2'/>
<id>8b70d6961f03483a7c9db9aecba2c3b3b467cce2</id>
<content type='text'>
This patch fixes the checkpatch.pl warning:

WARNING: struct net_device_ops should normally be const

Signed-off-by: Mike Kofron &lt;mpkofron@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the checkpatch.pl warning:

WARNING: struct net_device_ops should normally be const

Signed-off-by: Mike Kofron &lt;mpkofron@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: netlogic: constify ethtool_ops structures</title>
<updated>2016-09-01T15:36:33+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-08-31T22:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=608bc9562a4633eb9b0068246384858ea3862618'/>
<id>608bc9562a4633eb9b0068246384858ea3862618</id>
<content type='text'>
Check for ethtool_ops structures that are only stored in the ethtool_ops
field of a net_device structure or passed as the second argument to
netdev_set_default_ethtool_ops.  These contexts are declared const, so
ethtool_ops structures that have these properties can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &amp;i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &amp;i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct ethtool_ops i = { ... };
// &lt;/smpl&gt;

Suggested-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check for ethtool_ops structures that are only stored in the ethtool_ops
field of a net_device structure or passed as the second argument to
netdev_set_default_ethtool_ops.  These contexts are declared const, so
ethtool_ops structures that have these properties can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &amp;i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &amp;i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct ethtool_ops i = { ... };
// &lt;/smpl&gt;

Suggested-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: netlogic: Remove &amp; from function name.</title>
<updated>2016-03-28T14:30:36+00:00</updated>
<author>
<name>Sandhya Bankar</name>
<email>bankarsandhya512@gmail.com</email>
</author>
<published>2016-03-19T06:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=968b4e6bd3b00c3c05715f916e27439ff71c737d'/>
<id>968b4e6bd3b00c3c05715f916e27439ff71c737d</id>
<content type='text'>
Remove &amp; from function name,when function name passed as an argument to another function.
Function name is used as pointer without &amp;.

Signed-off-by: Sandhya Bankar &lt;bankarsandhya512@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove &amp; from function name,when function name passed as an argument to another function.
Function name is used as pointer without &amp;.

Signed-off-by: Sandhya Bankar &lt;bankarsandhya512@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc</title>
<updated>2016-03-12T06:14:06+00:00</updated>
<author>
<name>G Pooja Shamili</name>
<email>poojashamili@gmail.com</email>
</author>
<published>2016-03-11T23:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0b204161eecf813e13a3ee169b1e21dfe9d9ed35'/>
<id>0b204161eecf813e13a3ee169b1e21dfe9d9ed35</id>
<content type='text'>
The function devm_kzalloc has a first argument of type struct device *.
This is the type of argument required by printing functions such as
dev_info, dev_err, etc. Thus, functions like pr_info should not
normally be used after a call to devm_kzalloc. Thus, all pr_err occurances are
replaced with dev_err function calls

Signed-off-by: G Pooja Shamili &lt;poojashamili@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function devm_kzalloc has a first argument of type struct device *.
This is the type of argument required by printing functions such as
dev_info, dev_err, etc. Thus, functions like pr_info should not
normally be used after a call to devm_kzalloc. Thus, all pr_err occurances are
replaced with dev_err function calls

Signed-off-by: G Pooja Shamili &lt;poojashamili@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: netlogic: Replace pr_* with netdev_*</title>
<updated>2016-03-12T06:09:09+00:00</updated>
<author>
<name>Amitoj Kaur Chawla</name>
<email>amitoj1606@gmail.com</email>
</author>
<published>2016-03-07T15:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=04309886935f7ab64d72d0624bbc7f766ea40713'/>
<id>04309886935f7ab64d72d0624bbc7f766ea40713</id>
<content type='text'>
Replace generic pr_info and pr_err with netdev_info and netdev_err
respectively for net devices.

Found using Coccinelle. The semantic patch used to find this is as
follows:
//&lt;smpl&gt;
@@
expression e;
identifier f,i;
position p;
@@
f(...,struct net_device *i,...) {
...
(
-  pr_debug@p (e)
+  netdev_dbg(i, e)
|
- pr_err@p (e)
+ netdev_err(i, e)
|
- pr_info@p (e)
+ netdev_info(i, e)
)
...
}
@@
expression e;
identifier f,i;
position p;
@@

f(...) {
...
struct net_device *n;
...
(
-  pr_debug@p (e)
+  netdev_dbg(n, e)
|
- pr_err@p (e)
+ netdev_err(n, e)
|
- pr_info@p (e)
+ netdev_info(n, e)
)
...
}
@a@
identifier s,x;
@@
struct s {
 ...
struct net_device *x;
 ...
};

@b depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@

f ( ..., struct s *i, ...) {
  ...
(
-  pr_debug@p (e)
+  netdev_dbg(i-&gt;x, e)
|
- pr_err@p (e)
+ netdev_err(i-&gt;x, e)
|
- pr_info@p (e)
+ netdev_info(i-&gt;x, e)
)
  ...
}

@c depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@

f (...) {
  ...
struct s *i = ...;
  ...
(
-  pr_debug@p (e)
+  netdev_dbg(i-&gt;x, e)
|
- pr_err@p (e)
+ netdev_err(i-&gt;x, e)
|
- pr_info@p (e)
+ netdev_info(i-&gt;x, e)
)
  ...
}
//&lt;/smpl&gt;

Signed-off-by: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace generic pr_info and pr_err with netdev_info and netdev_err
respectively for net devices.

Found using Coccinelle. The semantic patch used to find this is as
follows:
//&lt;smpl&gt;
@@
expression e;
identifier f,i;
position p;
@@
f(...,struct net_device *i,...) {
...
(
-  pr_debug@p (e)
+  netdev_dbg(i, e)
|
- pr_err@p (e)
+ netdev_err(i, e)
|
- pr_info@p (e)
+ netdev_info(i, e)
)
...
}
@@
expression e;
identifier f,i;
position p;
@@

f(...) {
...
struct net_device *n;
...
(
-  pr_debug@p (e)
+  netdev_dbg(n, e)
|
- pr_err@p (e)
+ netdev_err(n, e)
|
- pr_info@p (e)
+ netdev_info(n, e)
)
...
}
@a@
identifier s,x;
@@
struct s {
 ...
struct net_device *x;
 ...
};

@b depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@

f ( ..., struct s *i, ...) {
  ...
(
-  pr_debug@p (e)
+  netdev_dbg(i-&gt;x, e)
|
- pr_err@p (e)
+ netdev_err(i-&gt;x, e)
|
- pr_info@p (e)
+ netdev_info(i-&gt;x, e)
)
  ...
}

@c depends on a@
expression e;
identifier f,i,a.s,a.x;
position p;
@@

f (...) {
  ...
struct s *i = ...;
  ...
(
-  pr_debug@p (e)
+  netdev_dbg(i-&gt;x, e)
|
- pr_err@p (e)
+ netdev_err(i-&gt;x, e)
|
- pr_info@p (e)
+ netdev_info(i-&gt;x, e)
)
  ...
}
//&lt;/smpl&gt;

Signed-off-by: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
