Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4171819pxb; Tue, 26 Jan 2021 14:29:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBfUfNDNpveoXwcay3c5bqGP81cExAVrPKsxuLBui2tISPrg+oje7k0ciSBWLeFoXm/Aec X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr5057674ejg.166.1611700157951; Tue, 26 Jan 2021 14:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611700157; cv=none; d=google.com; s=arc-20160816; b=IFN9LeE11t+etBfyyWD/eIyRKitwFhBi5tq80ErRyv7RLDGTInTYrpYCr764GIuiII bfTpw+jb8GqAyS5PDlakK57spVubSLhVwkWyiXJOny4ur79+orL76H4POik73rfalFIo OkUjHAvRr9ntoI3KD1pNoMNkYCr8lPILSpMmf+aX7S3A7ONgWHZu6lXQ2iO6menPpS7Y zZDYEh7DnILPPCtQZFKfN7Aja+vN9ewnNEMUhv2Q4T0r9/Kvf/PtpcKYUYIWLdcBYuOb g27gvUxdKJ6LGVfhCVcaqAt9zhyEXve44vzLu7zKtgwf6Ic44wFMxKVaCD/r1ID64vKk kliQ== 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:dkim-signature; bh=wrKmysGam3Lwbbad0YKj9d4UiWR6n9OsdTZ6BQwDYiw=; b=B23k++qhj2tC5tY9O4JQqMDwfnXhM4TbdljworSydBnVLLxiz5vxp7EL2m5XT4RnUB idPyf00U2kqGKn4Eb8yOB71aS+q7o1tHQ6nIYBQB4MceLIr8LaIwVYQQUTcq5fc9eZq5 f1gJbKwPC1esQHed8CvrcXJpqF0QnHGeRV127ZsSymX1OfekZz+zcklda9UAsb0SMd2G e8Klt2/dySyT6G0U3tNrPNUhHcSjfVAqGFPxrfAbhYYqijIqM/tchPED8ORta/Gkpgbb 8cUWKuO8C4M+i9R+PDVYk8Km37rmrtfES68ftmiStFqsXtnnJst+nIclwUiPG33XyWgA lC2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OPW3GoRO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si9190886edw.170.2021.01.26.14.28.50; Tue, 26 Jan 2021 14:29:17 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OPW3GoRO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731934AbhAZFTu (ORCPT + 99 others); Tue, 26 Jan 2021 00:19:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:42354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727128AbhAYJrs (ORCPT ); Mon, 25 Jan 2021 04:47:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF59B22D02; Mon, 25 Jan 2021 09:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611568008; bh=wrKmysGam3Lwbbad0YKj9d4UiWR6n9OsdTZ6BQwDYiw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OPW3GoROsrSnoLgyT9gB3S5qpvLx20z1OVwQPLQpSsfM1qIwOckhVyFr7vhEj6anM 61cdjnbk8NcHstneAwrQ9BolM5gFnq4cfHRhVUkwxC9Hxi1m0888Kdu30f78ajcfAc DWpjzDIcbjj7tDUFJFfvWbucHPmzqLAKb4D114S6evPdbGkfeta02MBnY5IMcgHSxN Ze1D+lr1onk7U2BecZnXQ5eR3f1u39SNNl7BiSbI4w50rx49C8ClLtLRAP60apZnGP T/wA4wGR1WtnLvE9ReQ9cVQdx8gMeGTmhe1k5++Ab4dRwckztDCyRe1MB3bkN9q4fa H8elj8qnapEag== Received: by mail-oi1-f171.google.com with SMTP id h6so12761390oie.5; Mon, 25 Jan 2021 01:46:47 -0800 (PST) X-Gm-Message-State: AOAM533GIohC+vOnaHGDY7X+WsMh0efqeXvESAxNwdsZ4BWqPLyndeVS j+viLKOkD3fJA+ZwtvW8aUgV157OV6uqfWpPDYo= X-Received: by 2002:aca:be54:: with SMTP id o81mr616678oif.67.1611568007124; Mon, 25 Jan 2021 01:46:47 -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: Arnd Bergmann Date: Mon, 25 Jan 2021 10:46:31 +0100 X-Gmail-Original-Message-ID: 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@vger.kernel.org" , DTML , Frank Rowand , Arnd Bergmann , Geert Uytterhoeven , 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 > Cc: Arnd Bergmann > Cc: Geert Uytterhoeven > Cc: Rob Herring > Cc: Frank Rowand Reviewed-by: Arnd Bergmann