linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: ttpci: Fix build error without RC_CORE
@ 2019-06-12  3:43 YueHaibing
  2019-06-12  7:42 ` Sean Young
  0 siblings, 1 reply; 7+ messages in thread
From: YueHaibing @ 2019-06-12  3:43 UTC (permalink / raw)
  To: mchehab, tglx, corbet, gregkh, sean; +Cc: linux-kernel, linux-media, YueHaibing

If RC_CORE is not set, building fails:

drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/media/pci/ttpci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
index d96d4fa..b705631 100644
--- a/drivers/media/pci/ttpci/Kconfig
+++ b/drivers/media/pci/ttpci/Kconfig
@@ -7,7 +7,7 @@ config DVB_AV7110
 	depends on DVB_CORE && PCI && I2C
 	select TTPCI_EEPROM
 	select VIDEO_SAA7146_VV
-	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110
+	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)
 	depends on VIDEO_DEV	# dependencies of VIDEO_SAA7146_VV
 	select DVB_VES1820 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_VES1X93 if MEDIA_SUBDRV_AUTOSELECT
-- 
2.7.4



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

* Re: [PATCH] media: ttpci: Fix build error without RC_CORE
  2019-06-12  3:43 [PATCH] media: ttpci: Fix build error without RC_CORE YueHaibing
@ 2019-06-12  7:42 ` Sean Young
  2019-06-12  9:37   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Young @ 2019-06-12  7:42 UTC (permalink / raw)
  To: YueHaibing; +Cc: mchehab, tglx, corbet, gregkh, linux-kernel, linux-media

On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote:
> If RC_CORE is not set, building fails:
> 
> drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
> av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
> av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
> av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Thank you for spotting this and writing a patch.

> ---
>  drivers/media/pci/ttpci/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
> index d96d4fa..b705631 100644
> --- a/drivers/media/pci/ttpci/Kconfig
> +++ b/drivers/media/pci/ttpci/Kconfig
> @@ -7,7 +7,7 @@ config DVB_AV7110
>  	depends on DVB_CORE && PCI && I2C
>  	select TTPCI_EEPROM
>  	select VIDEO_SAA7146_VV
> -	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110

This says if
 - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m
 - select DVB_AV7110_IR if INPUT_EVDEV=y
   This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine

> +	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)

That's not exactly the same. For one thing it should not longer depend on
INPUT_EVDEV=y.

Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is
the case in Fedora default kernel config for example).

>  	depends on VIDEO_DEV	# dependencies of VIDEO_SAA7146_VV
>  	select DVB_VES1820 if MEDIA_SUBDRV_AUTOSELECT
>  	select DVB_VES1X93 if MEDIA_SUBDRV_AUTOSELECT
> -- 
> 2.7.4
> 

Thanks,

Sean

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

* Re: [PATCH] media: ttpci: Fix build error without RC_CORE
  2019-06-12  7:42 ` Sean Young
@ 2019-06-12  9:37   ` Mauro Carvalho Chehab
  2019-06-12 17:56     ` Sean Young
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2019-06-12  9:37 UTC (permalink / raw)
  To: Sean Young; +Cc: YueHaibing, tglx, corbet, gregkh, linux-kernel, linux-media

Em Wed, 12 Jun 2019 08:42:55 +0100
Sean Young <sean@mess.org> escreveu:

> On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote:
> > If RC_CORE is not set, building fails:
> > 
> > drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
> > av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
> > av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
> > av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>  
> 
> Thank you for spotting this and writing a patch.
> 
> > ---
> >  drivers/media/pci/ttpci/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
> > index d96d4fa..b705631 100644
> > --- a/drivers/media/pci/ttpci/Kconfig
> > +++ b/drivers/media/pci/ttpci/Kconfig
> > @@ -7,7 +7,7 @@ config DVB_AV7110
> >  	depends on DVB_CORE && PCI && I2C
> >  	select TTPCI_EEPROM
> >  	select VIDEO_SAA7146_VV
> > -	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110  
> 
> This says if
>  - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m
>  - select DVB_AV7110_IR if INPUT_EVDEV=y
>    This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine
> 
> > +	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)  
> 
> That's not exactly the same. For one thing it should not longer depend on
> INPUT_EVDEV=y.
> 
> Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is
> the case in Fedora default kernel config for example).

My suggestion here is to stop using select here, using, instead
a depends on for DVB_AV7110_IR, e. g. something like (untested):

config DVB_AV7110_IR
	bool
	depends on RC_CORE && DVB_AV7110
	default DVB_AV7110


> 
> >  	depends on VIDEO_DEV	# dependencies of VIDEO_SAA7146_VV
> >  	select DVB_VES1820 if MEDIA_SUBDRV_AUTOSELECT
> >  	select DVB_VES1X93 if MEDIA_SUBDRV_AUTOSELECT
> > -- 
> > 2.7.4
> >   
> 
> Thanks,
> 
> Sean



Thanks,
Mauro

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

* Re: [PATCH] media: ttpci: Fix build error without RC_CORE
  2019-06-12  9:37   ` Mauro Carvalho Chehab
@ 2019-06-12 17:56     ` Sean Young
  2019-06-12 18:25       ` Mauro Carvalho Chehab
  2019-06-13  1:27       ` [PATCH] " Yuehaibing
  0 siblings, 2 replies; 7+ messages in thread
From: Sean Young @ 2019-06-12 17:56 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: YueHaibing, tglx, corbet, gregkh, linux-kernel, linux-media

On Wed, Jun 12, 2019 at 06:37:08AM -0300, Mauro Carvalho Chehab wrote:
> Em Wed, 12 Jun 2019 08:42:55 +0100
> Sean Young <sean@mess.org> escreveu:
> 
> > On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote:
> > > If RC_CORE is not set, building fails:
> > > 
> > > drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
> > > av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
> > > av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
> > > av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'
> > > 
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>  
> > 
> > Thank you for spotting this and writing a patch.
> > 
> > > ---
> > >  drivers/media/pci/ttpci/Kconfig | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
> > > index d96d4fa..b705631 100644
> > > --- a/drivers/media/pci/ttpci/Kconfig
> > > +++ b/drivers/media/pci/ttpci/Kconfig
> > > @@ -7,7 +7,7 @@ config DVB_AV7110
> > >  	depends on DVB_CORE && PCI && I2C
> > >  	select TTPCI_EEPROM
> > >  	select VIDEO_SAA7146_VV
> > > -	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110  
> > 
> > This says if
> >  - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m
> >  - select DVB_AV7110_IR if INPUT_EVDEV=y
> >    This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine
> > 
> > > +	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)  
> > 
> > That's not exactly the same. For one thing it should not longer depend on
> > INPUT_EVDEV=y.
> > 
> > Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is
> > the case in Fedora default kernel config for example).
> 
> My suggestion here is to stop using select here, using, instead
> a depends on for DVB_AV7110_IR, e. g. something like (untested):
> 
> config DVB_AV7110_IR
> 	bool
> 	depends on RC_CORE && DVB_AV7110
> 	default DVB_AV7110

Build will fail if RC_CORE=m && DVB_AV7110=y. So it should be

        depends on RC_CORE=y || RC_CORE = DVB_AV7110


Thanks,

Sean

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

* Re: [PATCH] media: ttpci: Fix build error without RC_CORE
  2019-06-12 17:56     ` Sean Young
@ 2019-06-12 18:25       ` Mauro Carvalho Chehab
  2019-06-13 15:23         ` [PATCH v2] " YueHaibing
  2019-06-13  1:27       ` [PATCH] " Yuehaibing
  1 sibling, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2019-06-12 18:25 UTC (permalink / raw)
  To: Sean Young; +Cc: YueHaibing, tglx, corbet, gregkh, linux-kernel, linux-media

Em Wed, 12 Jun 2019 18:56:29 +0100
Sean Young <sean@mess.org> escreveu:

> On Wed, Jun 12, 2019 at 06:37:08AM -0300, Mauro Carvalho Chehab wrote:
> > Em Wed, 12 Jun 2019 08:42:55 +0100
> > Sean Young <sean@mess.org> escreveu:
> >   
> > > On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote:  
> > > > If RC_CORE is not set, building fails:
> > > > 
> > > > drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
> > > > av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
> > > > av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
> > > > av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'
> > > > 
> > > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > > Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
> > > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>    
> > > 
> > > Thank you for spotting this and writing a patch.
> > >   
> > > > ---
> > > >  drivers/media/pci/ttpci/Kconfig | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
> > > > index d96d4fa..b705631 100644
> > > > --- a/drivers/media/pci/ttpci/Kconfig
> > > > +++ b/drivers/media/pci/ttpci/Kconfig
> > > > @@ -7,7 +7,7 @@ config DVB_AV7110
> > > >  	depends on DVB_CORE && PCI && I2C
> > > >  	select TTPCI_EEPROM
> > > >  	select VIDEO_SAA7146_VV
> > > > -	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110    
> > > 
> > > This says if
> > >  - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m
> > >  - select DVB_AV7110_IR if INPUT_EVDEV=y
> > >    This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine
> > >   
> > > > +	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)    
> > > 
> > > That's not exactly the same. For one thing it should not longer depend on
> > > INPUT_EVDEV=y.
> > > 
> > > Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is
> > > the case in Fedora default kernel config for example).  
> > 
> > My suggestion here is to stop using select here, using, instead
> > a depends on for DVB_AV7110_IR, e. g. something like (untested):
> > 
> > config DVB_AV7110_IR
> > 	bool
> > 	depends on RC_CORE && DVB_AV7110
> > 	default DVB_AV7110  

As I said, this was untested.

> Build will fail if RC_CORE=m && DVB_AV7110=y. So it should be
> 
>         depends on RC_CORE=y || RC_CORE = DVB_AV7110

Works for me.

That's a lot cleaner and easier to understand than what
we currently have.

Thanks,
Mauro

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

* Re: [PATCH] media: ttpci: Fix build error without RC_CORE
  2019-06-12 17:56     ` Sean Young
  2019-06-12 18:25       ` Mauro Carvalho Chehab
@ 2019-06-13  1:27       ` Yuehaibing
  1 sibling, 0 replies; 7+ messages in thread
From: Yuehaibing @ 2019-06-13  1:27 UTC (permalink / raw)
  To: Sean Young, Mauro Carvalho Chehab
  Cc: tglx, corbet, gregkh, linux-kernel, linux-media


On 2019/6/13 1:56, Sean Young wrote:
> On Wed, Jun 12, 2019 at 06:37:08AM -0300, Mauro Carvalho Chehab wrote:
>> Em Wed, 12 Jun 2019 08:42:55 +0100
>> Sean Young <sean@mess.org> escreveu:
>>
>>> On Wed, Jun 12, 2019 at 11:43:10AM +0800, YueHaibing wrote:
>>>> If RC_CORE is not set, building fails:
>>>>
>>>> drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
>>>> av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
>>>> av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
>>>> av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'
>>>>
>>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>>> Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>  
>>>
>>> Thank you for spotting this and writing a patch.
>>>
>>>> ---
>>>>  drivers/media/pci/ttpci/Kconfig | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
>>>> index d96d4fa..b705631 100644
>>>> --- a/drivers/media/pci/ttpci/Kconfig
>>>> +++ b/drivers/media/pci/ttpci/Kconfig
>>>> @@ -7,7 +7,7 @@ config DVB_AV7110
>>>>  	depends on DVB_CORE && PCI && I2C
>>>>  	select TTPCI_EEPROM
>>>>  	select VIDEO_SAA7146_VV
>>>> -	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110  
>>>
>>> This says if
>>>  - select DVB_AV7110_IR if INPUT_EVDEV and DVB_AV7110 are both y or m
>>>  - select DVB_AV7110_IR if INPUT_EVDEV=y
>>>    This exists for the case when INPUT_EVDEV=y and DVB_AV7110=m, which is fine
>>>
>>>> +	select DVB_AV7110_IR if RC_CORE=DVB_AV7110 && (INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110)  
>>>
>>> That's not exactly the same. For one thing it should not longer depend on
>>> INPUT_EVDEV=y.
>>>
>>> Now if DVB_AV7110=m and RC_CORE=y is not allowed which should be (this is
>>> the case in Fedora default kernel config for example).
>>
>> My suggestion here is to stop using select here, using, instead
>> a depends on for DVB_AV7110_IR, e. g. something like (untested):
>>
>> config DVB_AV7110_IR
>> 	bool
>> 	depends on RC_CORE && DVB_AV7110
>> 	default DVB_AV7110
> 
> Build will fail if RC_CORE=m && DVB_AV7110=y. So it should be
> 
>         depends on RC_CORE=y || RC_CORE = DVB_AV7110

Thanks, will test and send v2 as your suggestion.

> 
> 
> Thanks,
> 
> Sean
> 
> .
> 


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

* [PATCH v2] media: ttpci: Fix build error without RC_CORE
  2019-06-12 18:25       ` Mauro Carvalho Chehab
@ 2019-06-13 15:23         ` YueHaibing
  0 siblings, 0 replies; 7+ messages in thread
From: YueHaibing @ 2019-06-13 15:23 UTC (permalink / raw)
  To: mchehab, tglx, corbet, gregkh, sean; +Cc: linux-kernel, linux-media, YueHaibing

If RC_CORE is not set, building fails:

drivers/media/pci/ttpci/av7110_ir.o: In function `av7110_ir_init':
av7110_ir.c:(.text+0x1b0): undefined reference to `rc_allocate_device'
av7110_ir.c:(.text+0x2c1): undefined reference to `rc_register_device'
av7110_ir.c:(.text+0x2dc): undefined reference to `rc_free_device'

Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Sean Young <sean@mess.org>
Fixes: 71f49a8bf5c5 ("media: ttpci: use rc-core for the IR receiver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: use depends on DVB_AV7110_IR instead of select as Sean Young's suggestion
---
 drivers/media/pci/ttpci/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/ttpci/Kconfig b/drivers/media/pci/ttpci/Kconfig
index d96d4fa..8a362ee 100644
--- a/drivers/media/pci/ttpci/Kconfig
+++ b/drivers/media/pci/ttpci/Kconfig
@@ -1,13 +1,14 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DVB_AV7110_IR
 	bool
+	depends on RC_CORE=y || RC_CORE = DVB_AV7110
+	default DVB_AV7110
 
 config DVB_AV7110
 	tristate "AV7110 cards"
 	depends on DVB_CORE && PCI && I2C
 	select TTPCI_EEPROM
 	select VIDEO_SAA7146_VV
-	select DVB_AV7110_IR if INPUT_EVDEV=y || INPUT_EVDEV=DVB_AV7110
 	depends on VIDEO_DEV	# dependencies of VIDEO_SAA7146_VV
 	select DVB_VES1820 if MEDIA_SUBDRV_AUTOSELECT
 	select DVB_VES1X93 if MEDIA_SUBDRV_AUTOSELECT
-- 
2.7.4



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

end of thread, other threads:[~2019-06-13 16:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12  3:43 [PATCH] media: ttpci: Fix build error without RC_CORE YueHaibing
2019-06-12  7:42 ` Sean Young
2019-06-12  9:37   ` Mauro Carvalho Chehab
2019-06-12 17:56     ` Sean Young
2019-06-12 18:25       ` Mauro Carvalho Chehab
2019-06-13 15:23         ` [PATCH v2] " YueHaibing
2019-06-13  1:27       ` [PATCH] " Yuehaibing

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).