Skip to contentSkip to conversation

Btrfs: Remove unnecessary placeholder in btrfs_err_code

PATCH In review Satoru Takeuchi 2 participants 2 messages Dec 24, 2014 – Dec 29, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: Remove unnecessary placeholder in btrfs_err_code

From: Satoru Takeuchi <[email protected]>

"notused" is not necessary. Set 1 to the first entry is enough.

---
I once submit the similar patch to btrfs-progs. Then Gui Hecheng tell me fixing original code in kernel is better.

http://permalink.gmane.org/gmane.comp.file-systems.btrfs/41679

---
 include/uapi/linux/btrfs.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/uapi/linux/btrfs.h +1 -2
index 611e1c5..b6dec05 100644
@@ -495,8 +495,7 @@ struct btrfs_ioctl_send_args {
 
 /* Error codes as returned by the kernel */
 enum btrfs_err_code {
-	notused,
-	BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET,
+	BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1,
 	BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET,
 	BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET,
 	BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET,
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Satoru Takeuchi

I once submit the similar patch to btrfs-progs. Then Gui Hecheng tell me fixing original code in kernel is better.

The kernel header is exported and the authoritative source for the ioctl definitions, progs usually copy the required portions but should be identical in the end.