Btrfs: consistent usage of types in balance_args
diff mbox

Message ID 20170308175843.4502-1-hans.van.kranenburg@mendix.com
State New
Headers show

Commit Message

Hans van Kranenburg March 8, 2017, 5:58 p.m. UTC
The btrfs_balance_args are only used for the balance ioctl, so use __u
instead of __le here for consistency. The __le usage was introduced in
bc3094673f22d and dee32d0ac3719 and was probably a result of
copy/pasting when the code was written.

The usage of __le did not break anything, but it's unnecessary. Also,
this change makes the code less confusing for the careful reader.

Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
---
 include/uapi/linux/btrfs.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

David Sterba March 9, 2017, 12:20 p.m. UTC | #1
On Wed, Mar 08, 2017 at 06:58:43PM +0100, Hans van Kranenburg wrote:
> The btrfs_balance_args are only used for the balance ioctl, so use __u
> instead of __le here for consistency. The __le usage was introduced in
> bc3094673f22d and dee32d0ac3719 and was probably a result of
> copy/pasting when the code was written.
> 
> The usage of __le did not break anything, but it's unnecessary. Also,
> this change makes the code less confusing for the careful reader.
> 
> Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index db4c253f8011..25122ed27718 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -291,10 +291,10 @@  struct btrfs_ioctl_feature_flags {
 struct btrfs_balance_args {
 	__u64 profiles;
 	union {
-		__le64 usage;
+		__u64 usage;
 		struct {
-			__le32 usage_min;
-			__le32 usage_max;
+			__u32 usage_min;
+			__u32 usage_max;
 		};
 	};
 	__u64 devid;
@@ -324,8 +324,8 @@  struct btrfs_balance_args {
 	 * Process chunks that cross stripes_min..stripes_max devices,
 	 * BTRFS_BALANCE_ARGS_STRIPES_RANGE
 	 */
-	__le32 stripes_min;
-	__le32 stripes_max;
+	__u32 stripes_min;
+	__u32 stripes_max;
 
 	__u64 unused[6];
 } __attribute__ ((__packed__));