Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589861
| From | "Dmitry V. Levin" <ldv@altlinux.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h |
| Date | 2017-03-01 00:20 +0100 |
| Message-ID | <tfZdM-2BN-25@gated-at.bofh.it> (permalink) |
| References | <tbe3L-4vL-5@gated-at.bofh.it> <tbfjc-5cF-13@gated-at.bofh.it> <tbgIj-5XZ-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
btrfs_err_str function is not called from anywhere and is replicated
in the userspace headers for btrfs-progs.
It's removal also fixes the following linux/btrfs.h userspace
compilation error:
/usr/include/linux/btrfs.h: In function 'btrfs_err_str':
/usr/include/linux/btrfs.h:740:11: error: 'NULL' undeclared (first use in this function)
return NULL;
Suggested-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Reviewed-by: David Sterba <dsterba@suse.com>
---
v3: the patch seems to be lost, resending with updated list of addressees
v2: remove btrfs_err_str rather than fix it
include/uapi/linux/btrfs.h | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index db4c253..dcfc3a5 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -713,33 +713,6 @@ enum btrfs_err_code {
BTRFS_ERROR_DEV_ONLY_WRITABLE,
BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS
};
-/* An error code to error string mapping for the kernel
-* error codes
-*/
-static inline char *btrfs_err_str(enum btrfs_err_code err_code)
-{
- switch (err_code) {
- case BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET:
- return "unable to go below two devices on raid1";
- case BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET:
- return "unable to go below four devices on raid10";
- case BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET:
- return "unable to go below two devices on raid5";
- case BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET:
- return "unable to go below three devices on raid6";
- case BTRFS_ERROR_DEV_TGT_REPLACE:
- return "unable to remove the dev_replace target dev";
- case BTRFS_ERROR_DEV_MISSING_NOT_FOUND:
- return "no missing devices found to remove";
- case BTRFS_ERROR_DEV_ONLY_WRITABLE:
- return "unable to remove the only writeable device";
- case BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS:
- return "add/delete/balance/replace/resize operation "\
- "in progress";
- default:
- return NULL;
- }
-}
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
struct btrfs_ioctl_vol_args)
--
ldv
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] uapi: fix linux/btrfs.h userspace compilation error "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-15 21:10 +0100
Re: [PATCH] uapi: fix linux/btrfs.h userspace compilation error Joe Perches <joe@perches.com> - 2017-02-15 21:40 +0100
Re: [PATCH] uapi: fix linux/btrfs.h userspace compilation error Jeff Mahoney <jeffm@suse.com> - 2017-02-15 22:30 +0100
[PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-16 00:00 +0100
Re: [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h David Sterba <dsterba@suse.cz> - 2017-02-16 15:20 +0100
[PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-01 00:20 +0100
Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h David Sterba <dsterba@suse.cz> - 2017-03-01 16:50 +0100
Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h David Sterba <dsterba@suse.cz> - 2017-03-02 14:40 +0100
Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 15:00 +0100
Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h David Sterba <dsterba@suse.cz> - 2017-03-02 20:10 +0100
[PATCH] MAINTAINERS: add btrfs file entries "Dmitry V. Levin" <ldv@altlinux.org> - 2017-03-02 20:50 +0100
csiph-web