linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bus: moxtet: declare moxtet_bus_type
@ 2019-10-15 12:25 Ben Dooks
  2019-10-15 16:32 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2019-10-15 12:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ben Dooks, Marek Behun, linux-kernel

The moxtet_bus_type object is exported from the bus
driver, but not declared. Add a declaration for use
and to silence the following warning:

drivers/bus/moxtet.c:105:17: warning: symbol 'moxtet_bus_type' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Marek Behun <marek.behun@nic.cz>
Cc: linux-kernel@vger.kernel.org
---
 include/linux/moxtet.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/moxtet.h b/include/linux/moxtet.h
index 490db6886dcc..b76231cb60e4 100644
--- a/include/linux/moxtet.h
+++ b/include/linux/moxtet.h
@@ -94,6 +94,8 @@ struct moxtet_device {
 	unsigned int			idx;
 };
 
+extern struct bus_type moxtet_bus_type;
+
 extern int moxtet_device_read(struct device *dev);
 extern int moxtet_device_write(struct device *dev, u8 val);
 extern int moxtet_device_written(struct device *dev);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: moxtet: declare moxtet_bus_type
  2019-10-15 12:25 [PATCH] bus: moxtet: declare moxtet_bus_type Ben Dooks
@ 2019-10-15 16:32 ` Christoph Hellwig
  2019-10-16  7:34   ` Ben Dooks
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-15 16:32 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-kernel, Marek Behun, linux-kernel

On Tue, Oct 15, 2019 at 01:25:35PM +0100, Ben Dooks wrote:
> The moxtet_bus_type object is exported from the bus
> driver, but not declared. Add a declaration for use
> and to silence the following warning:

The symbol can be marked static instead.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: moxtet: declare moxtet_bus_type
  2019-10-15 16:32 ` Christoph Hellwig
@ 2019-10-16  7:34   ` Ben Dooks
  2019-10-16  7:40     ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2019-10-16  7:34 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, Marek Behun, linux-kernel

On 15/10/2019 17:32, Christoph Hellwig wrote:
> On Tue, Oct 15, 2019 at 01:25:35PM +0100, Ben Dooks wrote:
>> The moxtet_bus_type object is exported from the bus
>> driver, but not declared. Add a declaration for use
>> and to silence the following warning:
> 
> The symbol can be marked static instead.

Then it would have to be un-exported as it's listed as
EXPORT_SYMBOL_GPL(moxtet_bus_type);



-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bus: moxtet: declare moxtet_bus_type
  2019-10-16  7:34   ` Ben Dooks
@ 2019-10-16  7:40     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-16  7:40 UTC (permalink / raw)
  To: Ben Dooks; +Cc: Christoph Hellwig, linux-kernel, Marek Behun, linux-kernel

On Wed, Oct 16, 2019 at 08:34:06AM +0100, Ben Dooks wrote:
> On 15/10/2019 17:32, Christoph Hellwig wrote:
> > On Tue, Oct 15, 2019 at 01:25:35PM +0100, Ben Dooks wrote:
> > > The moxtet_bus_type object is exported from the bus
> > > driver, but not declared. Add a declaration for use
> > > and to silence the following warning:
> > 
> > The symbol can be marked static instead.
> 
> Then it would have to be un-exported as it's listed as
> EXPORT_SYMBOL_GPL(moxtet_bus_type);

Yes, once you mark it static you should also remove the export.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-16  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 12:25 [PATCH] bus: moxtet: declare moxtet_bus_type Ben Dooks
2019-10-15 16:32 ` Christoph Hellwig
2019-10-16  7:34   ` Ben Dooks
2019-10-16  7:40     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).