Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp453030pxb; Wed, 27 Jan 2021 11:48:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoUaA/FlPAhVnW4vw2iptR/Fm9W00RNKvDcxDGs2tDwSt2L6XwXfsySCgxNIOXNowvXJ6T X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr8393582ejg.166.1611776921011; Wed, 27 Jan 2021 11:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611776921; cv=none; d=google.com; s=arc-20160816; b=umFvAD0fzmb/58e1T+boEefwc2TwNN6ZW8xDiTSYIGy5DAVtZVN+1jW1DH64YBlsIM 4cdul4nMVkbURIEqQ9zkY+jdTsiOsn38MmRxNUHxPJEPZC2gWFHb6Y4QCfZbplvLFoop bTrpmKTJBs8aTvtUgUAVQIUmQfgCxy4Evrg8IgOdcgsQceO6fktY9/F5KFNCdgTr8Ho3 9q7/+Cq/sNnh4B3SevFqTClxCvOzYw9SlCd6XQSld/WwxE2VvcVBe6OhC5Yaf06F3uIS 3zotDlXVHR3e42uQwNVm3BtZVttrfbONExGy9rvQKkpuJeG5MfJFxaPvbkX6p64CO27r eIsQ== 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=ZAHqsgPLNk7aaXyiJP9zL/elsb83+uuc8lXIEn7zmUk=; b=yLMrmNTmGX6C6yq9cj9r/LCswQnl1K3aqfjzB7cOAtO0xPdySlx6Ty0umBb6cFO7PD Iw8I/kZKGfkDR8tuNeASmy/BTQvZbWnboxYWjcZkJwhoE0KxpWF6V1ZnYJD6F1ajlP7R 3vv4aop7QckWKuP7Y/MQNHdIjE3s3daqAZ3CvgDtUG0iPMg8ciWealrZ2/oFz0llUNde 4ri3Am7CJf+NFl4xwzXOOR3g/nq2/cAFARCQ5FUsmfovEIAR3+ONpRQnzXROaTpDZmIn 56URP+6kTo3qWq6psjNx93AgsJXpo9P3JreEjg53KD4whOJA3f7kHsfc4G7aI3ypK9xI hg8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbOc4zip; 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 f27si1231190eje.437.2021.01.27.11.48.15; Wed, 27 Jan 2021 11:48:40 -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=DbOc4zip; 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 S2392150AbhA0B3A (ORCPT + 99 others); Tue, 26 Jan 2021 20:29:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:48712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390018AbhAZSbw (ORCPT ); Tue, 26 Jan 2021 13:31:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 620E32224C; Tue, 26 Jan 2021 18:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611685871; bh=hwpSfinBZDh5+w+x/QjBXQLW3oRDY80SILSq+Y5HHDo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DbOc4zipI517A/lToLn+hLdBxnb+4ETZgccGUoDS8yTx9I8CKUKe43KkrBpH2KNhG e0TC9cE2cVJ36WFnsJ5mT095cOpAHT5QBmTtwlylevIm6IP0hcaSUAzzfro3uxMJIF ftPMqQ63SPF0NLgoBnzcnp/s94+cuxluyG8rzolofAm/h1bKrECj7/ccYV4kmB1vRP F3OJZfdJjkZSOKkNmVSk39VQGoAJkWiDpZdGvacm5sx9jttzp/E0xjt64kZQM1LItN 4uizTTRZqSBEgLk+gwWSVJbledYwceh17445fTuiVRxVGoXCXXuARoGHCK/hClwAoG sMu42Mx2KdqFg== Received: by mail-qk1-f175.google.com with SMTP id x81so14041717qkb.0; Tue, 26 Jan 2021 10:31:11 -0800 (PST) X-Gm-Message-State: AOAM532aqv1C31Bb7aQWOAOMfsnMtd3ajgVQFfokF2vfpvpQBkAUz0Yy g6+e7zqNEHRYM4iHXVAoFNYOnpZ4D1fK8nGDrw== X-Received: by 2002:a37:642:: with SMTP id 63mr6985257qkg.311.1611685870559; Tue, 26 Jan 2021 10:31:10 -0800 (PST) MIME-Version: 1.0 References: <20210123034428.2841052-1-swboyd@chromium.org> <20210123034428.2841052-6-swboyd@chromium.org> In-Reply-To: <20210123034428.2841052-6-swboyd@chromium.org> From: Rob Herring Date: Tue, 26 Jan 2021 12:30:58 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/6] hwmon: (lm70) Avoid undefined reference to match table To: Stephen Boyd Cc: "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Guenter Roeck , Arnd Bergmann , Geert Uytterhoeven , Jean Delvare , Frank Rowand , Linux HWMON List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2021 at 9:44 PM Stephen Boyd wrote: > > We're going to remove of_match_ptr() from the definition of > of_match_device() when CONFIG_OF=n. This way we can always be certain > that of_match_device() acts the same when CONFIG_OF is set and when it > isn't. Add of_match_ptr() here so that this doesn't break when that > change is made to the of_match_device() API. > > Signed-off-by: Stephen Boyd > Acked-by: Guenter Roeck > Cc: Arnd Bergmann > Cc: Geert Uytterhoeven > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: Rob Herring > Cc: Frank Rowand > Cc: > --- > > Please ack so Rob can apply. > > drivers/hwmon/lm70.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c > index ae2b84263a44..e3153ae80634 100644 > --- a/drivers/hwmon/lm70.c > +++ b/drivers/hwmon/lm70.c > @@ -178,7 +178,7 @@ static int lm70_probe(struct spi_device *spi) > struct lm70 *p_lm70; > int chip; > > - of_match = of_match_device(lm70_of_ids, &spi->dev); > + of_match = of_match_device(of_match_ptr(lm70_of_ids), &spi->dev); > if (of_match) > chip = (int)(uintptr_t)of_match->data; Why can't this do: if (spi->dev.of_node) chip = (int)(uintptr_t)of_device_get_match_data(); else { > else { > -- > https://chromeos.dev >