Received: by 10.223.185.116 with SMTP id b49csp9044255wrg; Fri, 2 Mar 2018 12:17:12 -0800 (PST) X-Google-Smtp-Source: AG47ELtLfdOSZ2AsYTWMsYRykzLcxepM5O1VVJ1CojMo6NvC2ngVXhzFPLlBiWWk73zNZxowcYy+ X-Received: by 10.98.72.10 with SMTP id v10mr6780332pfa.148.1520021832406; Fri, 02 Mar 2018 12:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520021832; cv=none; d=google.com; s=arc-20160816; b=vSF36Qg3n6+PfRaOUR6yaCMBSNLrEtqo62XM6hbEAIAnoIEJCS2az3622IAEZ6VuOO AT2QNHXf68I3P239BhHKerrsrbmaNDhS9pJ8eYL/rV2vZIW9nh4wXdqAj3HKcdZS9tBI 3vuiqchkNcVpmlGCjjuFBWWk0TnZJygkVoNuPSlm5Jigyi8hN2HT8+GQWJTgoDAh3aG5 PySXaKuKFtmdfpqRY8/zHOeLes2oRiXrN27bdTPSqxxqz2pt/GDxVQeMzMoDVYZKGk/L MAbf/fxT66FBrPQu9VfngmJP7uzDXLWoaalKOCsKRbExYvTHcBIDTl7WYfz26D5MivuB PyAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Ca6BnZCfZcV9mCjRNGU17BladNwawKJHrWP7ftKPRD4=; b=O8+egeuohl4hwEeOiNjtFT4Fd1hE0eFPxjjgF7jXDCz3YFaabqlICdtfD4iUh+ZsR7 Pd4Mv4NIsq6zMcnoPaWMfBquGZPmz3sjQ/QOiXaBizzZ9jV2lqzdTP6/NMB3iS6fjByw Ig6+CEOKMID9jOmf8BlxWU4CMwnmP32Vbn913sVsZXF0jb4LLzMIfyCarkgu4pczNIMf eKxCkgDiqjzT9EmAnAZGAHSXYjXCAscBqOBbecfSpnK0Ay0V7Wiy1ZEeXHEweLtGXgzr IMSFosL3/aXAJZFAfuP0gi7MECAngVgIccC75c4urOJl8tM8mWmjBt+4MzQuREDJlpya /lRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mf4+TV+r; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si3434234pge.24.2018.03.02.12.16.57; Fri, 02 Mar 2018 12:17:12 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mf4+TV+r; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1427971AbeCBR22 (ORCPT + 99 others); Fri, 2 Mar 2018 12:28:28 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45411 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424941AbeCBR2Y (ORCPT ); Fri, 2 Mar 2018 12:28:24 -0500 Received: by mail-pg0-f67.google.com with SMTP id i133so4027017pgc.12; Fri, 02 Mar 2018 09:28:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ca6BnZCfZcV9mCjRNGU17BladNwawKJHrWP7ftKPRD4=; b=mf4+TV+rzxHg7e/iCsw/lVqQrouE7gD4AXnhz6OJye/UVML2jwGn4Iy7mjLEFKcyLT HF0v9ujBf5mKG81jSo3JL3YsjUV3pEKc6/rf53U/2XpotLowCeJPtRQv/L6k5MtUxGSu mN6ODCtcIhMN64Lu29icd4iT048CUGKt0Nxrn+2WZaVQFbUVfJIv3hwBcL+c2IjkEz9r jvv3CdEfH2SDkI1yeYvnrjpsnqkQT3vhYpnSJLvAuwtIhASAIu8HiML8WDyxrMbZBjSW 25sSR1u8CjMSJt9xsQW7woPDwvbBEQY5X9ml9X/F/7Y8DtipRrC+vf/7YQevm+wRzUiJ 8jDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ca6BnZCfZcV9mCjRNGU17BladNwawKJHrWP7ftKPRD4=; b=iqItdjj4U5AL7b/7cgqHe3WreTZEFrhr4stnxo0au06wl1zvkIJ+2JE5+T6Pso9UcS jrY4OJWPSKPhkxpG9RrwKoJSSV6z8OPJviqSea5en8eE0DiS0ExUcN6CGsMnFZ0wJVAr 6EUG3mIpzE0Ftzd93460Of9LmM7YSra7OzBznfGXFlCwfoUIlUfQVSAPGH7l+fSmM13j 3v00K7L0EutjuUQ+f494hsfXy5htfNvEMC1G0MtybJ8P6UyL1DQxepJTXsbQOvx6jmqo 8cYRJc00xIJB3a1K4mzwXp3He06jLThmNM6T3RP2l6KQqtip/m/ifcjyFOw9jriOw8pS Ly8g== X-Gm-Message-State: APf1xPAxdEOq2ZZiBrWD9U67WlXXOHHUfPK6hIF63Q8L5WmkxwQa0aKO NTgQFSlJjdrDB3pa9iM01/A= X-Received: by 10.98.75.129 with SMTP id d1mr6399407pfj.19.1520011704012; Fri, 02 Mar 2018 09:28:24 -0800 (PST) Received: from [192.168.1.70] (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id 83sm13885003pfj.151.2018.03.02.09.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 09:28:23 -0800 (PST) Subject: Re: [PATCH v5 1/4] of: change overlay apply input data from unflattened to FDT To: Geert Uytterhoeven , Rob Herring Cc: Pantelis Antoniou , Pantelis Antoniou , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Laurent Pinchart References: <1519955520-29975-1-git-send-email-frowand.list@gmail.com> <1519955520-29975-2-git-send-email-frowand.list@gmail.com> From: Frank Rowand Message-ID: Date: Fri, 2 Mar 2018 09:28:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/18 01:20, Geert Uytterhoeven wrote: > Hi Frank, > > On Fri, Mar 2, 2018 at 2:51 AM, wrote: >> There are still some functions in unittest.c that should be tagged >> __init due to changes in this patch, but modpost is not warning of >> them and they are not a risk because they are only called from >> __init functions. A sweep of unittest.c for functions that >> should be tagged __init is on the todo list. > > If modpost doesn't warn, that merely means your compiler decided to > inline all functions with wrong annotations, hiding the problem. > Other (versions of) compilers may behave differently, so we do want > to get this right. > > With my trusty gcc-4.1.2: > > WARNING: vmlinux.o(.text+0x342dd4): Section mismatch in reference > from the function of_unittest_apply_revert_overlay_check() to the > function .init.text:of_unittest_apply_overlay() > The function of_unittest_apply_revert_overlay_check() references > the function __init of_unittest_apply_overlay(). > This is often because of_unittest_apply_revert_overlay_check lacks a __init > annotation or the annotation of of_unittest_apply_overlay is wrong. > > To fix the above: > > -static int of_unittest_apply_revert_overlay_check(int overlay_nr, > +static int __init of_unittest_apply_revert_overlay_check(int overlay_nr, > -static void of_unittest_overlay_5(void) > +static void __init of_unittest_overlay_5(void) > -static void of_unittest_overlay_11(void) > +static void __init of_unittest_overlay_11(void) Yes, that is exactly the extra set of functions I was talking about. Even though I would prefer to annotate them, in practice they will not be a problem because they only get called from __init functions (either directly or indirectly). But if Rob will take a patch with them annotated, I will spin the series. >> --- a/drivers/of/unittest.c >> +++ b/drivers/of/unittest.c > >> @@ -2290,18 +2275,29 @@ static __init void of_unittest_overlay_high_level(void) >> __of_attach_node_sysfs(np); >> >> if (of_symbols) { >> + struct property *new_prop; >> for_each_property_of_node(overlay_base_symbols, prop) { > > drivers/of/unittest.c: In function ‘of_unittest_overlay_high_level’: > drivers/of/unittest.c:2193: warning: ‘overlay_base_symbols’ may be > used uninitialized in this function > > This isn't a new warning, so I guess I never reported it before because I > thought it was a false positive (misguided by the "if (of_symbols)" test?). > > However, now I believe it is not, and an uninitialized pointer will be > dereferenced if of_root has a __symbols__ node, but overlay_base_root hasn't. Yes, thanks for reporting it. My gcc isn't this smart. Fortunately overlay_base_root does have a __symbols__ node. But I will fix it in a patch outside this series. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds >