From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suzuki K Poulose Subject: Re: [PATCH v2 06/28] drivers: Add generic helper to match by of_node Date: Mon, 17 Jun 2019 10:59:03 +0100 Message-ID: References: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> <1560534863-15115-7-git-send-email-suzuki.poulose@arm.com> <20190614203144.GB7991@kunai> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, atull@kernel.org, andrew@lunn.ch, daniel@ffwll.ch, airlied@linux.ie, davem@davemloft.net, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, f.fainelli@gmail.com, frowand.list@gmail.com, hkallweit1@gmail.com, jslaby@suse.com, jonathanh@nvidia.com, lee.jones@linaro.org, lgirdwood@gmail.com, linux-fpga@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, maarten.lankhorst@linux.intel.com, broonie@kernel.org, mathieu.poirier@linaro.org, maxime.ripard@bootlin.com, mdf@kernel.org, peda@axentia.se, robh+dt@kernel.org, srinivas.kandagatla@linaro.org, thierry.reding@gmail.com, thor.thayer@linux.intel.com, ulf.hansson@linaro.org, joe@perches.com To: wsa@the-dreams.de Return-path: In-Reply-To: <20190614203144.GB7991@kunai> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-spi.vger.kernel.org Hi On 14/06/2019 21:31, Wolfram Sang wrote: >> + >> +int device_match_of_node(struct device *dev, const void *np) >> +{ >> + return dev->of_node == np; >> +} >> +EXPORT_SYMBOL_GPL(device_match_of_node); > > Is it an option to 'static inline' this simple function in the header, > saving the EXPORT? > No. This is supposed to be passed on as a call back function pointer for the APIs. Having it as a static inline, would simply replicate the same function through the driver subsystems, which is one of the issues that series is trying to solve. Also, by having them exported, we can convert the new specialized device lookup functions, *_find_device_by_ to be static inlines. Suzuki