From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FC4AC4741F for ; Mon, 28 Sep 2020 08:11:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48BFA20738 for ; Mon, 28 Sep 2020 08:11:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zP8NYXRe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgI1ILS (ORCPT ); Mon, 28 Sep 2020 04:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgI1ILS (ORCPT ); Mon, 28 Sep 2020 04:11:18 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41442C0613D0 for ; Mon, 28 Sep 2020 01:11:18 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id s12so126566wrw.11 for ; Mon, 28 Sep 2020 01:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=3Om8AM0og3VSpQeTBf6KDEd6fTvU4EBwksk93Od+7XE=; b=zP8NYXRey8PZiMa7RFwghBPT2Dc4+Ur8JaLQI+2+KYxtrdBbqWKx48YjuRKHPPWSOU 5xt7FKRwGDHAE6z93txxJTSUOg+C2tezWbuztJ4rhH/vOdkhrzQcCqXphX+RhSOKcgTG 6QAWX0bDLdtsqTxL1B7NLqf/8PGxGoiO3IQNcVmQ9q5AQ2iK8KRW2lTNC0snqyRBKmg5 PPVCceUSJ9eW3Yp8Dvf7mcmYfSuGALqaTJ/TSog6tXvL8mhKsuLKzytTgabdr1S0kWZh DSyectg7UHR8he9nZWUernPUsT+eUWdd3KIxmED2ynqZouc6//KO7mas53rIuEziLJmg FteA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=3Om8AM0og3VSpQeTBf6KDEd6fTvU4EBwksk93Od+7XE=; b=ERgC3Ag0nR7vhG4smQDs7pv6XpMLlJSj7yhG/RCUDYdI8nrlZe0PEyJ7kl6ACEWhNA tuAi9eYoKdBHIgGKQmivQ9AhKecf1PLatusnbaQ84ueXYbJAA+5nL++YVfXs1yA6Ygo2 Mfhf4HMLvwDRVfE/unq2nReIqeqyMoh/aOg8sc0Ao55kZHF2NS+fY00G4cwwUK/DALBh x98+H7TqaQCJQ/OUSDJ/3/53Mf6vT+lw1x2f3sxThyAqZjKwyoPJvbU7UjT/m1746THI yClzHc2DA2/WWxmJ+fpgbgXnQxeReMjexediSeQ2v9+Yar3vXNKB61T7P+c41z/7I5tZ /rbg== X-Gm-Message-State: AOAM5302kqUFuT0y7+xVRIu6KwUehx+atk29A/byPGZUOm6FF/j6onUR dmeIQN5rpdlyvyRKxGcxD8Z9ZQ== X-Google-Smtp-Source: ABdhPJx4wZkzF3Cjm+E8FPeYtfeDpEEWLUCh5tL5TcU4QxwFiQSUEj89+dCLi1uscJNz2vM2DABLlg== X-Received: by 2002:adf:fa02:: with SMTP id m2mr240193wrr.273.1601280676803; Mon, 28 Sep 2020 01:11:16 -0700 (PDT) Received: from dell ([91.110.221.154]) by smtp.gmail.com with ESMTPSA id c4sm222217wme.27.2020.09.28.01.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 01:11:16 -0700 (PDT) Date: Mon, 28 Sep 2020 09:11:14 +0100 From: Lee Jones To: Sakari Ailus Cc: Marek Behun , linux-leds@vger.kernel.org, Pavel Machek , Dan Murphy , =?utf-8?Q?Ond=C5=99ej?= Jirman , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Bartosz Golaszewski , Sean Wang , Matthias Brugger , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Orson Zhai , Baolin Wang , Chunyan Zhang , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Liam Girdwood , Mark Brown Subject: Re: [PATCH leds v2 05/50] leds: various: guard of_match_table member value with of_match_ptr Message-ID: <20200928081114.GB4637@dell> References: <20200917223338.14164-1-marek.behun@nic.cz> <20200917223338.14164-6-marek.behun@nic.cz> <20200918061500.GD26842@paasikivi.fi.intel.com> <20200918112058.6d3b0d5d@nic.cz> <20200918095759.GG26842@paasikivi.fi.intel.com> <20200928080336.GA4637@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200928080336.GA4637@dell> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, 28 Sep 2020, Lee Jones wrote: > On Fri, 18 Sep 2020, Sakari Ailus wrote: > > > On Fri, Sep 18, 2020 at 11:20:58AM +0200, Marek Behun wrote: > > > On Fri, 18 Sep 2020 09:15:00 +0300 > > > Sakari Ailus wrote: > > > > > > > Hi Marek, > > > > > > > > On Fri, Sep 18, 2020 at 12:32:53AM +0200, Marek Behún wrote: > > > > > Change > > > > > .of_match_table = xxx, > > > > > to > > > > > .of_match_table = of_match_ptr(xxx), > > > > > in various drivers. > > > > > > > > > > This should be standard even for drivers that depend on OF. > > > > > > > > After this patch, none of these drivers will work on ACPI systems anymore. > > > > ^ > > > > If CONFIG_OF is disabled, that is. > > What? of_match_ptr() is designed to change depending on OF or !OF. > > Are you confusing this with acpi_match_table()? Okay, I just grepped the kernel and found some OF matching in the ACPI bus code. This seems odd to be (at first sight at least). I'm not entirely sure how this is supposed to work, but when you disable OF, one could reasonably expect any matching utilising OF based tables to be disabled too. Not using of_match_ptr() on ACPI enabled platforms sounds batty to me. If this is valid, perhaps the of_match_ptr()semantics should be changed to include ACPI. > > > Hi Sakari, > > > > > > I don't understand. Why not? Does ACPI subsystem parse of_match_table > > > as well? > > > > It does. The compatible string is used the same way as in DT for matching > > devices with "PRP0001" _HID or _CID. > > > > Please read Documentation/firmware-guide/acpi/enumeration.rst . > > Could you allude to the specific line you are referencing please? > > > IOW, you can safely do the above only for drivers that depend on OF in > > Kconfig. Otherwise you'll probably break something. > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog