<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/ethernet/asix/ax88796c_main.c, branch v6.7-rc4</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.7-rc4</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v6.7-rc4'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2023-03-11T12:34:02+00:00</updated>
<entry>
<title>net: Replace all spi-&gt;chip_select and spi-&gt;cs_gpiod references with function call</title>
<updated>2023-03-11T12:34:02+00:00</updated>
<author>
<name>Amit Kumar Mahapatra</name>
<email>amit.kumar-mahapatra@amd.com</email>
</author>
<published>2023-03-10T17:32:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=25fd0550d9b9c92288a17fb7d605cdcdb4a65a64'/>
<id>urn:sha1:25fd0550d9b9c92288a17fb7d605cdcdb4a65a64</id>
<content type='text'>
Supporting multi-cs in spi drivers would require the chip_select &amp; cs_gpiod
members of struct spi_device to be an array. But changing the type of these
members to array would break the spi driver functionality. To make the
transition smoother introduced four new APIs to get/set the
spi-&gt;chip_select &amp; spi-&gt;cs_gpiod and replaced all spi-&gt;chip_select and
spi-&gt;cs_gpiod references with get or set API calls.
While adding multi-cs support in further patches the chip_select &amp; cs_gpiod
members of the spi_device structure would be converted to arrays &amp; the
"idx" parameter of the APIs would be used as array index i.e.,
spi-&gt;chip_select[idx] &amp; spi-&gt;cs_gpiod[idx] respectively.

Signed-off-by: Amit Kumar Mahapatra &lt;amit.kumar-mahapatra@amd.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/20230310173217.3429788-3-amit.kumar-mahapatra@amd.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers).</title>
<updated>2022-10-29T03:13:54+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2022-10-26T13:22:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=068c38ad88ccb09e5e966d4db5cedab0e02b3b95'/>
<id>urn:sha1:068c38ad88ccb09e5e966d4db5cedab0e02b3b95</id>
<content type='text'>
Now that the 32bit UP oddity is gone and 32bit uses always a sequence
count, there is no need for the fetch_irq() variants anymore.

Convert to the regular interface.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ax88796c: Use skb_put_data() instead of skb_put/memcpy pair</title>
<updated>2022-09-29T07:37:29+00:00</updated>
<author>
<name>Shang XiaoJing</name>
<email>shangxiaojing@huawei.com</email>
</author>
<published>2022-09-27T02:30:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=85e69a7dd693667b3e3114713d61edef7552ca88'/>
<id>urn:sha1:85e69a7dd693667b3e3114713d61edef7552ca88</id>
<content type='text'>
Use skb_put_data() instead of skb_put() and memcpy(), which is clear.

Signed-off-by: Shang XiaoJing &lt;shangxiaojing@huawei.com&gt;
Link: https://lore.kernel.org/r/20220927023043.17769-1-shangxiaojing@huawei.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ax88796c: Fix return type of ax88796c_start_xmit</title>
<updated>2022-09-20T01:23:04+00:00</updated>
<author>
<name>Nathan Huckleberry</name>
<email>nhuck@google.com</email>
</author>
<published>2022-09-12T19:40:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fcb7c210a24209ea8f6f32593580b57f52382ec2'/>
<id>urn:sha1:fcb7c210a24209ea8f6f32593580b57f52382ec2</id>
<content type='text'>
The ndo_start_xmit field in net_device_ops is expected to be of type
netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev).

The mismatched return type breaks forward edge kCFI since the underlying
function definition does not match the function hook definition.

The return type of ax88796c_start_xmit should be changed from int to
netdev_tx_t.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Link: https://github.com/ClangBuiltLinux/linux/issues/1703
Cc: llvm@lists.linux.dev
Signed-off-by: Nathan Huckleberry &lt;nhuck@google.com&gt;
Acked-by: Lukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Link: https://lore.kernel.org/r/20220912194031.808425-1-nhuck@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: Use netif_rx().</title>
<updated>2022-03-04T12:02:19+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2022-03-03T17:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=90f77c1c512ffe2e91473658b5eb259b5da04b04'/>
<id>urn:sha1:90f77c1c512ffe2e91473658b5eb259b5da04b04</id>
<content type='text'>
Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Łukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Cc: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Cc: UNGLinuxDriver@microchip.com
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>spi: make remove callback a void function</title>
<updated>2022-02-09T13:00:45+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-01-23T17:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a0386bba70934d42f586eaf68b21d5eeaffa7bd0'/>
<id>urn:sha1:a0386bba70934d42f586eaf68b21d5eeaffa7bd0</id>
<content type='text'>
The value returned by an spi driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Acked-by: Claudius Heine &lt;ch@denx.de&gt;
Acked-by: Stefan Schmidt &lt;stefan@datenfreihafen.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt; # For MMC
Acked-by: Marcus Folkesson &lt;marcus.folkesson@gmail.com&gt;
Acked-by: Łukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20220123175201.34839-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ax88796c: don't write to netdev-&gt;dev_addr directly</title>
<updated>2021-11-19T10:46:04+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-11-18T14:27:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e291422c8f008c47a04788e98d557dc961d72777'/>
<id>urn:sha1:e291422c8f008c47a04788e98d557dc961d72777</id>
<content type='text'>
The future is here, convert the new driver as we are about
to make netdev-&gt;dev_addr const.

Acked-by: Lukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ax88796c: fix ioctl callback</title>
<updated>2021-11-05T14:23:21+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-11-05T09:29:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9dcc00715a7c0aea0d3afe1e935f4b4aefbeb294'/>
<id>urn:sha1:9dcc00715a7c0aea0d3afe1e935f4b4aefbeb294</id>
<content type='text'>
The timestamp ioctls are now handled by the ndo_eth_ioctl() callback,
not the old ndo_do_ioctl(), but oax88796 introduced the
function for the old way.

Move it over to ndo_eth_ioctl() to actually allow calling it from
user space.

Fixes: a97c69ba4f30 ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
Fixes: a76053707dbf ("dev_ioctl: split out ndo_eth_ioctl")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Lukasz Stelmach &lt;l.stelmach@samsung.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ax88796c: hide ax88796c_dt_ids if !CONFIG_OF</title>
<updated>2021-11-05T10:44:04+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-11-04T17:55:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6789a4c05127d3f9257db6767fd7ede614e0241f'/>
<id>urn:sha1:6789a4c05127d3f9257db6767fd7ede614e0241f</id>
<content type='text'>
Build bot says:

&gt;&gt; drivers/net/ethernet/asix/ax88796c_main.c:1116:34: warning: unused variable 'ax88796c_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id ax88796c_dt_ids[] = {
                                    ^

The only reference to this array is wrapped in of_match_ptr().

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: a97c69ba4f30 ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ax88796c: Remove pointless check in ax88796c_open()</title>
<updated>2021-10-26T13:57:23+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2021-10-25T21:12:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=971f5c4079ed46a131ad3ac6e684ed056a7777da'/>
<id>urn:sha1:971f5c4079ed46a131ad3ac6e684ed056a7777da</id>
<content type='text'>
Clang warns:

drivers/net/ethernet/asix/ax88796c_main.c:851:24: error: address of
array 'ax_local-&gt;phydev-&gt;advertising' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
        if (ax_local-&gt;phydev-&gt;advertising &amp;&amp;
            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ ~~

advertising cannot be NULL here if ax_local is not NULL, which cannot
happen due to the check in ax88796c_probe(). Remove the check.

Link: https://github.com/ClangBuiltLinux/linux/issues/1492
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
