All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 3/7] net: caif: Fix debugfs on 64-bit platforms
Date: Fri, 25 Oct 2019 11:41:26 +0200	[thread overview]
Message-ID: <20191025094130.26033-4-geert+renesas@glider.be> (raw)
In-Reply-To: <20191025094130.26033-1-geert+renesas@glider.be>

"ser_device.state" is "unsigned long", i.e. 32-bit or 64-bit, depending
on the platform.  Hence casting its address to "u32 *", and calling
debugfs_create_x32() breaks operation on 64-bit platforms.

Fix this by using the new debugfs_create_xul() helper instead.

Fixes: 9b27105b4a44c54b ("net-caif-driver: add CAIF serial driver (ldisc)")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes.
---
 drivers/net/caif/caif_serial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 40b079162804fb0c..bd40b114d6cd7214 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -102,8 +102,8 @@ static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
 	debugfs_create_blob("last_rx_msg", 0400, ser->debugfs_tty_dir,
 			    &ser->rx_blob);
 
-	debugfs_create_x32("ser_state", 0400, ser->debugfs_tty_dir,
-			   (u32 *)&ser->state);
+	debugfs_create_xul("ser_state", 0400, ser->debugfs_tty_dir,
+			   &ser->state);
 
 	debugfs_create_x8("tty_status", 0400, ser->debugfs_tty_dir,
 			  &ser->tty_status);
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-doc@vger.kernel.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/7] net: caif: Fix debugfs on 64-bit platforms
Date: Fri, 25 Oct 2019 11:41:26 +0200	[thread overview]
Message-ID: <20191025094130.26033-4-geert+renesas@glider.be> (raw)
In-Reply-To: <20191025094130.26033-1-geert+renesas@glider.be>

"ser_device.state" is "unsigned long", i.e. 32-bit or 64-bit, depending
on the platform.  Hence casting its address to "u32 *", and calling
debugfs_create_x32() breaks operation on 64-bit platforms.

Fix this by using the new debugfs_create_xul() helper instead.

Fixes: 9b27105b4a44c54b ("net-caif-driver: add CAIF serial driver (ldisc)")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes.
---
 drivers/net/caif/caif_serial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 40b079162804fb0c..bd40b114d6cd7214 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -102,8 +102,8 @@ static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
 	debugfs_create_blob("last_rx_msg", 0400, ser->debugfs_tty_dir,
 			    &ser->rx_blob);
 
-	debugfs_create_x32("ser_state", 0400, ser->debugfs_tty_dir,
-			   (u32 *)&ser->state);
+	debugfs_create_xul("ser_state", 0400, ser->debugfs_tty_dir,
+			   &ser->state);
 
 	debugfs_create_x8("tty_status", 0400, ser->debugfs_tty_dir,
 			  &ser->tty_status);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-25 11:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:41 [PATCH v2 0/7] debugfs: Add and use debugfs_create_xul() Geert Uytterhoeven
2019-10-25  9:41 ` Geert Uytterhoeven
2019-10-25  9:41 ` Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 1/7] debugfs: Add debugfs_create_xul() for hexadecimal unsigned long Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 2/7] mac80211: Use debugfs_create_xul() helper Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-11-04  7:28   ` Johannes Berg
2019-11-04  7:28     ` Johannes Berg
2019-11-04  7:39     ` Greg Kroah-Hartman
2019-11-04  7:39       ` Greg Kroah-Hartman
2019-10-25  9:41 ` Geert Uytterhoeven [this message]
2019-10-25  9:41   ` [PATCH v2 3/7] net: caif: Fix debugfs on 64-bit platforms Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 4/7] mmc: atmel-mci: " Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 5/7] mmc: atmel-mci: Remove superfluous cast in debugfs_create_u32() call Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 6/7] mmc: dw_mmc: Fix debugfs on 64-bit platforms Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41 ` [PATCH v2 7/7] mmc: dw_mmc: Remove superfluous cast in debugfs_create_u32() call Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-10-25  9:41   ` Geert Uytterhoeven
2019-11-03 17:13 ` [PATCH v2 0/7] debugfs: Add and use debugfs_create_xul() Greg Kroah-Hartman
2019-11-03 17:13   ` Greg Kroah-Hartman

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=20191025094130.26033-4-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=alexandre.belloni@bootlin.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jh80.chung@samsung.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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.