Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2092387ybb; Sat, 11 Apr 2020 20:25:11 -0700 (PDT) X-Google-Smtp-Source: APiQypK/5S+QCFZymSJb6E9JJEcZZQWQySHgC7Jybtqa9LC3qHb8fGw+PyqMfhY+FwfINVoo8jba X-Received: by 2002:a05:620a:1202:: with SMTP id u2mr4355971qkj.285.1586661911577; Sat, 11 Apr 2020 20:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586661911; cv=none; d=google.com; s=arc-20160816; b=vDRScEnhxvrBA3jsKtcvR7FXMBsYJ2KnZ4LgKqywzNgNYC2QuSTynIP9QOXS40aYxa K9GhzlkJxK0umk4n1H1pKTIpvZbiZ4q8M3K80V0ie0sJQFOuQIn0sdmJDLORRRDnXOFM RdMNxI2W1e/fIkq6BMZ+fzEiPDc50JUWMd6YvmqG6vWoN72jXnSLEG/ArvYTj3bQYB6O pUZe8tesfdXwJ6AMaJmLqAZUV8kDngnarbkfUIx2UAQowIgUbPkBRgx/1BaRLnt6nE9X Zj5Q1ImVR4MMFjMs+Xk5XGuAZDfbYBzH+OhaNX4SYOkF816U23st3WrGTZY0uw6tzd0+ 6l7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=dA4iCf8Eao+ULQW+L2lG8WyiLb011gqYm6UvOIC33BI=; b=0togo6wlprdIf8nTnMEYNXs+SyFc6UhP1VZ/mSmpf6OLw6YY35FnqJ61q2++ZP4g2L vsvIkYQcFFkRm+Xqqe3D093ckunFFUQbCFWq/Rr4sbLCiQut3Lo1u5+m9+QJGSN2byXY yhZ3fhaUCYeRiz4WHtIX9bnr5mkl0kHNQJj68ttXTVZ0VCSZUHJEw3YBSb2ZRtWXboB0 KapJ0wrm2j/vUlF1FEYb8u7jMkcY5N8ABGbAJthUTDNw32WyFQQyPXssMmLOJtchfpcA o3359MCBC6CHa/AXQYcGvKe8nfxifGRXKpdCfXFvL+GxJcxzlqTdRdTVG0PQQ7y6h/tk o7vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f137si4092054qke.171.2020.04.11.20.24.17; Sat, 11 Apr 2020 20:25:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726846AbgDLDUD (ORCPT + 99 others); Sat, 11 Apr 2020 23:20:03 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:5393 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbgDLDUD (ORCPT ); Sat, 11 Apr 2020 23:20:03 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.17]) by rmmx-syy-dmz-app10-12010 (RichMail) with SMTP id 2eea5e9288cd600-1c81a; Sun, 12 Apr 2020 11:19:41 +0800 (CST) X-RM-TRANSID: 2eea5e9288cd600-1c81a X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.0.106] (unknown[112.1.172.56]) by rmsmtp-syy-appsvr09-12009 (RichMail) with SMTP id 2ee95e9288cca75-41b3c; Sun, 12 Apr 2020 11:19:41 +0800 (CST) X-RM-TRANSID: 2ee95e9288cca75-41b3c Subject: Re: [PATCH] btrfs: Fix backref.c selftest compilation warning To: Qu Wenruo , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200411154915.9408-1-tangbin@cmss.chinamobile.com> From: Tang Bin Message-ID: <4b1e57b3-ca0d-f3e0-f4c4-72cdfe943d7a@cmss.chinamobile.com> Date: Sun, 12 Apr 2020 11:21:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 > >