From: Chao Yu <chao@kernel.org>
To: Gao Xiang <gaoxiang25@huawei.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Gao Xiang <hsiangkao@aol.com>, hutj <hutj@huawei.com>,
"linux-f2fs-devel@lists.sourceforge.net"
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [RESEND PATCH] f2fs: no need to take the address of the array of sb->s_uuid
Date: Sun, 8 Apr 2018 20:16:37 +0800 [thread overview]
Message-ID: <26ef0398-7163-cc32-c995-97ddf58a07b1@kernel.org> (raw)
In-Reply-To: <94ebbd85-1b8d-927a-ae94-93aa6ded4e23@huawei.com>
On 2018/4/5 11:58, Gao Xiang wrote:
> Keep in line with the common case since it is some weird
> to take the address of an array again.
I encounter compile error after applying this patch:
super.c: In function ‘f2fs_fill_super’:
super.c:2711:2: error: incompatible type for argument 1 of ‘__builtin_memcpy’
memcpy(sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
^
super.c:2711:2: note: expected ‘void *’ but argument is of type ‘uuid_t’
Anyway, we need '&' due to sb::s_uuid is a structure object instead of an array.
Thanks,
>
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
> ---
> fix auto-wrapping of email client
>
> fs/f2fs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 9587ca0..4d467c7 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -2565,7 +2565,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
> sb->s_time_gran = 1;
> sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
> (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
> - memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
> + memcpy(sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
> sb->s_iflags |= SB_I_CGROUPWB;
>
> /* init f2fs-specific super block info */
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2018-04-08 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 3:58 [RESEND PATCH] f2fs: no need to take the address of the array of sb->s_uuid Gao Xiang
2018-04-08 1:45 ` Chao Yu
2018-04-08 12:16 ` Chao Yu [this message]
2018-04-08 13:47 ` Gao Xiang
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=26ef0398-7163-cc32-c995-97ddf58a07b1@kernel.org \
--to=chao@kernel.org \
--cc=gaoxiang25@huawei.com \
--cc=hsiangkao@aol.com \
--cc=hutj@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).