All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Marshall <hubcap@omnibond.com>
To: viro@zeniv.linux.org.uk
Cc: Mike Marshall <hubcap@omnibond.com>, linux-fsdevel@vger.kernel.org
Subject: [PATCH V3 8/7] Orangefs: kernel client update 1.
Date: Fri, 24 Jul 2015 15:09:48 -0400	[thread overview]
Message-ID: <1437764988-1857-1-git-send-email-root@logtruck.clemson.edu> (raw)
In-Reply-To: <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>

From: Mike Marshall <hubcap@omnibond.com>

Stephen Rothwell noticed that orangefs would not compile
on powerpc...

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
---
 fs/orangefs/devpvfs2-req.c | 17 ++++++++++++-----
 fs/orangefs/protocol.h     |  1 +
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/orangefs/devpvfs2-req.c b/fs/orangefs/devpvfs2-req.c
index 3e45022..7e60fd0 100644
--- a/fs/orangefs/devpvfs2-req.c
+++ b/fs/orangefs/devpvfs2-req.c
@@ -36,7 +36,7 @@ do {                                                                          \

 static int hash_func(__u64 tag, int table_size)
 {
-	return tag % ((unsigned int)table_size);
+	return do_div(tag, (unsigned int)table_size);
 }

 static void pvfs2_devreq_add_op(struct pvfs2_kernel_op_s *op)
@@ -279,7 +279,7 @@ static ssize_t pvfs2_devreq_writev(struct file *file,

 	/* Either there is a trailer or there isn't */
 	if (count != notrailer_count && count != (notrailer_count + 1)) {
-		gossip_err("Error: Number of iov vectors is (%ld) and notrailer count is %d\n",
+		gossip_err("Error: Number of iov vectors is (%zu) and notrailer count is %d\n",
 			count,
 			notrailer_count);
 		return -EPROTO;
@@ -356,7 +356,7 @@ static ssize_t pvfs2_devreq_writev(struct file *file,
 				     "writev: trailer size %ld\n",
 				     (unsigned long)op->downcall.trailer_size);
 			if (count != (notrailer_count + 1)) {
-				gossip_err("Error: trailer size (%ld) is non-zero, no trailer elements though? (%ld)\n", (unsigned long)op->downcall.trailer_size, count);
+				gossip_err("Error: trailer size (%ld) is non-zero, no trailer elements though? (%zu)\n", (unsigned long)op->downcall.trailer_size, count);
 				dev_req_release(buffer);
 				put_op(op);
 				return -EPROTO;
@@ -908,6 +908,14 @@ static long pvfs2_devreq_compat_ioctl(struct file *filp, unsigned int cmd,
 	return dispatch_ioctl_command(cmd, arg);
 }

+#endif /* CONFIG_COMPAT is in .config */
+
+/*
+ * The following two ioctl32 functions had been refactored into the above
+ * CONFIG_COMPAT ifdef, but that was an over simplification that was
+ * not noticed until we tried to compile on power pc...
+ */
+#if (defined(CONFIG_COMPAT) && !defined(HAVE_REGISTER_IOCTL32_CONVERSION)) || !defined(CONFIG_COMPAT)
 static int pvfs2_ioctl32_init(void)
 {
 	return 0;
@@ -917,8 +925,7 @@ static void pvfs2_ioctl32_cleanup(void)
 {
 	return;
 }
-
-#endif /* CONFIG_COMPAT is in .config */
+#endif

 /* the assigned character device major number */
 static int pvfs2_dev_major;
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h
index 2fb3a63..8e0c8a6 100644
--- a/fs/orangefs/protocol.h
+++ b/fs/orangefs/protocol.h
@@ -1,6 +1,7 @@
 #include <linux/spinlock_types.h>
 #include <linux/types.h>
 #include <linux/slab.h>
+#include <linux/ioctl.h>

 extern struct client_debug_mask *cdm_array;
 extern char *debug_help_string;
--
1.8.3.1

       reply	other threads:[~2015-07-24 19:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1437143897-9069-1-git-send-email-root@logtruck.clemson.edu>
2015-07-24 19:09 ` Mike Marshall [this message]
2015-07-28 20:27 ` [PATCH V3 9/7] Orangefs: sooth most sparse complaints hubcap
2015-07-29 19:57 ` [PATCH V3 10/7] Orangefs: address problems found by static checker hubcap
2015-07-30 20:33 ` [PATCH V3 11/7] Orangefs: large integer implicitly truncated to unsigned type hubcap
2015-07-31  7:36   ` Christoph Hellwig
2015-07-31  8:26     ` Al Viro
2015-08-05 19:48 ` [PATCH V3 12/7] Orangefs: use inode_set_bytes for directories hubcap
2015-08-05 19:48 ` [PATCH V2 13/7] fs: orangefs: remove execute priviliges from module params hubcap
2015-08-05 19:48 ` [PATCH V3 14/7] Orangefs: Swap order of include files hubcap
2015-08-06  9:18   ` Mark Brown

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=1437764988-1857-1-git-send-email-root@logtruck.clemson.edu \
    --to=hubcap@omnibond.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.