Re: [PATCH] fix wrong sized spinlock flags argument

Previous thread: [PATCH 0/2] Make RCU lists use the RCU API by Franck Bui-Huu on Thursday, January 17, 2008 - 4:46 pm. (10 messages)

Next thread: Fast network file copy; "recvfile()" ? by Patrick J. LoPresti on Thursday, January 17, 2008 - 4:53 pm. (3 messages)
To: <torvalds@...>
Cc: <linux-kernel@...>, Maxim Levitsky <maximlevitsky@...>, Mauro Carvalho Chehab <mchehab@...>
Date: Thursday, January 17, 2008 - 4:52 pm

Correct wrong sized spinlock flags, form int to unsigned long.

Signed-off-by: Daniel Walker <dwalker@mvista.com>

---
drivers/media/video/saa7134/saa7134-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23/drivers/media/video/saa7134/saa7134-core.c
===================================================================
--- linux-2.6.23.orig/drivers/media/video/saa7134/saa7134-core.c
+++ linux-2.6.23/drivers/media/video/saa7134/saa7134-core.c
@@ -1212,7 +1212,7 @@ static int saa7134_resume(struct pci_dev
{

struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
- unsigned int flags;
+ unsigned long flags;

pci_set_power_state(pci_dev, PCI_D0);
pci_restore_state(pci_dev);
--

--
--

To: Daniel Walker <dwalker@...>
Cc: <linux-kernel@...>, Maxim Levitsky <maximlevitsky@...>, Mauro Carvalho Chehab <mchehab@...>
Date: Thursday, January 17, 2008 - 7:48 pm

Applied.

However, the patch itself didn't apply cleanly, because in my souce tree,
these two lines are in a different order:

but I actually think your order is the *correct* one (because I'm not at
all sure that config space writes are even guaranteed to make a difference
when in D3cold).

So I wonder, did you have some other fix applied to your "original" tree
(it sure isn't original 2.6.23, since that whole suspend/resume code was
added later.

Maxim? Mauro? Pretty much all other drivers do

pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);

in that order, and I really do think that D3cold is allowed to not
actually react fully to all config space accesses (ie we have to re-write
them after bringing it out of D3)

Linus
--

To: Linus Torvalds <torvalds@...>
Cc: <linux-kernel@...>, Maxim Levitsky <maximlevitsky@...>, Mauro Carvalho Chehab <mchehab@...>
Date: Thursday, January 17, 2008 - 8:05 pm

I was actually using 2.6.24-rc8-mm1 . The code looked similar enough,
but I must have overlooked the fact that the lines above got switched..

Daniel

--

To: Daniel Walker <dwalker@...>
Cc: Linus Torvalds <torvalds@...>, <linux-kernel@...>, Maxim Levitsky <maximlevitsky@...>
Date: Friday, January 18, 2008 - 6:13 am

On Thu, 17 Jan 2008 16:05:06 -0800

There were lots of change on saa7134, including the implementation of S1/S3.
I'll run some tests here fixing the order and apply Daniel's patch.

Cheers,
Mauro
--

Previous thread: [PATCH 0/2] Make RCU lists use the RCU API by Franck Bui-Huu on Thursday, January 17, 2008 - 4:46 pm. (10 messages)

Next thread: Fast network file copy; "recvfile()" ? by Patrick J. LoPresti on Thursday, January 17, 2008 - 4:53 pm. (3 messages)