All of lore.kernel.org
 help / color / mirror / Atom feed
* re: [media] fintek-cir: add support for newer chip version
@ 2012-04-19 17:25 Dan Carpenter
  2012-04-19 20:41 ` Jarod Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2012-04-19 17:25 UTC (permalink / raw)
  To: mchehab; +Cc: Jarod Wilson, linux-media

Hi Mauro,

The patch 83ec8225b6ae: "[media] fintek-cir: add support for newer 
chip version" from Feb 14, 2012, leads to the following warning:
drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
	 warn: known condition '1032 != 2052'

drivers/media/rc/fintek-cir.c
   197          /*
   198           * Newer reviews of this chipset uses port 8 instead of 5
   199           */
   200          if ((chip != 0x0408) || (chip != 0x0804))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
One of these conditions is always true.

Probably it should it be:
		if ((chip == 0x0408) || (chip == 0x0804))
or:
		if ((chip != 0x0408) && (chip != 0x0804))
depending one if those are the newer or the older chipsets.  I googled
for it a bit and then decided to just email you.  :P

   201                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2;
   202          else
   203                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1;
   204  

regards,
dan carpenter


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

* Re: [media] fintek-cir: add support for newer chip version
  2012-04-19 17:25 [media] fintek-cir: add support for newer chip version Dan Carpenter
@ 2012-04-19 20:41 ` Jarod Wilson
  2012-04-19 20:46   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 7+ messages in thread
From: Jarod Wilson @ 2012-04-19 20:41 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: mchehab, linux-media

On Thu, Apr 19, 2012 at 08:25:10PM +0300, Dan Carpenter wrote:
> Hi Mauro,
> 
> The patch 83ec8225b6ae: "[media] fintek-cir: add support for newer 
> chip version" from Feb 14, 2012, leads to the following warning:
> drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
> 	 warn: known condition '1032 != 2052'
> 
> drivers/media/rc/fintek-cir.c
>    197          /*
>    198           * Newer reviews of this chipset uses port 8 instead of 5
>    199           */
>    200          if ((chip != 0x0408) || (chip != 0x0804))
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> One of these conditions is always true.
> 
> Probably it should it be:
> 		if ((chip == 0x0408) || (chip == 0x0804))
> or:
> 		if ((chip != 0x0408) && (chip != 0x0804))

Reasonably sure the latter case would be the proper one there.


> depending one if those are the newer or the older chipsets.  I googled
> for it a bit and then decided to just email you.  :P
> 
>    201                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2;
>    202          else
>    203                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1;
>    204  
> 
> regards,
> dan carpenter
> 

-- 
Jarod Wilson
jarod@redhat.com


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

* Re: [media] fintek-cir: add support for newer chip version
  2012-04-19 20:41 ` Jarod Wilson
@ 2012-04-19 20:46   ` Mauro Carvalho Chehab
  2012-04-22  8:06       ` Dan Carpenter
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-04-19 20:46 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Dan Carpenter, linux-media

Em 19-04-2012 17:41, Jarod Wilson escreveu:
> On Thu, Apr 19, 2012 at 08:25:10PM +0300, Dan Carpenter wrote:
>> Hi Mauro,
>>
>> The patch 83ec8225b6ae: "[media] fintek-cir: add support for newer 
>> chip version" from Feb 14, 2012, leads to the following warning:
>> drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
>> 	 warn: known condition '1032 != 2052'
>>
>> drivers/media/rc/fintek-cir.c
>>    197          /*
>>    198           * Newer reviews of this chipset uses port 8 instead of 5
>>    199           */
>>    200          if ((chip != 0x0408) || (chip != 0x0804))
>>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> One of these conditions is always true.
>>
>> Probably it should it be:
>> 		if ((chip == 0x0408) || (chip == 0x0804))
>> or:
>> 		if ((chip != 0x0408) && (chip != 0x0804))
> 
> Reasonably sure the latter case would be the proper one there.

Yes. The information that I have is that Fintek product 0x0408(F71809) and 0x0804(F71855)
use logical device 5 and other chip ids use logical device 8.
> 
> 
>> depending one if those are the newer or the older chipsets.  I googled
>> for it a bit and then decided to just email you.  :P
>>
>>    201                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2;
>>    202          else
>>    203                  fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1;
>>    204  
>>
>> regards,
>> dan carpenter
>>
> 

Care to prepare us a patch in order to fix it?

Thank you!
Mauro

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

* [patch] [media] fintek-cir: change || to &&
  2012-04-19 20:46   ` Mauro Carvalho Chehab
@ 2012-04-22  8:06       ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2012-04-22  8:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Jarod Wilson, linux-media, kernel-janitors

The current condition is always true, so everything uses
LOGICAL_DEV_CIR_REV2 (8).  It should be that Fintek products
0x0408(F71809) and 0x0804(F71855) use logical device
LOGICAL_DEV_CIR_REV1 (5) and other chip ids use logical device 8.

In other words, this fixes hardware detection for 0x0408 and 0x0804.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 392d4be..fba611e 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -197,7 +197,7 @@ static int fintek_hw_detect(struct fintek_dev *fintek)
 	/*
 	 * Newer reviews of this chipset uses port 8 instead of 5
 	 */
-	if ((chip != 0x0408) || (chip != 0x0804))
+	if ((chip != 0x0408) && (chip != 0x0804))
 		fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2;
 	else
 		fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1;

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

* [patch] [media] fintek-cir: change || to &&
@ 2012-04-22  8:06       ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2012-04-22  8:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Jarod Wilson, linux-media, kernel-janitors

The current condition is always true, so everything uses
LOGICAL_DEV_CIR_REV2 (8).  It should be that Fintek products
0x0408(F71809) and 0x0804(F71855) use logical device
LOGICAL_DEV_CIR_REV1 (5) and other chip ids use logical device 8.

In other words, this fixes hardware detection for 0x0408 and 0x0804.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 392d4be..fba611e 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -197,7 +197,7 @@ static int fintek_hw_detect(struct fintek_dev *fintek)
 	/*
 	 * Newer reviews of this chipset uses port 8 instead of 5
 	 */
-	if ((chip != 0x0408) || (chip != 0x0804))
+	if ((chip != 0x0408) && (chip != 0x0804))
 		fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV2;
 	else
 		fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1;

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

* Re: [patch] [media] fintek-cir: change || to &&
  2012-04-22  8:06       ` Dan Carpenter
@ 2012-04-23 14:17         ` Jarod Wilson
  -1 siblings, 0 replies; 7+ messages in thread
From: Jarod Wilson @ 2012-04-23 14:17 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors

On Sun, Apr 22, 2012 at 11:06:17AM +0300, Dan Carpenter wrote:
> The current condition is always true, so everything uses
> LOGICAL_DEV_CIR_REV2 (8).  It should be that Fintek products
> 0x0408(F71809) and 0x0804(F71855) use logical device
> LOGICAL_DEV_CIR_REV1 (5) and other chip ids use logical device 8.
> 
> In other words, this fixes hardware detection for 0x0408 and 0x0804.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@redhat.com


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

* Re: [patch] [media] fintek-cir: change || to &&
@ 2012-04-23 14:17         ` Jarod Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Jarod Wilson @ 2012-04-23 14:17 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors

On Sun, Apr 22, 2012 at 11:06:17AM +0300, Dan Carpenter wrote:
> The current condition is always true, so everything uses
> LOGICAL_DEV_CIR_REV2 (8).  It should be that Fintek products
> 0x0408(F71809) and 0x0804(F71855) use logical device
> LOGICAL_DEV_CIR_REV1 (5) and other chip ids use logical device 8.
> 
> In other words, this fixes hardware detection for 0x0408 and 0x0804.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@redhat.com


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

end of thread, other threads:[~2012-04-23 14:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 17:25 [media] fintek-cir: add support for newer chip version Dan Carpenter
2012-04-19 20:41 ` Jarod Wilson
2012-04-19 20:46   ` Mauro Carvalho Chehab
2012-04-22  8:06     ` [patch] [media] fintek-cir: change || to && Dan Carpenter
2012-04-22  8:06       ` Dan Carpenter
2012-04-23 14:17       ` Jarod Wilson
2012-04-23 14:17         ` Jarod Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.