Received: by 10.223.185.116 with SMTP id b49csp8428281wrg; Fri, 2 Mar 2018 01:22:46 -0800 (PST) X-Google-Smtp-Source: AG47ELv2LfM9D0GaXJN20gkd9E47566UM3JUymCpbzfG/ZsYkMbN0zUdPhjB8dEiJV+M0pRNxU98 X-Received: by 10.101.90.10 with SMTP id y10mr4051776pgs.34.1519982566100; Fri, 02 Mar 2018 01:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519982566; cv=none; d=google.com; s=arc-20160816; b=HHrgQRDvxbitelN0Z+P/ysXb0dvFEkz89bw/AvFxctj62qoqrWH8UxZsOO11cM7ygc tkj0qQgbDXxKVdo1BxzYUxQlzcp34HkaD6oTq9AfaC5aJmH+LcsEDKg6s5FlOO0MysVq 5UVlJBaMkh/6vfPcxf7OPVU64mTT/kvnXY9d6uzNi0+5KZFF21mSmPePiEHkF8yhpldk lfCX4OGULIkmTUKDbSxoV5P+0VooOhuuziQ735IYDOSPlMHGjESzULEzQ0Kjd8ssXrfI bb23t0+hXPFAQl70an0jUG0+dPocwUUU7oXzIK6kpyeMTqMRImccmdBN4HVUnb7wea2x Nvgw== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=/6NtsnjUSH4UiPy7ZOOLFQR03Vf73pYoTGsokeuMrvY=; b=jZE0W8DuaGcGqNyEE0bxQGT89U8p2TlT9Oj9/l12SNL/Mp4wzXBfmrUlaEQOG6FsnJ wLY3AiZekoOmMctp5cPIjF1Tc4rCHiodeS+OJrc08CFzj29Kj7ebxUVt6LXKYZsJSRBq eKlIAFnh8Um82OP5e7X2g2d3RfLR/hBv06DzBab+f0kyVpDOEbhPXgK5pURu3kbjoSfL gErZdbys7s1JVMpGUY0LkPwOXmwxrWhGjK42Z3TORm5nrLmoablXxUijhicymEasgz3q 278kALA8d23pGYGR2u15f9flGYcKAzqpyu1zUqLyqdc/O8wDLwsLVkfJaff1g4N9b8tW azxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VeGzUqjQ; 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 m186si4574287pfm.25.2018.03.02.01.22.31; Fri, 02 Mar 2018 01:22:46 -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=fail header.i=@gmail.com header.s=20161025 header.b=VeGzUqjQ; 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 S1425483AbeCBJUu (ORCPT + 99 others); Fri, 2 Mar 2018 04:20:50 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:37446 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425206AbeCBJUe (ORCPT ); Fri, 2 Mar 2018 04:20:34 -0500 Received: by mail-qt0-f195.google.com with SMTP id r16so11101521qtm.4; Fri, 02 Mar 2018 01:20:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=/6NtsnjUSH4UiPy7ZOOLFQR03Vf73pYoTGsokeuMrvY=; b=VeGzUqjQqu7vrjy08T7S6oJstkVp+wZ0bABjnkL7jJEd2rNpOe4CavgYWXjYdcjhE9 cCGMkY9TObrTXgaQh+eoogIU0LRCE33KrRiKoun/GhZlKVyiq4Z3DREGFB7P+02bNG+a 7EPa9y7SfZk0v7apUg23xbCneR+U66GiKsBrZsVYOLf0J3ZgTBpeKqv9Tw2YkGEis2+9 i/QhHb4LhLL079NagFGK4F5k92Wi+z5yHQPi5qHPnnlPW1lsesPnA2GhONh2IU+MhMfR fAevFSAiUQzj2xIz5Z1eeUklGGAhg0nGzSQNC746hyDFhvP376YnpQUY4gCAGrLsWIyu TgFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=/6NtsnjUSH4UiPy7ZOOLFQR03Vf73pYoTGsokeuMrvY=; b=tpWl5KbJpS9huHrJ4qaJD0WwCBYEZKxglw5BySelm4MTO2Ki+xxZjy72fsoDGfPmV8 t4zb2OE45XsayFBTgYX8BXsiqSD52k6qJlCCEdw089Del+5maiVsVGsDXn06Wk6yBslC ONNJw6ZI9440KKPAB9J2LRzuzPo+3svDXEGCNq1Kfr1c96yktX4C7S/V4PF1HYgq7OSb QorW3VybWsiTrdmq8Sq7Ipfx0DTzfaM92mXVZSL9cRe2a0G7MAOD+05pbNVATFwh0fQ9 erRx/2vt9OcKoMDAQFJ5Ca4TYOqjKU+Atk1U4Ntkj+8tCIjLr0a/iirgzvNlwT1LGWFK /Zhg== X-Gm-Message-State: AElRT7EAnIafuPGJz3Hd3N+Opkuqcz1EwzQLPBAQ8MKcDeJZZEsBt+Pm QDpiv3Yp6vwcQb4kY2Lelr1I4u5yJ1vut+wM0N4= X-Received: by 10.237.36.110 with SMTP id s43mr7587436qtc.23.1519982433340; Fri, 02 Mar 2018 01:20:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.47.219 with HTTP; Fri, 2 Mar 2018 01:20:32 -0800 (PST) In-Reply-To: <1519955520-29975-2-git-send-email-frowand.list@gmail.com> References: <1519955520-29975-1-git-send-email-frowand.list@gmail.com> <1519955520-29975-2-git-send-email-frowand.list@gmail.com> From: Geert Uytterhoeven Date: Fri, 2 Mar 2018 10:20:32 +0100 X-Google-Sender-Auth: JCONaaliWa0eJCPFQVKNI3s40hk Message-ID: Subject: Re: [PATCH v5 1/4] of: change overlay apply input data from unflattened to FDT To: Frank Rowand Cc: Rob Herring , Pantelis Antoniou , Pantelis Antoniou , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Laurent Pinchart Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > --- 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 =E2=80=98of_unittest_overlay_high_level= =E2=80=99: drivers/of/unittest.c:2193: warning: =E2=80=98overlay_base_symbols=E2=80=99= 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. 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. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds