All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minda Chen <minda.chen@starfivetech.com>
To: Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>, Leo <ycliang@andestech.com>,
	Rick Chen <rick@andestech.com>
Cc: <u-boot@lists.denx.de>, Mason Huo <mason.huo@starfivetech.com>,
	Minda Chen <minda.chen@starfivetech.com>
Subject: [PATCH v1 1/4] net: rtl8169: Fix compile warning in rtl8169 network adapter
Date: Wed, 21 Jun 2023 17:05:37 +0800	[thread overview]
Message-ID: <20230621090540.119313-2-minda.chen@starfivetech.com> (raw)
In-Reply-To: <20230621090540.119313-1-minda.chen@starfivetech.com>

Fix make pointer from integer without a cast compile warning.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
 drivers/net/rtl8169.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 2276a465e7..dcba51590d 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -96,12 +96,12 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
 #define TX_TIMEOUT  (6*HZ)
 
 /* write/read MMIO register. Notice: {read,write}[wl] do the necessary swapping */
-#define RTL_W8(reg, val8)	writeb((val8), ioaddr + (reg))
-#define RTL_W16(reg, val16)	writew((val16), ioaddr + (reg))
-#define RTL_W32(reg, val32)	writel((val32), ioaddr + (reg))
-#define RTL_R8(reg)		readb(ioaddr + (reg))
-#define RTL_R16(reg)		readw(ioaddr + (reg))
-#define RTL_R32(reg)		readl(ioaddr + (reg))
+#define RTL_W8(reg, val8)	writeb((val8), (void *)(ioaddr + (reg)))
+#define RTL_W16(reg, val16)	writew((val16), (void *)(ioaddr + (reg)))
+#define RTL_W32(reg, val32)	writel((val32), (void *)(ioaddr + (reg)))
+#define RTL_R8(reg)		readb((void *)(ioaddr + (reg)))
+#define RTL_R16(reg)		readw((void *)(ioaddr + (reg)))
+#define RTL_R32(reg)		readl((void *)(ioaddr + (reg)))
 
 #define bus_to_phys(a)	pci_mem_to_phys((pci_dev_t)(unsigned long)dev->priv, \
 	(pci_addr_t)(unsigned long)a)
-- 
2.17.1


  reply	other threads:[~2023-06-21  9:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21  9:05 [PATCH v1 0/4] Fix rtl8169 compile warning and add a new device ID Minda Chen
2023-06-21  9:05 ` Minda Chen [this message]
2023-07-22  8:55   ` [PATCH v1 1/4] net: rtl8169: Fix compile warning in rtl8169 network adapter Ramon Fried
2023-06-21  9:05 ` [PATCH v1 2/4] net: rtl8169: Fix DMA min aligned compile warning in riscv Minda Chen
2023-07-22  8:56   ` Ramon Fried
2023-06-21  9:05 ` [PATCH v1 3/4] net: rtl8169: Add one more device ID Minda Chen
2023-07-22  8:56   ` Ramon Fried
2023-06-21  9:05 ` [PATCH v1 4/4] configs: starfive-jh7110: Add CONFIG_RTL8169 Minda Chen
2023-07-05  1:54 ` [PATCH v1 0/4] Fix rtl8169 compile warning and add a new device ID Minda Chen

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=20230621090540.119313-2-minda.chen@starfivetech.com \
    --to=minda.chen@starfivetech.com \
    --cc=joe.hershberger@ni.com \
    --cc=mason.huo@starfivetech.com \
    --cc=rfried.dev@gmail.com \
    --cc=rick@andestech.com \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.