From: Stephen Hemminger <shemminger@vyatta•com>
To: Francois Romieu <romieu@fr•zoreil.com>,
David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: [PATCH] r8169: incorrect args to oob notify
Date: Wed, 23 Feb 2011 09:52:37 -0800 [thread overview]
Message-ID: <20110223095237.0ee9c130@nehalam> (raw)
Sparse detected this bug. The function oob_notify was being
passed the private ptr, but expected to get the ioaddr.
Compile checked only; not tested on real hardware.
Patch against net-next-2.6 but should be applied to net-2.6.
Bug not present in 2.6.37 and earlier.
Signed-off-by: Stephen Hemminger <shemminger@vyatta•com>
--- a/drivers/net/r8169.c 2011-02-23 09:46:30.042289776 -0800
+++ b/drivers/net/r8169.c 2011-02-23 09:48:00.167355773 -0800
@@ -617,8 +617,9 @@ static void ocp_write(struct rtl8169_pri
}
}
-static void rtl8168_oob_notify(void __iomem *ioaddr, u8 cmd)
+static void rtl8168_oob_notify(struct rtl8169_private *tp, u8 cmd)
{
+ void __iomem *ioaddr = tp->mmio_addr;
int i;
RTL_W8(ERIDR, cmd);
@@ -630,7 +631,7 @@ static void rtl8168_oob_notify(void __io
break;
}
- ocp_write(ioaddr, 0x1, 0x30, 0x00000001);
+ ocp_write(tp, 0x1, 0x30, 0x00000001);
}
#define OOB_CMD_RESET 0x00
next reply other threads:[~2011-02-23 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 17:52 Stephen Hemminger [this message]
2011-02-23 20:00 ` [PATCH] r8169: incorrect args to oob notify Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110223095237.0ee9c130@nehalam \
--to=shemminger@vyatta$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=romieu@fr$(echo .)zoreil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox