aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.4/751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch
blob: 6d51de8372b7d73cafcf11f97aa0dacf9d40a91a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From fa2632f74e57bbc869c8ad37751a11b6147a3acc Mon Sep 17 00:00:00 2001
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
Date: Mon, 16 Mar 2020 20:49:07 +1300
Subject: [PATCH] net: mvmdio: avoid error message for optional IRQ

Per the dt-binding the interrupt is optional so use
platform_get_irq_optional() instead of platform_get_irq(). Since
commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()") platform_get_irq() produces an error message

  orion-mdio f1072004.mdio: IRQ index 0 not found

which is perfectly normal if one hasn't specified the optional property
in the device tree.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ethernet/marvell/mvmdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platf
 	}
 
 
-	dev->err_interrupt = platform_get_irq(pdev, 0);
+	dev->err_interrupt = platform_get_irq_optional(pdev, 0);
 	if (dev->err_interrupt > 0 &&
 	    resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
 		dev_err(&pdev->dev,
] [<80010a48>] show_stack+0x58/0x100 [ 3.542207] [<804c2f78>] dump_stack+0xe8/0x170 [ 3.546613] [<80079f90>] save_trace+0xf0/0x110 [ 3.551010] [<8007b1ec>] mark_lock+0x33c/0x78c [ 3.555413] [<8007bf48>] __lock_acquire+0x2ac/0x1a08 [ 3.560337] [<8007de60>] lock_acquire+0x64/0x8c [ 3.564846] [<804e1570>] _raw_spin_lock_irqsave+0x54/0x78 [ 3.570186] [<801b618c>] kernfs_notify+0x94/0xac [ 3.574770] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.579257] [<801b618c>] kernfs_notify+0x94/0xac [ 3.583839] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.588329] [<801b618c>] kernfs_notify+0x94/0xac [ 3.592911] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.597401] [<801b618c>] kernfs_notify+0x94/0xac [ 3.601983] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.606473] [<801b618c>] kernfs_notify+0x94/0xac [ 3.611055] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.615545] [<801b618c>] kernfs_notify+0x94/0xac [ 3.620125] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.624619] [<801b618c>] kernfs_notify+0x94/0xac [ 3.629197] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.633691] [<801b618c>] kernfs_notify+0x94/0xac [ 3.638269] [<801b7b10>] sysfs_notify+0x74/0xa0 [ 3.642763] [<801b618c>] kernfs_notify+0x94/0xac Signed-off-by: Felix Fietkau <nbd@nbd.name> --- --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -365,6 +365,8 @@ static inline int is_sp_move_ins(union m if (ip->i_format.opcode == addiu_op || ip->i_format.opcode == daddiu_op) { + if (ip->i_format.simmediate > 0) + return 0; *frame_size = -ip->i_format.simmediate; return 1; }