All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
@ 2009-11-27  3:16 Xiaotian Feng
  2009-12-02 10:09 ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Xiaotian Feng @ 2009-11-27  3:16 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, Xiaotian Feng, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin

pci_get_device increments reference count to the found pci device, that
should be decremented using pci_dev_put.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/kernel/reboot_fixups_32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index 61a8377..201eab6 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
 			continue;
 
 		cur->reboot_fixup(dev);
+		pci_dev_put(dev);
 	}
 }
 
-- 
1.6.5.2


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

* Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
  2009-11-27  3:16 [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put Xiaotian Feng
@ 2009-12-02 10:09 ` Ingo Molnar
  2009-12-02 16:51   ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-12-02 10:09 UTC (permalink / raw)
  To: Xiaotian Feng
  Cc: x86, linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Yinghai Lu


* Xiaotian Feng <dfeng@redhat.com> wrote:

> pci_get_device increments reference count to the found pci device, 
> that should be decremented using pci_dev_put.

> +++ b/arch/x86/kernel/reboot_fixups_32.c
> @@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
>  			continue;
>  
>  		cur->reboot_fixup(dev);
> +		pci_dev_put(dev);

Does this matter in practice? We are about to reboot. (but if it's 
cleaner to do it like this or if there's some real bug fixed by this 
then please spell it out in the changelog.)

	Ingo

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

* Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
  2009-12-02 10:09 ` Ingo Molnar
@ 2009-12-02 16:51   ` H. Peter Anvin
  2009-12-02 17:14     ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: H. Peter Anvin @ 2009-12-02 16:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Xiaotian Feng, x86, linux-kernel, Thomas Gleixner, Ingo Molnar,
	Yinghai Lu

On 12/02/2009 02:09 AM, Ingo Molnar wrote:
> 
> * Xiaotian Feng <dfeng@redhat.com> wrote:
> 
>> pci_get_device increments reference count to the found pci device, 
>> that should be decremented using pci_dev_put.
> 
>> +++ b/arch/x86/kernel/reboot_fixups_32.c
>> @@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
>>  			continue;
>>  
>>  		cur->reboot_fixup(dev);
>> +		pci_dev_put(dev);
> 
> Does this matter in practice? We are about to reboot. (but if it's 
> cleaner to do it like this or if there's some real bug fixed by this 
> then please spell it out in the changelog.)
> 

Even if it doesn't actually matter, doing things cleanly makes it easier
to handle failure scenarios, possibly that are discovered in the future.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


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

* Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
  2009-12-02 16:51   ` H. Peter Anvin
@ 2009-12-02 17:14     ` Ingo Molnar
  2009-12-03 10:07       ` Danny Feng
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-12-02 17:14 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Xiaotian Feng, x86, linux-kernel, Thomas Gleixner, Ingo Molnar,
	Yinghai Lu


* H. Peter Anvin <hpa@zytor.com> wrote:

> On 12/02/2009 02:09 AM, Ingo Molnar wrote:
> > 
> > * Xiaotian Feng <dfeng@redhat.com> wrote:
> > 
> >> pci_get_device increments reference count to the found pci device, 
> >> that should be decremented using pci_dev_put.
> > 
> >> +++ b/arch/x86/kernel/reboot_fixups_32.c
> >> @@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
> >>  			continue;
> >>  
> >>  		cur->reboot_fixup(dev);
> >> +		pci_dev_put(dev);
> > 
> > Does this matter in practice? We are about to reboot. (but if it's 
> > cleaner to do it like this or if there's some real bug fixed by this 
> > then please spell it out in the changelog.)
> > 
> 
> Even if it doesn't actually matter, doing things cleanly makes it 
> easier to handle failure scenarios, possibly that are discovered in 
> the future.

certainly - but it would be nice to know whether there's any other 
reason for this but cleanliness/consistency.

	Ingo

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

* Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
  2009-12-02 17:14     ` Ingo Molnar
@ 2009-12-03 10:07       ` Danny Feng
  2009-12-03 10:40         ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Danny Feng @ 2009-12-03 10:07 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: H. Peter Anvin, x86, linux-kernel, Thomas Gleixner, Ingo Molnar,
	Yinghai Lu

On 12/03/2009 01:14 AM, Ingo Molnar wrote:
>
> * H. Peter Anvin<hpa@zytor.com>  wrote:
>
>> On 12/02/2009 02:09 AM, Ingo Molnar wrote:
>>>
>>> * Xiaotian Feng<dfeng@redhat.com>  wrote:
>>>
>>>> pci_get_device increments reference count to the found pci device,
>>>> that should be decremented using pci_dev_put.
>>>
>>>> +++ b/arch/x86/kernel/reboot_fixups_32.c
>>>> @@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
>>>>   			continue;
>>>>
>>>>   		cur->reboot_fixup(dev);
>>>> +		pci_dev_put(dev);
>>>
>>> Does this matter in practice? We are about to reboot. (but if it's
>>> cleaner to do it like this or if there's some real bug fixed by this
>>> then please spell it out in the changelog.)
>>>
>>
>> Even if it doesn't actually matter, doing things cleanly makes it
>> easier to handle failure scenarios, possibly that are discovered in
>> the future.
>
> certainly - but it would be nice to know whether there's any other
> reason for this but cleanliness/consistency.

Just for consistency:-) pci_get_device will increase the ref count of 
found device,
then we should use pci_dev_put to decrease the ref count although we're 
going to reset soon.
I should point out this in my changelog, sorry for the unclear changelog.

>
> 	Ingo
>


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

* Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
  2009-12-03 10:07       ` Danny Feng
@ 2009-12-03 10:40         ` Ingo Molnar
  2009-12-03 11:06           ` [PATCH -tip] x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency Xiaotian Feng
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-12-03 10:40 UTC (permalink / raw)
  To: Danny Feng
  Cc: H. Peter Anvin, x86, linux-kernel, Thomas Gleixner, Ingo Molnar,
	Yinghai Lu


* Danny Feng <dfeng@redhat.com> wrote:

> I should point out this in my changelog, sorry for the unclear 
> changelog.

Please re-send it with a better changelog.

Thanks,

	Ingo

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

* [PATCH -tip] x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency
  2009-12-03 10:40         ` Ingo Molnar
@ 2009-12-03 11:06           ` Xiaotian Feng
  2009-12-03 13:23             ` [tip:x86/reboot] x86/reboot: Add " tip-bot for Xiaotian Feng
  0 siblings, 1 reply; 8+ messages in thread
From: Xiaotian Feng @ 2009-12-03 11:06 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, Xiaotian Feng, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Yinghai Lu

pci_get_device will increase the ref count of found device.
Although we're going to reset soon, we should use pci_dev_put
to decrease the ref count for consistency.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
---
 arch/x86/kernel/reboot_fixups_32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index 61a8377..201eab6 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
 			continue;
 
 		cur->reboot_fixup(dev);
+		pci_dev_put(dev);
 	}
 }
 
-- 
1.5.5.6


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

* [tip:x86/reboot] x86/reboot: Add pci_dev_put in reboot_fixup_32.c for consistency
  2009-12-03 11:06           ` [PATCH -tip] x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency Xiaotian Feng
@ 2009-12-03 13:23             ` tip-bot for Xiaotian Feng
  0 siblings, 0 replies; 8+ messages in thread
From: tip-bot for Xiaotian Feng @ 2009-12-03 13:23 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, tglx, dfeng, mingo

Commit-ID:  57fea8f7ab67ef42b7f84999e49e47f8717a2d5b
Gitweb:     http://git.kernel.org/tip/57fea8f7ab67ef42b7f84999e49e47f8717a2d5b
Author:     Xiaotian Feng <dfeng@redhat.com>
AuthorDate: Thu, 3 Dec 2009 19:06:40 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 3 Dec 2009 12:17:55 +0100

x86/reboot: Add pci_dev_put in reboot_fixup_32.c for consistency

pci_get_device will increase the ref count of found device.
Although we're going to reset soon, we should use pci_dev_put
to decrease the ref count for consistency.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1259838400-23833-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/reboot_fixups_32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index 61a8377..201eab6 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
 			continue;
 
 		cur->reboot_fixup(dev);
+		pci_dev_put(dev);
 	}
 }
 

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

end of thread, other threads:[~2009-12-03 13:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27  3:16 [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put Xiaotian Feng
2009-12-02 10:09 ` Ingo Molnar
2009-12-02 16:51   ` H. Peter Anvin
2009-12-02 17:14     ` Ingo Molnar
2009-12-03 10:07       ` Danny Feng
2009-12-03 10:40         ` Ingo Molnar
2009-12-03 11:06           ` [PATCH -tip] x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency Xiaotian Feng
2009-12-03 13:23             ` [tip:x86/reboot] x86/reboot: Add " tip-bot for Xiaotian Feng

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.