mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>,
	David Sterba <dsterba@suse.com>, Josef Bacik <jbacik@fb.com>,
	Jeff Mahoney <jeffm@suse.com>, Liu Bo <bo.li.liu@oracle.com>,
	Anand Jain <anand.jain@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uapi: fix linux/btrfs.h userspace compilation error
Date: Wed, 15 Feb 2017 12:36:11 -0800	[thread overview]
Message-ID: <1487190971.6214.66.camel@perches.com> (raw)
In-Reply-To: <20170215200259.GA1028@altlinux.org>

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;

  reply	other threads:[~2017-02-15 20:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 20:02 Dmitry V. Levin
2017-02-15 20:36 ` Joe Perches [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487190971.6214.66.camel@perches.com \
    --to=joe@perches.com \
    --cc=anand.jain@oracle.com \
    --cc=bo.li.liu@oracle.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=jeffm@suse.com \
    --cc=ldv@altlinux.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome