Skip to contentSkip to conversation

staging/lustre/ldlm: Fix up LDLM_POOL_SYSFS_WRITER*_STORE define

PATCH New [email protected] 1 participant 1 message May 31, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/lustre/ldlm: Fix up LDLM_POOL_SYSFS_WRITER*_STORE define

From: Oleg Drokin <[email protected]>

The store method defined by LDLM_POOL_SYSFS_WRITER_STORE and LDLM_POOL_SYSFS_WRITER_NOLOCK_STORE defines should use size_t count, not unsigned long.

This produced a warning on i386 (and other 32bit architectures too, I guess) where unsigned long is not 32 bit.

Reported by kbuild test bot.

---
 drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +2 -2
index cf81bdb..6601e6b 100644
@@ -265,7 +265,7 @@ typedef enum ldlm_policy_res ldlm_policy_res_t;
 	static ssize_t var##_store(struct kobject *kobj,		    \
 				     struct attribute *attr,		    \
 				     const char *buffer,		    \
-				     unsigned long count)		    \
+				     size_t count)			    \
 	{								    \
 		struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \
 						    pl_kobj);		    \
@@ -301,7 +301,7 @@ typedef enum ldlm_policy_res ldlm_policy_res_t;
 	static ssize_t var##_store(struct kobject *kobj,		    \
 				     struct attribute *attr,		    \
 				     const char *buffer,		    \
-				     unsigned long count)		    \
+				     size_t count)			    \
 	{								    \
 		struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \
 						    pl_kobj);		    \
Signature · 1 line
2.1.0