Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp407323rwa; Sat, 20 Aug 2022 06:12:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6t9EN5qkI+tDlrtBBNGhAu1N13SCA+xLl2sDCumMcVJjB3iYuP/bHo+rLPas3P+OLwebub X-Received: by 2002:a05:6a00:2789:b0:531:c43:6290 with SMTP id bd9-20020a056a00278900b005310c436290mr12528261pfb.21.1661001141497; Sat, 20 Aug 2022 06:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661001141; cv=none; d=google.com; s=arc-20160816; b=w/Bs8ROyITXlKQGBIj8tAn+9tsFryIkNzAAUevOUj3XKsuHmDl35LlSzI1OvXjgj9d F+UtTowPxs4N2mV3/l5hgtYriPYYdplka/CavEd2j2B7WMnlrSj6bGOT8bzKeKOh9WCc 8aYh7aFPWUHPaeRPp4VIxMXySYzb6BSA4f9vFRX61XUY+aEEY9t17zFGEWznFEyC5GIx gyD/Ai1gXwXMpnhzQRRBrV/1SRP6UIv2An4qsj0OujFdZmwo0tB45NRRU/5fob+xO4QD prkrijBo5SDIuUqmyLr4XBZBzNmdLU6dN9McXX8z99kD2rbMpuwh3t4+WSP1zpyyBgBC ADyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=949c0xtKAw0Oe3leeD4PerDDSgFIC31ivC3V0WP9x14=; b=sdL8YQaXg6jCA83F5mSt7ThQZeCZRMzd8eE3oXb1aW8XUCn1CA8/BtQ6bhvLdof8DH vTkDd706VXG6tR7dNP8/h3bbJqTUfWiEtDpf+SwxSYXokAtn22r8w7yMG0tsuobZXWTN OAHp5DAp/7PQ6AJrkxpkQFg+iIPRyww7VKDdTvHiWS1hhE2Sml7M0IY8T8efk0khxCm1 gvjXt6O9btHrRjPAT9aGucapS9fk88RCdmxHrIR16F04WbBVcMBQOUS4bG30ffiAHaox eFEnnCWgNxCNo5XF5XRBOkuGhjQ9M9HZuEC/mdqo48oyYasz7saL4EFowuGoeKAFUsMd J2mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nnNMkbHp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a170902e31200b0016db88fe3f4si3532473plc.472.2022.08.20.06.12.07; Sat, 20 Aug 2022 06:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nnNMkbHp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1345906AbiHTL63 (ORCPT + 99 others); Sat, 20 Aug 2022 07:58:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345813AbiHTL60 (ORCPT ); Sat, 20 Aug 2022 07:58:26 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DF4D1F2EB; Sat, 20 Aug 2022 04:58:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B6799CE0DDB; Sat, 20 Aug 2022 11:58:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D86EC433D6; Sat, 20 Aug 2022 11:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660996702; bh=IYMBEBmZvHHQ3M0wfJWctteV1udRO4RyU3hBgvn/yts=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nnNMkbHpeJ+yFppGPHQpoEiv1ReEAoUAuZUg8Ifae7i3GL9tOk2fIRO0THNcLWQxS asWnR8FPikI5ZUYWN0BFOd+zUb/s6nYFATiZor6TTZMCabVDvVDzzwOjaifXnKLrtT LuVJlGBvJ+a9XLY5SGtwo+h1gPuKEEferk0qEskq66BavYFFDIJ0tYpQcEDY2aQUA2 MfFhzSRxy/OeT0L/NuL7MG4D7gLJvjlInmrmpM6e/OFcbimTSzzMAvUmA3/F2rZ1oI 33zv8AtN9bwkbTmNImXoqtUANBV3/m6ZD1rNv2ktlB+sDLrG3kUap9D3k2hvapQQhc Qe7CyZtHpxoDQ== Date: Sat, 20 Aug 2022 13:08:56 +0100 From: Jonathan Cameron To: William Breathitt Gray , Alexandre Torgue Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Patrick Havelange , Jarkko Nikula , Oleksij Rempel , Pengutronix Kernel Team , Kamel Bouhara , Fabrice Gasnier , Maxime Coquelin , David Lechner Subject: Re: [PATCH] counter: Move symbols into COUNTER namespace Message-ID: <20220820130856.52c3ff04@jic23-huawei> In-Reply-To: <20220815220321.74161-1-william.gray@linaro.org> References: <20220815220321.74161-1-william.gray@linaro.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Aug 2022 18:03:21 -0400 William Breathitt Gray wrote: > Counter subsystem symbols are only relevant to counter drivers. A > COUNTER namespace is created to control the availability of these > symbols to modules that import this namespace explicitly. > > Cc: Patrick Havelange > Cc: Jarkko Nikula > Cc: Oleksij Rempel > Cc: Pengutronix Kernel Team > Cc: Kamel Bouhara > Cc: Fabrice Gasnier > Cc: Maxime Coquelin > Cc: Alexandre Torgue > Cc: David Lechner > Signed-off-by: William Breathitt Gray I'm kind of amazed the interface is this small :) Definitely a good thing to do. Sometime soon I'll finish doing equivalent for IIO. Reviewed-by: Jonathan Cameron > --- > drivers/counter/104-quad-8.c | 1 + > drivers/counter/counter-chrdev.c | 2 +- > drivers/counter/counter-core.c | 14 +++++++------- > drivers/counter/ftm-quaddec.c | 1 + > drivers/counter/intel-qep.c | 1 + > drivers/counter/interrupt-cnt.c | 1 + > drivers/counter/microchip-tcb-capture.c | 1 + > drivers/counter/stm32-lptimer-cnt.c | 1 + > drivers/counter/stm32-timer-cnt.c | 1 + > drivers/counter/ti-eqep.c | 1 + > 10 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c > index 62c2b7ac4339..1323edfbe40c 100644 > --- a/drivers/counter/104-quad-8.c > +++ b/drivers/counter/104-quad-8.c > @@ -1241,3 +1241,4 @@ module_isa_driver(quad8_driver, num_quad8); > MODULE_AUTHOR("William Breathitt Gray "); > MODULE_DESCRIPTION("ACCES 104-QUAD-8 driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/counter-chrdev.c b/drivers/counter/counter-chrdev.c > index 69d340be9c93..4e71a19d7e6a 100644 > --- a/drivers/counter/counter-chrdev.c > +++ b/drivers/counter/counter-chrdev.c > @@ -574,4 +574,4 @@ void counter_push_event(struct counter_device *const counter, const u8 event, > if (copied) > wake_up_poll(&counter->events_wait, EPOLLIN); > } > -EXPORT_SYMBOL_GPL(counter_push_event); > +EXPORT_SYMBOL_NS_GPL(counter_push_event, COUNTER); > diff --git a/drivers/counter/counter-core.c b/drivers/counter/counter-core.c > index 938651f9e9e0..09c77afb33ca 100644 > --- a/drivers/counter/counter-core.c > +++ b/drivers/counter/counter-core.c > @@ -73,7 +73,7 @@ void *counter_priv(const struct counter_device *const counter) > > return &ch->privdata; > } > -EXPORT_SYMBOL_GPL(counter_priv); > +EXPORT_SYMBOL_NS_GPL(counter_priv, COUNTER); > > /** > * counter_alloc - allocate a counter_device > @@ -133,13 +133,13 @@ struct counter_device *counter_alloc(size_t sizeof_priv) > > return NULL; > } > -EXPORT_SYMBOL_GPL(counter_alloc); > +EXPORT_SYMBOL_NS_GPL(counter_alloc, COUNTER); > > void counter_put(struct counter_device *counter) > { > put_device(&counter->dev); > } > -EXPORT_SYMBOL_GPL(counter_put); > +EXPORT_SYMBOL_NS_GPL(counter_put, COUNTER); > > /** > * counter_add - complete registration of a counter > @@ -166,7 +166,7 @@ int counter_add(struct counter_device *counter) > /* implies device_add(dev) */ > return cdev_device_add(&counter->chrdev, dev); > } > -EXPORT_SYMBOL_GPL(counter_add); > +EXPORT_SYMBOL_NS_GPL(counter_add, COUNTER); > > /** > * counter_unregister - unregister Counter from the system > @@ -188,7 +188,7 @@ void counter_unregister(struct counter_device *const counter) > > mutex_unlock(&counter->ops_exist_lock); > } > -EXPORT_SYMBOL_GPL(counter_unregister); > +EXPORT_SYMBOL_NS_GPL(counter_unregister, COUNTER); > > static void devm_counter_release(void *counter) > { > @@ -223,7 +223,7 @@ struct counter_device *devm_counter_alloc(struct device *dev, size_t sizeof_priv > > return counter; > } > -EXPORT_SYMBOL_GPL(devm_counter_alloc); > +EXPORT_SYMBOL_NS_GPL(devm_counter_alloc, COUNTER); > > /** > * devm_counter_add - complete registration of a counter > @@ -244,7 +244,7 @@ int devm_counter_add(struct device *dev, > > return devm_add_action_or_reset(dev, devm_counter_release, counter); > } > -EXPORT_SYMBOL_GPL(devm_counter_add); > +EXPORT_SYMBOL_NS_GPL(devm_counter_add, COUNTER); > > #define COUNTER_DEV_MAX 256 > > diff --git a/drivers/counter/ftm-quaddec.c b/drivers/counter/ftm-quaddec.c > index 2a58582a9df4..aea6622a9b13 100644 > --- a/drivers/counter/ftm-quaddec.c > +++ b/drivers/counter/ftm-quaddec.c > @@ -325,3 +325,4 @@ module_platform_driver(ftm_quaddec_driver); > MODULE_LICENSE("GPL"); > MODULE_AUTHOR("Kjeld Flarup "); > MODULE_AUTHOR("Patrick Havelange "); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c > index 47a6a9dfc9e8..af5942e66f7d 100644 > --- a/drivers/counter/intel-qep.c > +++ b/drivers/counter/intel-qep.c > @@ -523,3 +523,4 @@ MODULE_AUTHOR("Jarkko Nikula "); > MODULE_AUTHOR("Raymond Tan "); > MODULE_LICENSE("GPL"); > MODULE_DESCRIPTION("Intel Quadrature Encoder Peripheral driver"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c > index 3b13f56bbb11..5a11b65fc0e5 100644 > --- a/drivers/counter/interrupt-cnt.c > +++ b/drivers/counter/interrupt-cnt.c > @@ -242,3 +242,4 @@ MODULE_ALIAS("platform:interrupt-counter"); > MODULE_AUTHOR("Oleksij Rempel "); > MODULE_DESCRIPTION("Interrupt counter driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c > index 00844445143b..f9dee15d9777 100644 > --- a/drivers/counter/microchip-tcb-capture.c > +++ b/drivers/counter/microchip-tcb-capture.c > @@ -394,3 +394,4 @@ module_platform_driver(mchp_tc_driver); > MODULE_AUTHOR("Kamel Bouhara "); > MODULE_DESCRIPTION("Microchip TCB Capture driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/stm32-lptimer-cnt.c b/drivers/counter/stm32-lptimer-cnt.c > index 68031d93ce89..d6b80b6dfc28 100644 > --- a/drivers/counter/stm32-lptimer-cnt.c > +++ b/drivers/counter/stm32-lptimer-cnt.c > @@ -520,3 +520,4 @@ MODULE_AUTHOR("Fabrice Gasnier "); > MODULE_ALIAS("platform:stm32-lptimer-counter"); > MODULE_DESCRIPTION("STMicroelectronics STM32 LPTIM counter driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c > index 5779ae7c73cf..9bf20a5d6bda 100644 > --- a/drivers/counter/stm32-timer-cnt.c > +++ b/drivers/counter/stm32-timer-cnt.c > @@ -417,3 +417,4 @@ MODULE_AUTHOR("Benjamin Gaignard "); > MODULE_ALIAS("platform:stm32-timer-counter"); > MODULE_DESCRIPTION("STMicroelectronics STM32 TIMER counter driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c > index 0489d26eb47c..b0f24cf3e891 100644 > --- a/drivers/counter/ti-eqep.c > +++ b/drivers/counter/ti-eqep.c > @@ -456,3 +456,4 @@ module_platform_driver(ti_eqep_driver); > MODULE_AUTHOR("David Lechner "); > MODULE_DESCRIPTION("TI eQEP counter driver"); > MODULE_LICENSE("GPL v2"); > +MODULE_IMPORT_NS(COUNTER); > > base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868