mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Tang Bin <tangbin@cmss.chinamobile.com>,
	clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix backref.c selftest compilation warning
Date: Sun, 12 Apr 2020 13:04:29 +0800	[thread overview]
Message-ID: <b1298579-8b24-344d-00cb-b922d6e4a398@gmx.com> (raw)
In-Reply-To: <4b1e57b3-ca0d-f3e0-f4c4-72cdfe943d7a@cmss.chinamobile.com>


[-- Attachment #1.1: Type: text/plain, Size: 1635 bytes --]



On 2020/4/12 上午11:21, Tang Bin wrote:
> Hi Qu:
> 
> On 2020/4/12 8:52, Qu Wenruo wrote:
>>
>> On 2020/4/11 下午11:49, Tang Bin wrote:
>>> Fix missing braces compilation warning in the ARM
>>> compiler environment:
>>>      fs/btrfs/backref.c: In function ‘is_shared_data_backref’:
>>>      fs/btrfs/backref.c:394:9: warning: missing braces around
>>> initializer [-Wmissing-braces]
>>>        struct prelim_ref target = {0};
>>>      fs/btrfs/backref.c:394:9: warning: (near initialization for
>>> ‘target.rbnode’) [-Wmissing-braces]
>> GCC version please.
>>
>> It looks like you're using an older GCC, as it's pretty common certain
>> prebuild tool chain is still using outdated GCC.
>>
>> In my environment with GCC 9.2.0 natively (on aarch64) it's completely
>> fine.
>> Thus personally I recommend to build your own tool chain using
>> buildroot, or run it natively, other than rely on prebuilt one.
> 
> My environment:
> 
>   PC : Ubuntu 16.04
> 
>   Hardware : I.MX6ULL
> 
>   Tool Chain : arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2017.01) 4.9.4

That's pretty old.

You'd better fetch the newer version, as newer kernel may require higher
version gcc.

Or even build your own using tools like buildroot.

Thanks,
Qu

> 
>>
>> In fact your fix could cause problem, as the original code is
>> initializing all members to 0, but now it's uninitialized.
>>
>> You need to locate the root cause other than blindly follow the warning.
> 
> In hardware experiment, this approach is feasible.
> 
> Thanks.
> 
> Tang Bin
> 
>>
>>
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-04-12  5:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11 15:49 Tang Bin
2020-04-12  0:52 ` Qu Wenruo
2020-04-12  3:21   ` Tang Bin
2020-04-12  5:04     ` Qu Wenruo [this message]
2020-04-14 15:19 ` David Sterba
2020-04-14 15:22   ` David Sterba
2020-04-15  1:22     ` Tang Bin

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=b1298579-8b24-344d-00cb-b922d6e4a398@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangbin@cmss.chinamobile.com \
    /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

all inboxes | Powered by JetHome®