linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix warning in pci_64.c
@ 2007-05-15  4:16 Benjamin Herrenschmidt
  2007-05-15  4:30 ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-15  4:16 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Fix a warning due to unused result from device_create_file
in arch/powerpc/kernel/pci_64.c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

 arch/powerpc/kernel/pci_64.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-cell/arch/powerpc/kernel/pci_64.c
===================================================================
--- linux-cell.orig/arch/powerpc/kernel/pci_64.c	2007-05-15 14:14:15.000000000 +1000
+++ linux-cell/arch/powerpc/kernel/pci_64.c	2007-05-15 14:14:54.000000000 +1000
@@ -878,7 +878,8 @@ static DEVICE_ATTR(devspec, S_IRUGO, pci
 
 void pcibios_add_platform_entries(struct pci_dev *pdev)
 {
-	device_create_file(&pdev->dev, &dev_attr_devspec);
+	int rc = device_create_file(&pdev->dev, &dev_attr_devspec);
+	WARN_ON(rc != 0);
 }
 
 #define ISA_SPACE_MASK 0x1

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

* Re: [PATCH] powerpc: Fix warning in pci_64.c
  2007-05-15  4:16 [PATCH] powerpc: Fix warning in pci_64.c Benjamin Herrenschmidt
@ 2007-05-15  4:30 ` Stephen Rothwell
  2007-05-15  6:03   ` Michael Ellerman
  2007-05-15  6:03   ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2007-05-15  4:30 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
>  void pcibios_add_platform_entries(struct pci_dev *pdev)
>  {
> -	device_create_file(&pdev->dev, &dev_attr_devspec);
> +	int rc = device_create_file(&pdev->dev, &dev_attr_devspec);
> +	WARN_ON(rc != 0);

If we really don't care if the file is not created, then it is probably
worth a comment as to why ...

--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] powerpc: Fix warning in pci_64.c
  2007-05-15  4:30 ` Stephen Rothwell
@ 2007-05-15  6:03   ` Michael Ellerman
  2007-05-15  6:03   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2007-05-15  6:03 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Paul Mackerras, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

On Tue, 2007-05-15 at 14:30 +1000, Stephen Rothwell wrote:
> On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> >  void pcibios_add_platform_entries(struct pci_dev *pdev)
> >  {
> > -	device_create_file(&pdev->dev, &dev_attr_devspec);
> > +	int rc = device_create_file(&pdev->dev, &dev_attr_devspec);
> > +	WARN_ON(rc != 0);
> 
> If we really don't care if the file is not created, then it is probably
> worth a comment as to why ...

Greg already has a patch from me to fix that.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] powerpc: Fix warning in pci_64.c
  2007-05-15  4:30 ` Stephen Rothwell
  2007-05-15  6:03   ` Michael Ellerman
@ 2007-05-15  6:03   ` Benjamin Herrenschmidt
  2007-05-15  8:22     ` Kumar Gala
  1 sibling, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-15  6:03 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras

On Tue, 2007-05-15 at 14:30 +1000, Stephen Rothwell wrote:
> On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> >  void pcibios_add_platform_entries(struct pci_dev *pdev)
> >  {
> > -	device_create_file(&pdev->dev, &dev_attr_devspec);
> > +	int rc = device_create_file(&pdev->dev, &dev_attr_devspec);
> > +	WARN_ON(rc != 0);
> 
> If we really don't care if the file is not created, then it is probably
> worth a comment as to why ...

Well, if it's not created, then something is badly wrong thus a
WARN_ON ... Do you think I should do more ?

Ben.

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

* Re: [PATCH] powerpc: Fix warning in pci_64.c
  2007-05-15  6:03   ` Benjamin Herrenschmidt
@ 2007-05-15  8:22     ` Kumar Gala
  0 siblings, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2007-05-15  8:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Stephen Rothwell, Paul Mackerras, linuxppc-dev


On May 15, 2007, at 1:03 AM, Benjamin Herrenschmidt wrote:

> On Tue, 2007-05-15 at 14:30 +1000, Stephen Rothwell wrote:
>> On Tue, 15 May 2007 14:16:35 +1000 Benjamin Herrenschmidt  
>> <benh@kernel.crashing.org> wrote:
>>>
>>>  void pcibios_add_platform_entries(struct pci_dev *pdev)
>>>  {
>>> -	device_create_file(&pdev->dev, &dev_attr_devspec);
>>> +	int rc = device_create_file(&pdev->dev, &dev_attr_devspec);
>>> +	WARN_ON(rc != 0);
>>
>> If we really don't care if the file is not created, then it is  
>> probably
>> worth a comment as to why ...
>
> Well, if it's not created, then something is badly wrong thus a
> WARN_ON ... Do you think I should do more ?

Yes, fix the pci_32.c version of this as well (if it hasn't been) :)

- k

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

end of thread, other threads:[~2007-05-15  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15  4:16 [PATCH] powerpc: Fix warning in pci_64.c Benjamin Herrenschmidt
2007-05-15  4:30 ` Stephen Rothwell
2007-05-15  6:03   ` Michael Ellerman
2007-05-15  6:03   ` Benjamin Herrenschmidt
2007-05-15  8:22     ` Kumar Gala

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