public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of the i2c tree
@ 2011-02-21  4:35 Stephen Rothwell
  2011-02-21  9:58 ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-02-21  4:35 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hi Jean,

After merging the tip tree, today's linux-next build (powerpc
ppc64_defconfig) produced these warnings:

drivers/i2c/i2c-core.c: In function 'i2c_do_add_adapter':
drivers/i2c/i2c-core.c:799: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
drivers/i2c/i2c-core.c:804: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
drivers/i2c/i2c-core.c: In function 'i2c_do_del_adapter':
drivers/i2c/i2c-core.c:985: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
drivers/i2c/i2c-core.c:988: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)

Introduced by commit 95529c656b97b08c7a92504f98650a229f03ae04 ("i2c:
Deprecate i2c_driver.attach_adapter and .detach_adapter").  We normally
fix up as many uses of an interface as possible before deprecating it ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build warnings after merge of the i2c tree
  2011-02-21  4:35 linux-next: build warnings after merge of the i2c tree Stephen Rothwell
@ 2011-02-21  9:58 ` Jean Delvare
  2011-02-22  6:17   ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2011-02-21  9:58 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

Hi Stephen,

On Mon, 21 Feb 2011 15:35:22 +1100, Stephen Rothwell wrote:
> Hi Jean,
> 
> After merging the tip tree, today's linux-next build (powerpc
> ppc64_defconfig) produced these warnings:
> 
> drivers/i2c/i2c-core.c: In function 'i2c_do_add_adapter':
> drivers/i2c/i2c-core.c:799: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> drivers/i2c/i2c-core.c:804: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> drivers/i2c/i2c-core.c: In function 'i2c_do_del_adapter':
> drivers/i2c/i2c-core.c:985: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> drivers/i2c/i2c-core.c:988: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> 
> Introduced by commit 95529c656b97b08c7a92504f98650a229f03ae04 ("i2c:
> Deprecate i2c_driver.attach_adapter and .detach_adapter").  We normally
> fix up as many uses of an interface as possible before deprecating it ...

These are the core locations where the deprecated callbacks are called.
Ideally they would _not_ emit warnings, are these are legitimate and
can't be removed before all drivers relying on these callbacks have
been fixed. If there is a way to silent these warnings, please let me
know, as I don't know of any.

-- 
Jean Delvare

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

* Re: linux-next: build warnings after merge of the i2c tree
  2011-02-21  9:58 ` Jean Delvare
@ 2011-02-22  6:17   ` Stephen Rothwell
  2011-02-22  8:55     ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-02-22  6:17 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

Hi Jean,

On Mon, 21 Feb 2011 10:58:58 +0100 Jean Delvare <khali@linux-fr•org> wrote:
>
> On Mon, 21 Feb 2011 15:35:22 +1100, Stephen Rothwell wrote:
> > Hi Jean,
> > 
> > After merging the tip tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced these warnings:
> > 
> > drivers/i2c/i2c-core.c: In function 'i2c_do_add_adapter':
> > drivers/i2c/i2c-core.c:799: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> > drivers/i2c/i2c-core.c:804: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> > drivers/i2c/i2c-core.c: In function 'i2c_do_del_adapter':
> > drivers/i2c/i2c-core.c:985: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> > drivers/i2c/i2c-core.c:988: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> > 
> > Introduced by commit 95529c656b97b08c7a92504f98650a229f03ae04 ("i2c:
> > Deprecate i2c_driver.attach_adapter and .detach_adapter").  We normally
> > fix up as many uses of an interface as possible before deprecating it ...
> 
> These are the core locations where the deprecated callbacks are called.
> Ideally they would _not_ emit warnings, are these are legitimate and
> can't be removed before all drivers relying on these callbacks have
> been fixed. If there is a way to silent these warnings, please let me
> know, as I don't know of any.

You could build just that file with -Wno-deprecated-declarations, or put
the deprecated stuff into another file that is built with that flag.
We did the latter with pci_find_device (see commit e8b553bf4b19c "PCI:
disable pci_find_device warnings when deprecated pci functions are
enabled").

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build warnings after merge of the i2c tree
  2011-02-22  6:17   ` Stephen Rothwell
@ 2011-02-22  8:55     ` Jean Delvare
  0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2011-02-22  8:55 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel

Hi Stephen,

On Tue, 22 Feb 2011 17:17:20 +1100, Stephen Rothwell wrote:
> Hi Jean,
> 
> On Mon, 21 Feb 2011 10:58:58 +0100 Jean Delvare <khali@linux-fr•org> wrote:
> >
> > On Mon, 21 Feb 2011 15:35:22 +1100, Stephen Rothwell wrote:
> > > Hi Jean,
> > > 
> > > After merging the tip tree, today's linux-next build (powerpc
> > > ppc64_defconfig) produced these warnings:
> > > 
> > > drivers/i2c/i2c-core.c: In function 'i2c_do_add_adapter':
> > > drivers/i2c/i2c-core.c:799: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> > > drivers/i2c/i2c-core.c:804: warning: 'attach_adapter' is deprecated (declared at include/linux/i2c.h:149)
> > > drivers/i2c/i2c-core.c: In function 'i2c_do_del_adapter':
> > > drivers/i2c/i2c-core.c:985: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> > > drivers/i2c/i2c-core.c:988: warning: 'detach_adapter' is deprecated (declared at include/linux/i2c.h:150)
> > > 
> > > Introduced by commit 95529c656b97b08c7a92504f98650a229f03ae04 ("i2c:
> > > Deprecate i2c_driver.attach_adapter and .detach_adapter").  We normally
> > > fix up as many uses of an interface as possible before deprecating it ...
> > 
> > These are the core locations where the deprecated callbacks are called.
> > Ideally they would _not_ emit warnings, are these are legitimate and
> > can't be removed before all drivers relying on these callbacks have
> > been fixed. If there is a way to silent these warnings, please let me
> > know, as I don't know of any.
> 
> You could build just that file with -Wno-deprecated-declarations, or put
> the deprecated stuff into another file that is built with that flag.
> We did the latter with pci_find_device (see commit e8b553bf4b19c "PCI:
> disable pci_find_device warnings when deprecated pci functions are
> enabled").

Thanks for the hints. The latter is difficult in my case, as the
functions where the deprecated methods are called are internal to
i2c-core. The former seems to work though, and I think we can live with
it for 6 months. I've appended the following to
i2c-03-deprecate-attach-detach_adapter.patch:

--- linux-2.6.38-rc5.orig/drivers/i2c/Makefile	2011-01-05 21:24:21.000000000 +0100
+++ linux-2.6.38-rc5/drivers/i2c/Makefile	2011-02-22 09:49:58.000000000 +0100
@@ -10,3 +10,4 @@ obj-$(CONFIG_I2C_MUX)		+= i2c-mux.o
 obj-y				+= algos/ busses/ muxes/
 
 ccflags-$(CONFIG_I2C_DEBUG_CORE) := -DDEBUG
+CFLAGS_i2c-core.o := -Wno-deprecated-declarations

Thanks,
-- 
Jean Delvare

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

end of thread, other threads:[~2011-02-22  8:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21  4:35 linux-next: build warnings after merge of the i2c tree Stephen Rothwell
2011-02-21  9:58 ` Jean Delvare
2011-02-22  6:17   ` Stephen Rothwell
2011-02-22  8:55     ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox