@@ -586,10 +586,8 @@ static int ave_rxdesc_prepare(struct net_device *ndev, int entry)skb=priv->rx.desc[entry].skbs;if(!skb){skb=netdev_alloc_skb(ndev,AVE_MAX_ETHFRAME);-if(!skb){-netdev_err(ndev,"can't allocate skb for Rx\n");+if(!skb)return-ENOMEM;-}skb->data+=AVE_FRAME_HEADROOM;skb->tail+=AVE_FRAME_HEADROOM;}
Replace udelay() with usleep_range() as notified by checkpatch.pl.
CHECK: usleep_range is preferred over udelay; see function description
of usleep_range() and udelay().
#906: FILE: drivers/net/ethernet/socionext/sni_ave.c:906:
+ udelay(50);
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
drivers/net/ethernet/socionext/sni_ave.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Andrew Lunn <andrew@lunn.ch> Date: 2026-01-08 18:33:01
On Thu, Jan 08, 2026 at 03:46:40PM +0900, Kunihiko Hayashi wrote:
Follow the warning from checkpatch.pl and remove 'out of memory' message.
WARNING: Possible unnecessary 'out of memory' message
#590: FILE: drivers/net/ethernet/socionext/sni_ave.c:590:
+ if (!skb) {
+ netdev_err(ndev, "can't allocate skb for Rx\n");
On Thu, Jan 08, 2026 at 03:46:40PM +0900, Kunihiko Hayashi wrote:
quoted
Follow the warning from checkpatch.pl and remove 'out of memory'
message.
quoted
WARNING: Possible unnecessary 'out of memory' message
#590: FILE: drivers/net/ethernet/socionext/sni_ave.c:590:
+ if (!skb) {
+ netdev_err(ndev, "can't allocate skb for
Thank you for pointing out.
I thought this was a "fix" for the warning, however, it's not a logical
fix. So I'll repost it as net-next.
Thank you,
---
Best Regards
Kunihiko Hayashi
Hi David,
On 2026/01/08 18:05, David Laight wrote:
On Thu, 8 Jan 2026 15:46:41 +0900
Kunihiko Hayashi [off-list ref] wrote:
quoted
Replace udelay() with usleep_range() as notified by checkpatch.pl.
Nak.
Look at the code...
Thank you for reviewing.
Indeed, since this function is called from an interrupt context,
it was not allowed to use usleep_range().
I'll keep udelay() here and close this patch.
Thank you,
---
Best Regards
Kunihiko Hayashi
From: Andrew Lunn <andrew@lunn.ch> Date: 2026-01-09 01:20:14
On Fri, Jan 09, 2026 at 09:27:03AM +0900, Kunihiko Hayashi wrote:
Hi Andrew,
On 2026/01/09 3:32, Andrew Lunn wrote:
quoted
On Thu, Jan 08, 2026 at 03:46:40PM +0900, Kunihiko Hayashi wrote:
quoted
Follow the warning from checkpatch.pl and remove 'out of memory'
message.
quoted
WARNING: Possible unnecessary 'out of memory' message
#590: FILE: drivers/net/ethernet/socionext/sni_ave.c:590:
+ if (!skb) {
+ netdev_err(ndev, "can't allocate skb for
Thank you for pointing out.
I thought this was a "fix" for the warning, however, it's not a logical
fix. So I'll repost it as net-next.
You might want to read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
One key thing in that document is:
It must either fix a real bug that bothers people or just add a device ID
Multiple messages that the system is out of people does not bother
people.
Andrew