Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3458933pxb; Mon, 25 Jan 2021 17:28:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9NEFz42tcBJ2QV6QYbbn0uO89PB/6zN8ZBzAg3JVR622S+hzTGafazVeGj3sZ/HTHOWgx X-Received: by 2002:a17:906:6407:: with SMTP id d7mr857203ejm.133.1611624486708; Mon, 25 Jan 2021 17:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611624486; cv=none; d=google.com; s=arc-20160816; b=k2l40SR7evUfaYUcsr828STpnuMLt5acz1vERkCW0UzpyQVsU6zjLgG+/eHRafx5cZ XUkTUDtphJ53Jf2DWu0geErhe+aZbTXfzY7youNogfuwzLBR44cQ8lGze298Rjob8AH0 mfLDXhWzUCLlfxljNlXVsWgngof7x8ISIUUi+8FHV30EWH4d5zm5JVsYgG0T/PP6z8fT kmFlmPkGZadlQpaI12ItkwdYyV4TNBfIWURtMip2MDDoCLEnX4FwphkTZUdjq1B25tCT PPbIV0Hs26Flu02Xh3PuXSO1v7+mylLJDW1XxmjNMyZ49GDqMkpxViUrw/FvQ5ROIfcP +Bww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=zmj0pdUkoSOT9BVVzR68XbIFYjfQOs5SmAGy80cJE7o=; b=qNoj9kWetq/wnh8ClTz16VzECM+fSZifzHB02/7UIbzNhHeFm/xrSQXJizOWK+D8v9 wn6qoohe3nYEtC2TjvqLL7+iBr8U85LF0qy0Na7+ouqwgXbzQ5xHRUmHzPudm7leMFAx b+I5Xvg00/VU+q/m+w3tLtr3Ho8qttNRdvP+ACVmFAkHzGLygS2ndpCMp5uctdKkqDn1 DhtwyS9oWihVWHow4KDnUDLncXFkLcTKEGQroW87I9JsJYrOD3tEx7I6sEsIA6QA9sZV vW0XobrJgoLIdCPjI7WNDEjAhUdxnH29cTA5b3sEsB3UUlmSrm7y5bWAw9n2YMVpNIWR pM8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si8450097edd.505.2021.01.25.17.27.42; Mon, 25 Jan 2021 17:28:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726114AbhAYI7e (ORCPT + 99 others); Mon, 25 Jan 2021 03:59:34 -0500 Received: from mail-oi1-f181.google.com ([209.85.167.181]:41083 "EHLO mail-oi1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbhAYImu (ORCPT ); Mon, 25 Jan 2021 03:42:50 -0500 Received: by mail-oi1-f181.google.com with SMTP id m13so6012743oig.8; Mon, 25 Jan 2021 00:42:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zmj0pdUkoSOT9BVVzR68XbIFYjfQOs5SmAGy80cJE7o=; b=Z44rU/wlfJSroV8sJ0m8ziX6jvyZwMUbmsBUAGP1Qfm2CyCAWMQLXT/zkGJH37+Yha bT+gmH8hSN9e1xCJNN8FwJdovbomeZBziDULjFBPA5tTbvQ9ynMEkI6qZPAW5FPYpIX5 7RbWzA1lshd0uRhc5AHPdW1eiVQlIdBDbh4xib0iLEtElr74LGehSZ7+JpluQFV3x4DY 7VNlOhep0GqL7kZVL0z/iMgthn5HaXw1WwaOjgUlm5I1NQf0Vjs+Y4IWnZpduAyc2DRQ ykSveUudPhCOSQw8z+SwDoGc4fy/wsXyGtWEjBPoZ9WLbnNDkE+EwQpOlY4UBQXgqGaW MYmQ== X-Gm-Message-State: AOAM532ZI8UN48JFjIqHNBvu7aqg9T+Qdtb4fI1nCisgpbTTM1hVESW+ AhivUjxIauAX+KVUfuLEuWOiEgZigNGpYxD1Zg678BBnoEM= X-Received: by 2002:aca:1219:: with SMTP id 25mr524863ois.54.1611563618938; Mon, 25 Jan 2021 00:33:38 -0800 (PST) MIME-Version: 1.0 References: <20210123034428.2841052-1-swboyd@chromium.org> <20210123034428.2841052-7-swboyd@chromium.org> In-Reply-To: <20210123034428.2841052-7-swboyd@chromium.org> From: Geert Uytterhoeven Date: Mon, 25 Jan 2021 09:33:28 +0100 Message-ID: Subject: Re: [PATCH v2 6/6] of/device: Don't NULLify match table in of_match_device() with CONFIG_OF=n To: Stephen Boyd Cc: Rob Herring , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Frank Rowand , Arnd Bergmann , Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 23, 2021 at 4:44 AM Stephen Boyd wrote: > This effectively reverts 1db73ae39a97 ("of/device: Nullify match table > in of_match_device() for CONFIG_OF=n") because that commit makes it more > surprising to users of this API that the arguments may never be > referenced by any code. This is because the pre-processor will replace > the argument with NULL and then the match table will be left unreferenced > by any code but the compiler optimizer doesn't know to drop it. This can > lead to compilers warning that match tables are unused, when we really > want to pass the match table to the API but have the compiler see that > it's all inlined and not used and then drop the match table while > silencing the warning. We're being too smart here and not giving the > compiler the chance to do dead code elimination. > > Signed-off-by: Stephen Boyd > Acked-by: Frank Rowand Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven 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