Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp469072ybh; Sat, 18 Jul 2020 09:32:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEzNzsMh3WejYXYXSATcD0XIKfruwveiJ32ZvL2EHeurICU7P1TzoXXuY2eQj5Hjz7YKbK X-Received: by 2002:a17:906:430b:: with SMTP id j11mr13397180ejm.270.1595089966427; Sat, 18 Jul 2020 09:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595089966; cv=none; d=google.com; s=arc-20160816; b=L0QKs8aMtMNqntZAH8iS7Fi0SB6bI6N4rxWiXK8pzMWItoRCkoDj08RwpLc+ohECCn 0E4jy5oxEuq2OtiKl/Jh/tU6nHvo48J+5rOJE3QcKyBuvNlrNcJR2S/T7oyUPiJMgOjO zgFLj7POCQLJenjh6QBagLEMhAJ5IuH7pMEKpgb7mfbetYZG5eu1eK4lAvHs8tldy/QK cXQMDaA24O58QD1Sbdym+tPwMiXcR+b7sYP+m3baeRIEzNjqo2wOuCxShItIp4cm63ZA sNUIX0yufCdAH4PxlNHrLfkkh8AqLuGmIGQgbPNCeBVpjbdjducPB+Ab2jZ+dV2GNQLM bZNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=awsXAZr6Q7t908Il+CgWTXImaeVpvjSp5Y0IbK8VcOY=; b=MjIoDS/tkoGrZB2M9HfUjjjQusEM8tVAtjyzMIzZyAMWUI9VfhRwny7Y9iBvpZI5ax dLZ7p6Ks4uniuO/ZQ9Ym+Dke3PonNkleDdViiFp0TLekPTWLBImCG19Si+3anUpIpVPi 1pnDJ7W6jnaOtFl1rpSzJS/JoID+h5S7nyM6sfZZM+gm6TVT/6vRXr5wU/Psgxm9oJ0z A+Iwg8hRQqj1y4zLgsIc5GBo5d2rQd+WJMkWLH5Qs8PyhgNOea2iY4t6xuaz+pyxqQr+ cbAkjmcVvHA8pX4/HUVhxPMWwO5raCjmIl57k1+Z1GTmGz6pemnIAolcH8kxN7SRvB1r Ggig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KZUO6f1k; 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 c2si7701046edq.228.2020.07.18.09.32.22; Sat, 18 Jul 2020 09:32:46 -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; dkim=pass header.i=@kernel.org header.s=default header.b=KZUO6f1k; 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 S1727853AbgGRQZG (ORCPT + 99 others); Sat, 18 Jul 2020 12:25:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:35652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbgGRQZF (ORCPT ); Sat, 18 Jul 2020 12:25:05 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29A9E20734; Sat, 18 Jul 2020 16:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595089505; bh=kBotM7AMmbpT90aa7A9GSwVrfTp2GtX3JAD46MGC6r8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KZUO6f1kbYzCYkAif/vIxsPMAztKzH7A5ud8Wweoo5tBIA8oxhTx0GdMDb2SIzXkK +cbLQijzdqSBEpnnztbzF02xQeOFupx9+F7ivTuzv0q6xQkCPHDyO2zlbK0XZCS4RD i7yphtxKgqwDs/lAgRJ9EcOY7XYTz691hDC5g3RE= Date: Sat, 18 Jul 2020 17:25:01 +0100 From: Jonathan Cameron To: Alexandru Ardelean Cc: , , Lars-Peter Clausen Subject: Re: [PATCH] iio: trigger: Staticise stub functions Message-ID: <20200718172501.4ba58924@archlinux> In-Reply-To: <20200714142456.67054-1-alexandru.ardelean@analog.com> References: <20200714142456.67054-1-alexandru.ardelean@analog.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jul 2020 17:24:56 +0300 Alexandru Ardelean wrote: > From: Lars-Peter Clausen > > Make sure that the trigger function stubs are all static inline. Otherwise > we'll get linker errors due to multiple definitions of the same function. > > Fixes f8c6f4e9a40d4: ("iio: trigger: Staticise stub functions") > Signed-off-by: Lars-Peter Clausen > Signed-off-by: Alexandru Ardelean I'm curious on what the actual build error is? Static functions should result in independent implementations in each C file that includes them. Inline is normally considered a hint. Hence what am I missing? Jonathan > --- > > FWIW: we can skip the Fixes tag from my side; this has been present for > a while. > I just bumped into it while sync-ing the ADI tree with some upstream > stuff. > > drivers/iio/iio_core_trigger.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/iio_core_trigger.h b/drivers/iio/iio_core_trigger.h > index 9d1a92cc6480..374816bc3e73 100644 > --- a/drivers/iio/iio_core_trigger.h > +++ b/drivers/iio/iio_core_trigger.h > @@ -30,7 +30,7 @@ int iio_trigger_detach_poll_func(struct iio_trigger *trig, > * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers > * @indio_dev: iio_dev associated with the device that will consume the trigger > **/ > -static int iio_device_register_trigger_consumer(struct iio_dev *indio_dev) > +static inline int iio_device_register_trigger_consumer(struct iio_dev *indio_dev) > { > return 0; > } > @@ -39,7 +39,7 @@ static int iio_device_register_trigger_consumer(struct iio_dev *indio_dev) > * iio_device_unregister_trigger_consumer() - reverse the registration process > * @indio_dev: iio_dev associated with the device that consumed the trigger > **/ > -static void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev) > +static inline void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev) > { > } >