public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix wrong sized spinlock flags argument
@ 2008-01-17 20:52 Daniel Walker
  2008-01-17 23:48 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Walker @ 2008-01-17 20:52 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Maxim Levitsky, Mauro Carvalho Chehab

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

-- 

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

* Re: [PATCH] fix wrong sized spinlock flags argument
  2008-01-17 20:52 [PATCH] fix wrong sized spinlock flags argument Daniel Walker
@ 2008-01-17 23:48 ` Linus Torvalds
  2008-01-18  0:05   ` Daniel Walker
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2008-01-17 23:48 UTC (permalink / raw)
  To: Daniel Walker; +Cc: linux-kernel, Maxim Levitsky, Mauro Carvalho Chehab


Applied.

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

On Thu, 17 Jan 2008, Daniel Walker wrote:
>  
>  	pci_set_power_state(pci_dev, PCI_D0);
>  	pci_restore_state(pci_dev);

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

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

* Re: [PATCH] fix wrong sized spinlock flags argument
  2008-01-17 23:48 ` Linus Torvalds
@ 2008-01-18  0:05   ` Daniel Walker
  2008-01-18 10:13     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Walker @ 2008-01-18  0:05 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Maxim Levitsky, Mauro Carvalho Chehab


On Thu, 2008-01-17 at 15:48 -0800, Linus Torvalds wrote:
> Applied.
> 
> However, the patch itself didn't apply cleanly, because in my souce tree, 
> these two lines are in a different order:
> 
> On Thu, 17 Jan 2008, Daniel Walker wrote:
> >  
> >  	pci_set_power_state(pci_dev, PCI_D0);
> >  	pci_restore_state(pci_dev);
> 
> 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).

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


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

* Re: [PATCH] fix wrong sized spinlock flags argument
  2008-01-18  0:05   ` Daniel Walker
@ 2008-01-18 10:13     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2008-01-18 10:13 UTC (permalink / raw)
  To: Daniel Walker; +Cc: Linus Torvalds, linux-kernel, Maxim Levitsky

On Thu, 17 Jan 2008 16:05:06 -0800
Daniel Walker <dwalker@mvista.com> wrote:

> 
> On Thu, 2008-01-17 at 15:48 -0800, Linus Torvalds wrote:
> > Applied.
> > 
> > However, the patch itself didn't apply cleanly, because in my souce tree, 
> > these two lines are in a different order:
> > 
> > On Thu, 17 Jan 2008, Daniel Walker wrote:
> > >  
> > >  	pci_set_power_state(pci_dev, PCI_D0);
> > >  	pci_restore_state(pci_dev);
> > 
> > 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).
> 
> 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..

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

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

end of thread, other threads:[~2008-01-18 10:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 20:52 [PATCH] fix wrong sized spinlock flags argument Daniel Walker
2008-01-17 23:48 ` Linus Torvalds
2008-01-18  0:05   ` Daniel Walker
2008-01-18 10:13     ` Mauro Carvalho Chehab

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