* [PATCH] uapi: fix linux/btrfs.h userspace compilation error @ 2017-02-15 20:02 Dmitry V. Levin 2017-02-15 20:36 ` Joe Perches 2017-02-15 21:24 ` Jeff Mahoney 0 siblings, 2 replies; 11+ messages in thread From: Dmitry V. Levin @ 2017-02-15 20:02 UTC (permalink / raw) To: David Sterba, Josef Bacik, Jeff Mahoney, Liu Bo, Anand Jain; +Cc: linux-kernel Stop using NULL to fix 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; Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> --- include/uapi/linux/btrfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h index db4c253..01c612f 100644 --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -737,7 +737,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) return "add/delete/balance/replace/resize operation "\ "in progress"; default: - return NULL; + return 0; } } -- ldv ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] uapi: fix linux/btrfs.h userspace compilation error 2017-02-15 20:02 [PATCH] uapi: fix linux/btrfs.h userspace compilation error Dmitry V. Levin @ 2017-02-15 20:36 ` Joe Perches 2017-02-15 21:24 ` Jeff Mahoney 1 sibling, 0 replies; 11+ messages in thread From: Joe Perches @ 2017-02-15 20:36 UTC (permalink / raw) To: Dmitry V. Levin, David Sterba, Josef Bacik, Jeff Mahoney, Liu Bo, Anand Jain Cc: linux-kernel On Wed, 2017-02-15 at 23:02 +0300, Dmitry V. Levin wrote: > Stop using NULL to fix 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; > > Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> > --- > include/uapi/linux/btrfs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h [] > @@ -737,7 +737,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) > return "add/delete/balance/replace/resize operation "\ > "in progress"; > default: > - return NULL; > + return 0; Perhaps to avoid some other warnings this might be better return (void *)0; ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] uapi: fix linux/btrfs.h userspace compilation error 2017-02-15 20:02 [PATCH] uapi: fix linux/btrfs.h userspace compilation error Dmitry V. Levin 2017-02-15 20:36 ` Joe Perches @ 2017-02-15 21:24 ` Jeff Mahoney 2017-02-15 22:55 ` [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h Dmitry V. Levin 1 sibling, 1 reply; 11+ messages in thread From: Jeff Mahoney @ 2017-02-15 21:24 UTC (permalink / raw) To: Dmitry V. Levin, David Sterba, Josef Bacik, Liu Bo, Anand Jain Cc: linux-kernel [-- Attachment #1.1: Type: text/plain, Size: 1068 bytes --] On 2/15/17 3:02 PM, Dmitry V. Levin wrote: > Stop using NULL to fix 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; > > Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> > --- > include/uapi/linux/btrfs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h > index db4c253..01c612f 100644 > --- a/include/uapi/linux/btrfs.h > +++ b/include/uapi/linux/btrfs.h > @@ -737,7 +737,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) > return "add/delete/balance/replace/resize operation "\ > "in progress"; > default: > - return NULL; > + return 0; > } > } > > Hi Dmitry - Just remove the whole routine. It's not called from anywhere and is replicated in the userspace headers for btrfsprogs. -Jeff -- Jeff Mahoney SUSE Labs [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-02-15 21:24 ` Jeff Mahoney @ 2017-02-15 22:55 ` Dmitry V. Levin 2017-02-16 14:15 ` David Sterba 2017-02-28 23:12 ` [PATCH v3] " Dmitry V. Levin 0 siblings, 2 replies; 11+ messages in thread From: Dmitry V. Levin @ 2017-02-15 22:55 UTC (permalink / raw) To: Jeff Mahoney; +Cc: David Sterba, Josef Bacik, Liu Bo, Anand Jain, linux-kernel 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> --- 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-02-15 22:55 ` [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h Dmitry V. Levin @ 2017-02-16 14:15 ` David Sterba 2017-02-28 23:12 ` [PATCH v3] " Dmitry V. Levin 1 sibling, 0 replies; 11+ messages in thread From: David Sterba @ 2017-02-16 14:15 UTC (permalink / raw) To: Dmitry V. Levin Cc: Jeff Mahoney, Josef Bacik, Anand Jain, Liu Bo, linux-kernel On Thu, Feb 16, 2017 at 01:55:03AM +0300, Dmitry V. Levin wrote: > 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> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-02-15 22:55 ` [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h Dmitry V. Levin 2017-02-16 14:15 ` David Sterba @ 2017-02-28 23:12 ` Dmitry V. Levin 2017-03-01 14:54 ` David Sterba 1 sibling, 1 reply; 11+ messages in thread From: Dmitry V. Levin @ 2017-02-28 23:12 UTC (permalink / raw) To: Chris Mason Cc: Jeff Mahoney, David Sterba, Josef Bacik, linux-btrfs, linux-kernel 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-02-28 23:12 ` [PATCH v3] " Dmitry V. Levin @ 2017-03-01 14:54 ` David Sterba 2017-03-02 11:42 ` David Sterba 0 siblings, 1 reply; 11+ messages in thread From: David Sterba @ 2017-03-01 14:54 UTC (permalink / raw) To: Dmitry V. Levin Cc: Chris Mason, Jeff Mahoney, David Sterba, Josef Bacik, linux-btrfs, linux-kernel On Wed, Mar 01, 2017 at 02:12:50AM +0300, Dmitry V. Levin wrote: > 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 Indeed, I can't find how or where it got lost, sorry. Added to 4.11 again. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-03-01 14:54 ` David Sterba @ 2017-03-02 11:42 ` David Sterba 2017-03-02 13:01 ` Dmitry V. Levin 0 siblings, 1 reply; 11+ messages in thread From: David Sterba @ 2017-03-02 11:42 UTC (permalink / raw) To: Dmitry V. Levin Cc: Chris Mason, Jeff Mahoney, David Sterba, Josef Bacik, linux-btrfs, linux-kernel On Wed, Mar 01, 2017 at 03:54:35PM +0100, David Sterba wrote: > On Wed, Mar 01, 2017 at 02:12:50AM +0300, Dmitry V. Levin wrote: > > 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 > > Indeed, I can't find how or where it got lost, sorry. Added to 4.11 > again. So it's because you did not CC linux-btrfs@ , I have the mails in my inbox but haven't found it in the other folder while picking patches. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-03-02 11:42 ` David Sterba @ 2017-03-02 13:01 ` Dmitry V. Levin 2017-03-02 18:59 ` David Sterba 0 siblings, 1 reply; 11+ messages in thread From: Dmitry V. Levin @ 2017-03-02 13:01 UTC (permalink / raw) To: David Sterba Cc: Chris Mason, Jeff Mahoney, Josef Bacik, linux-btrfs, linux-kernel On Thu, Mar 02, 2017 at 12:42:12PM +0100, David Sterba wrote: > On Wed, Mar 01, 2017 at 03:54:35PM +0100, David Sterba wrote: > > On Wed, Mar 01, 2017 at 02:12:50AM +0300, Dmitry V. Levin wrote: > > > 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 > > > > Indeed, I can't find how or where it got lost, sorry. Added to 4.11 > > again. > > So it's because you did not CC linux-btrfs@ , I have the mails in my > inbox but haven't found it in the other folder while picking patches. Thanks, I though so when Cc'ed linux-btrfs@ the last time. Consider updating MAINTAINERS file so that scripts/get_maintainer.pl would be able to print the right addressees for btrfs header files: diff --git a/MAINTAINERS b/MAINTAINERS index 0001835..04a758f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2905,4 +2905,6 @@ S: Maintained F: Documentation/filesystems/btrfs.txt F: fs/btrfs/ +F: include/linux/btrfs* +F: include/uapi/linux/btrfs* BTTV VIDEO4LINUX DRIVER -- ldv ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h 2017-03-02 13:01 ` Dmitry V. Levin @ 2017-03-02 18:59 ` David Sterba 2017-03-02 19:42 ` [PATCH] MAINTAINERS: add btrfs file entries Dmitry V. Levin 0 siblings, 1 reply; 11+ messages in thread From: David Sterba @ 2017-03-02 18:59 UTC (permalink / raw) To: Dmitry V. Levin Cc: Chris Mason, Josef Bacik, Jeff Mahoney, linux-btrfs, linux-kernel On Thu, Mar 02, 2017 at 04:01:17PM +0300, Dmitry V. Levin wrote: > On Thu, Mar 02, 2017 at 12:42:12PM +0100, David Sterba wrote: > > On Wed, Mar 01, 2017 at 03:54:35PM +0100, David Sterba wrote: > > > On Wed, Mar 01, 2017 at 02:12:50AM +0300, Dmitry V. Levin wrote: > > > > 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 > > > > > > Indeed, I can't find how or where it got lost, sorry. Added to 4.11 > > > again. > > > > So it's because you did not CC linux-btrfs@ , I have the mails in my > > inbox but haven't found it in the other folder while picking patches. > > Thanks, I though so when Cc'ed linux-btrfs@ the last time. > > Consider updating MAINTAINERS file so that scripts/get_maintainer.pl > would be able to print the right addressees for btrfs header files: Good idea. > diff --git a/MAINTAINERS b/MAINTAINERS > index 0001835..04a758f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2905,4 +2905,6 @@ S: Maintained > F: Documentation/filesystems/btrfs.txt > F: fs/btrfs/ > +F: include/linux/btrfs* > +F: include/uapi/linux/btrfs* > > BTTV VIDEO4LINUX DRIVER Please send a proper patch and add Acked-by: David Sterba <dsterba@suse.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] MAINTAINERS: add btrfs file entries 2017-03-02 18:59 ` David Sterba @ 2017-03-02 19:42 ` Dmitry V. Levin 0 siblings, 0 replies; 11+ messages in thread From: Dmitry V. Levin @ 2017-03-02 19:42 UTC (permalink / raw) To: David Sterba; +Cc: Chris Mason, Josef Bacik, linux-btrfs, linux-kernel Add file entries for btrfs header files. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Acked-by: David Sterba <dsterba@suse.com> --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0001835..04a758f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2904,6 +2904,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git S: Maintained F: Documentation/filesystems/btrfs.txt F: fs/btrfs/ +F: include/linux/btrfs* +F: include/uapi/linux/btrfs* BTTV VIDEO4LINUX DRIVER M: Mauro Carvalho Chehab <mchehab@s-opensource.com> -- ldv ^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-03-02 19:45 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-02-15 20:02 [PATCH] uapi: fix linux/btrfs.h userspace compilation error Dmitry V. Levin 2017-02-15 20:36 ` Joe Perches 2017-02-15 21:24 ` Jeff Mahoney 2017-02-15 22:55 ` [PATCH v2] btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h Dmitry V. Levin 2017-02-16 14:15 ` David Sterba 2017-02-28 23:12 ` [PATCH v3] " Dmitry V. Levin 2017-03-01 14:54 ` David Sterba 2017-03-02 11:42 ` David Sterba 2017-03-02 13:01 ` Dmitry V. Levin 2017-03-02 18:59 ` David Sterba 2017-03-02 19:42 ` [PATCH] MAINTAINERS: add btrfs file entries Dmitry V. Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).