public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de•ibm.com>
To: Greg Kroah-Hartman <gregkh@suse•de>
Cc: linux-next@vger•kernel.org,
	Heiko Carstens <heiko.carstens@de•ibm.com>,
	Mikulas Patocka <mpatocka@redhat•com>
Subject: [PATCH -next] sysfs: add unsigned long cast to prevent compile warning
Date: Thu, 22 Sep 2011 09:15:01 +0200	[thread overview]
Message-ID: <1316675701-5230-1-git-send-email-heiko.carstens@de.ibm.com> (raw)

"sysfs: use rb-tree for inode number lookup" added a new printk which
causes a new compile warning on s390 (and few other architectures):

fs/sysfs/dir.c: In function 'sysfs_link_sibling':
fs/sysfs/dir.c:63:4: warning: format '%lx' expects argument of type
  'long unsigned int', but argument 2 has type 'ino_t' [-Wform

Add an explicit unsigned long cast since ino_t is an unsigned long on
most architectures.

Cc: Mikulas Patocka <mpatocka@redhat•com>
Signed-off-by: Heiko Carstens <heiko.carstens@de•ibm.com>
---
 fs/sysfs/dir.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index c3646d9..9a6e020 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -60,7 +60,8 @@ static void sysfs_link_sibling(struct sysfs_dirent *sd)
 		} else if (sd->s_ino > node->s_ino) {
 			p = &node->inode_node.rb_right;
 		} else {
-			printk(KERN_CRIT "sysfs: inserting duplicate inode '%lx'\n", sd->s_ino);
+			printk(KERN_CRIT "sysfs: inserting duplicate inode '%lux'\n",
+			       (unsigned long) sd->s_ino);
 			BUG();
 		}
 #undef node
-- 
1.7.5.4

             reply	other threads:[~2011-09-22  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22  7:15 Heiko Carstens [this message]
2011-09-22 14:16 ` [PATCH -next] sysfs: add unsigned long cast to prevent compile warning Mikulas Patocka
2011-09-22 17:34   ` Heiko Carstens

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=1316675701-5230-1-git-send-email-heiko.carstens@de.ibm.com \
    --to=heiko.carstens@de$(echo .)ibm.com \
    --cc=gregkh@suse$(echo .)de \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mpatocka@redhat$(echo .)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