Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp552684pxf; Thu, 8 Apr 2021 08:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDe28UxwOWvZv02aHX5yAdFF1rfu4soIPOuuMomcdSExf5/YX4bMuDiv7RWX9Y+a/n09Lq X-Received: by 2002:a1c:98d1:: with SMTP id a200mr9358973wme.14.1617895376315; Thu, 08 Apr 2021 08:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617895376; cv=none; d=google.com; s=arc-20160816; b=bjBD2n61Ktu2XDKfx0DJaUQt7SGwz0so117avCwF+49/vYztdp/a+WuTHS4DJTPUPM qn9ypt7svtPjtg7tF7SV70+Ce5jU0T9Qpqy1YR+KkTVWXXtltQe/uWjEZIgGySM2YjBI X4pJJpMAkpyL+4clN46biFkGaZr0aQDGb0vvCOZnKh2bS29KH4C+BEvhc1oVK+T8KNOO 05DWVgA/gV/B6eEJo4lpVSy7fyc/U7ckYDsdTYK3k1Xggj8UTedP/X9k8NXyLsTuP/2F xjl8ZcEb5V/k+JOY3hGTAtXxpKMiHlM0IRWKy1ZPnG7NvtmHgtrXFuzOW3kjHgbRBOKx YWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6KZFzK+nzEQ00+8KcSgL3f5DvNG68xJ2rg8Oh+jD2PI=; b=qmLQkUgM0+nVnfDcaWiZstN7KvcKI1d7DjN2GikM9Iu97r+5j/PWcXn0CvwkqL9UNX bEn7W73z/lw1YO8tu+pvCTBjRp1+7bIzbPGSZMt/hBhNw1sdTAEe3CNT0vSxTLLA+4C0 +EbpIwqtTwyK3zyh8BenIMYJZzpvzI4DHiX7khj71GOHMGtfyRXQUSxJCHtMqbKRl3On R1t1/ZVaVfMpvoHD+XUA1ny8Pk2LQeSBjjPfRVvkXJ2TNRhyXYcIDQ7tFJZY3MDk9ukQ w3ihnEIMrGMYjnC0jUJXQaljDU8PF9eer/GAmfhMQmYrzzN2/ZZU1BMS/S/G0JpkUkW3 V23Q== 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; 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 d7si345571ejd.707.2021.04.08.08.22.33; Thu, 08 Apr 2021 08:22:56 -0700 (PDT) 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231923AbhDHPV0 (ORCPT + 99 others); Thu, 8 Apr 2021 11:21:26 -0400 Received: from mail-ot1-f53.google.com ([209.85.210.53]:46719 "EHLO mail-ot1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbhDHPVZ (ORCPT ); Thu, 8 Apr 2021 11:21:25 -0400 Received: by mail-ot1-f53.google.com with SMTP id d3-20020a9d29030000b029027e8019067fso725599otb.13; Thu, 08 Apr 2021 08:21:14 -0700 (PDT) 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:in-reply-to; bh=6KZFzK+nzEQ00+8KcSgL3f5DvNG68xJ2rg8Oh+jD2PI=; b=Nt1EqAU4hIt0eQnsQGyENwmZvZCK54MSaNjunRxLJtzHATn9YiVCOkwRLNKaidxu8e np75hrqwYb4WcF7GpizF7Xib5w+U/cFmaiWSxzJ+RgxKUcOsKyhm4s4t7t1F9fh/Ts78 LtYQSkihdNsebXAZ7RCfDCi/6IVy5v/DNJRQiOCSXVpWGtcynlkn+Fnjvpflv9316sQf sk8MTTKzS1hVYsxwo1/4HLd/SoCXtdUClxpdTJaCyMIz3XKQ/DEDn2mPwGQA1qUstBNG G9Lq4BaobCybwvImJzxVBHXK/C5y73kONkFmcbq339bY147QhHVg2Pl2ZwwO88YJ1GPB 4Lmw== X-Gm-Message-State: AOAM53093E4mvjuHLYd1sjwBYmAWcBIevzF65BAEKZU4szDNJ7qCeWpi PObYp/e9Z9/1RSS6yrsaEw== X-Received: by 2002:a9d:5a8d:: with SMTP id w13mr8142482oth.145.1617895274012; Thu, 08 Apr 2021 08:21:14 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 68sm212184otc.54.2021.04.08.08.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 08:21:13 -0700 (PDT) Received: (nullmailer pid 1506966 invoked by uid 1000); Thu, 08 Apr 2021 15:21:12 -0000 Date: Thu, 8 Apr 2021 10:21:12 -0500 From: Rob Herring To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , Alan Stern , Frank Rowand , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Douglas Anderson , Peter Chen , Michal Simek , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Bastien Nocera , devicetree@vger.kernel.org, Stephen Boyd Subject: Re: [PATCH v6 3/5] of/platform: Add stubs for of_platform_device_create/destroy() Message-ID: <20210408152112.GA1493009@robh.at.kernel.org> References: <20210405201817.3977893-1-mka@chromium.org> <20210405124900.v6.3.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210405124900.v6.3.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 05, 2021 at 01:18:15PM -0700, Matthias Kaehlcke wrote: > Code for platform_device_create() and of_platform_device_create() is platform_device_create()? > only generated if CONFIG_OF_ADDRESS=y. Add stubs to avoid unresolved > symbols when CONFIG_OF_ADDRESS is not set. > > Signed-off-by: Matthias Kaehlcke > --- > > Changes in v7: > - none > > Changes in v6: > - patch added to the series > > include/linux/of_platform.h | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > > diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h > index 84a966623e78..d15b6cd5e1c3 100644 > --- a/include/linux/of_platform.h > +++ b/include/linux/of_platform.h > @@ -61,16 +61,18 @@ static inline struct platform_device *of_find_device_by_node(struct device_node > } > #endif > > +extern int of_platform_bus_probe(struct device_node *root, > + const struct of_device_id *matches, > + struct device *parent); This is also only built for CONFIG_OF_ADDRESS. But there's no need for an empty function as it is powerpc only and should never have a new user. > + > +#ifdef CONFIG_OF_ADDRESS > /* Platform devices and busses creation */ > extern struct platform_device *of_platform_device_create(struct device_node *np, > const char *bus_id, > struct device *parent); > > extern int of_platform_device_destroy(struct device *dev, void *data); > -extern int of_platform_bus_probe(struct device_node *root, > - const struct of_device_id *matches, > - struct device *parent); > -#ifdef CONFIG_OF_ADDRESS > + > extern int of_platform_populate(struct device_node *root, > const struct of_device_id *matches, > const struct of_dev_auxdata *lookup, > @@ -84,6 +86,18 @@ extern int devm_of_platform_populate(struct device *dev); > > extern void devm_of_platform_depopulate(struct device *dev); > #else > +/* Platform devices and busses creation */ > +static inline struct platform_device *of_platform_device_create(struct device_node *np, > + const char *bus_id, > + struct device *parent) > +{ > + return NULL; > +} > +static inline int of_platform_device_destroy(struct device *dev, void *data) > +{ > + return -ENODEV; > +} > + > static inline int of_platform_populate(struct device_node *root, > const struct of_device_id *matches, > const struct of_dev_auxdata *lookup, > -- > 2.31.0.208.g409f899ff0-goog >