linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: powerpc: platforms: ps3: repository.c: Remove unused function
@ 2014-12-20 15:00 Rickard Strandqvist
  2014-12-22  5:02 ` Michael Ellerman
  2014-12-22 17:26 ` [PATCH] " Geoff Levand
  0 siblings, 2 replies; 8+ messages in thread
From: Rickard Strandqvist @ 2014-12-20 15:00 UTC (permalink / raw)
  To: Geoff Levand, Benjamin Herrenschmidt
  Cc: cbe-oss-dev, Rickard Strandqvist, linux-kernel, Paul Mackerras,
	linuxppc-dev

Remove the function ps3_repository_write_highmem_info() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 arch/powerpc/platforms/ps3/platform.h   |    2 --
 arch/powerpc/platforms/ps3/repository.c |   10 ----------
 2 files changed, 12 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index d71329a..f15507c 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -201,8 +201,6 @@ int ps3_repository_write_highmem_base(unsigned int region_index,
 	u64 highmem_base);
 int ps3_repository_write_highmem_size(unsigned int region_index,
 	u64 highmem_size);
-int ps3_repository_write_highmem_info(unsigned int region_index,
-	u64 highmem_base, u64 highmem_size);
 int ps3_repository_delete_highmem_info(unsigned int region_index);
 
 /* repository pme info */
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index bfccdc7..2d5e56a 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -1160,16 +1160,6 @@ int ps3_repository_write_highmem_size(unsigned int region_index,
 		highmem_size, 0);
 }
 
-int ps3_repository_write_highmem_info(unsigned int region_index,
-	u64 highmem_base, u64 highmem_size)
-{
-	int result;
-
-	result = ps3_repository_write_highmem_base(region_index, highmem_base);
-	return result ? result
-		: ps3_repository_write_highmem_size(region_index, highmem_size);
-}
-
 static int ps3_repository_delete_highmem_base(unsigned int region_index)
 {
 	return delete_node(
-- 
1.7.10.4

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

* Re: arch: powerpc: platforms: ps3: repository.c: Remove unused function
  2014-12-20 15:00 [PATCH] arch: powerpc: platforms: ps3: repository.c: Remove unused function Rickard Strandqvist
@ 2014-12-22  5:02 ` Michael Ellerman
  2014-12-22 17:26 ` [PATCH] " Geoff Levand
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2014-12-22  5:02 UTC (permalink / raw)
  To: Rickard Strandqvist, Geoff Levand, Benjamin Herrenschmidt
  Cc: cbe-oss-dev, linuxppc-dev, Paul Mackerras, linux-kernel,
	Rickard Strandqvist

On Sat, 2014-20-12 at 15:00:01 UTC, Rickard Strandqvist wrote:
> Remove the function ps3_repository_write_highmem_info() that is not used anywhere.
> 
> This was partially found by using a static code analysis program called cppcheck.

Actually it looks like everything under CONFIG_PS3_REPOSITORY_WRITE is unused,
and never was used.

We appreciate these sort of patches, but if you can dig a little deeper and
also work out why the code is unused that would be much more useful.

cheers

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c:  Remove unused function
  2014-12-20 15:00 [PATCH] arch: powerpc: platforms: ps3: repository.c: Remove unused function Rickard Strandqvist
  2014-12-22  5:02 ` Michael Ellerman
@ 2014-12-22 17:26 ` Geoff Levand
  2014-12-22 17:36   ` Nathan Whitehorn
  2014-12-23  0:26   ` Michael Ellerman
  1 sibling, 2 replies; 8+ messages in thread
From: Geoff Levand @ 2014-12-22 17:26 UTC (permalink / raw)
  To: Rickard Strandqvist, Andre Heider, Nathan Whitehorn
  Cc: cbe-oss-dev, linux-kernel, Paul Mackerras, linuxppc-dev

On Sat, 2014-12-20 at 16:00 +0100, Rickard Strandqvist wrote:
> Remove the function ps3_repository_write_highmem_info() that is not used anywhere.

NAK

ps3_repository_write_highmem_info() is needed by otheros++.  What we
need is a kernel patch to add the highmem info to the repository once it
is known.

These ps3_repository_write_highmem routines are also the only
documentation the freeBSD port has as to how the highmem info is (should
be) saved in the repository.

-Geoff

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c:  Remove unused function
  2014-12-22 17:26 ` [PATCH] " Geoff Levand
@ 2014-12-22 17:36   ` Nathan Whitehorn
  2014-12-22 22:11     ` Rickard Strandqvist
  2014-12-23  0:26   ` Michael Ellerman
  1 sibling, 1 reply; 8+ messages in thread
From: Nathan Whitehorn @ 2014-12-22 17:36 UTC (permalink / raw)
  To: Geoff Levand, Rickard Strandqvist, Andre Heider
  Cc: cbe-oss-dev, linux-kernel, Paul Mackerras, linuxppc-dev


On 12/22/14 09:26, Geoff Levand wrote:
> On Sat, 2014-12-20 at 16:00 +0100, Rickard Strandqvist wrote:
>> Remove the function ps3_repository_write_highmem_info() that is not used anywhere.
> NAK
>
> ps3_repository_write_highmem_info() is needed by otheros++.  What we
> need is a kernel patch to add the highmem info to the repository once it
> is known.
>
> These ps3_repository_write_highmem routines are also the only
> documentation the freeBSD port has as to how the highmem info is (should
> be) saved in the repository.
>
> -Geoff
>
>

Yes, we really need this for FreeBSD since that port uses the repository 
directly instead of FDT. Thanks for noticing this. We could adapt 
FreeBSD to use FDT (this is the only non-device-tree PowerPC port), but 
there hasn't been any reason to do that thus far given the availability 
of the repository information.
-Nathan

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c: Remove unused function
  2014-12-22 17:36   ` Nathan Whitehorn
@ 2014-12-22 22:11     ` Rickard Strandqvist
  0 siblings, 0 replies; 8+ messages in thread
From: Rickard Strandqvist @ 2014-12-22 22:11 UTC (permalink / raw)
  To: Nathan Whitehorn
  Cc: cbe-oss-dev, Geoff Levand, Andre Heider,
	linux-kernel@vger.kernel.org, Paul Mackerras, linuxppc-dev

2014-12-22 18:36 GMT+01:00 Nathan Whitehorn <nwhitehorn@freebsd.org>:
>
> On 12/22/14 09:26, Geoff Levand wrote:
>>
>> On Sat, 2014-12-20 at 16:00 +0100, Rickard Strandqvist wrote:
>>>
>>> Remove the function ps3_repository_write_highmem_info() that is not used
>>> anywhere.
>>
>> NAK
>>
>> ps3_repository_write_highmem_info() is needed by otheros++.  What we
>> need is a kernel patch to add the highmem info to the repository once it
>> is known.
>>
>> These ps3_repository_write_highmem routines are also the only
>> documentation the freeBSD port has as to how the highmem info is (should
>> be) saved in the repository.
>>
>> -Geoff
>>
>>
>
> Yes, we really need this for FreeBSD since that port uses the repository
> directly instead of FDT. Thanks for noticing this. We could adapt FreeBSD to
> use FDT (this is the only non-device-tree PowerPC port), but there hasn't
> been any reason to do that thus far given the availability of the repository
> information.
> -Nathan



Hi

Too bad that did not have the benefit of the patch, but it looks like
something good come because of it anyhow.

Kind regards
Rickard Strandqvist

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c:  Remove unused function
  2014-12-22 17:26 ` [PATCH] " Geoff Levand
  2014-12-22 17:36   ` Nathan Whitehorn
@ 2014-12-23  0:26   ` Michael Ellerman
  2014-12-23  2:44     ` Geoff Levand
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Ellerman @ 2014-12-23  0:26 UTC (permalink / raw)
  To: Geoff Levand
  Cc: cbe-oss-dev, Rickard Strandqvist, Andre Heider, linux-kernel,
	Paul Mackerras, Nathan Whitehorn, linuxppc-dev

On Mon, 2014-12-22 at 09:26 -0800, Geoff Levand wrote:
> On Sat, 2014-12-20 at 16:00 +0100, Rickard Strandqvist wrote:
> > Remove the function ps3_repository_write_highmem_info() that is not used anywhere.
> 
> NAK
> 
> ps3_repository_write_highmem_info() is needed by otheros++.  What we
> need is a kernel patch to add the highmem info to the repository once it
> is known.

OK so where's that patch?

> These ps3_repository_write_highmem routines are also the only
> documentation the freeBSD port has as to how the highmem info is (should
> be) saved in the repository.

We don't carry dead code as documentation for BSD.

cheers

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c:  Remove unused function
  2014-12-23  0:26   ` Michael Ellerman
@ 2014-12-23  2:44     ` Geoff Levand
  2014-12-23  5:52       ` Michael Ellerman
  0 siblings, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2014-12-23  2:44 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: cbe-oss-dev, Rickard Strandqvist, Andre Heider, linux-kernel,
	Paul Mackerras, Nathan Whitehorn, linuxppc-dev

Hi Michael,

On Tue, 2014-12-23 at 11:26 +1100, Michael Ellerman wrote:
> On Mon, 2014-12-22 at 09:26 -0800, Geoff Levand wrote:
> > ps3_repository_write_highmem_info() is needed by otheros++.  What we
> > need is a kernel patch to add the highmem info to the repository once it
> > is known.
> 
> OK so where's that patch?

I put one in my ps3-linux repo.  I'll post it after I do some more
testing.

-Geoff

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

* Re: [PATCH] arch: powerpc: platforms: ps3: repository.c:  Remove unused function
  2014-12-23  2:44     ` Geoff Levand
@ 2014-12-23  5:52       ` Michael Ellerman
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2014-12-23  5:52 UTC (permalink / raw)
  To: Geoff Levand
  Cc: cbe-oss-dev, Rickard Strandqvist, Andre Heider, linux-kernel,
	Paul Mackerras, Nathan Whitehorn, linuxppc-dev

On Mon, 2014-12-22 at 18:44 -0800, Geoff Levand wrote:
> Hi Michael,
> 
> On Tue, 2014-12-23 at 11:26 +1100, Michael Ellerman wrote:
> > On Mon, 2014-12-22 at 09:26 -0800, Geoff Levand wrote:
> > > ps3_repository_write_highmem_info() is needed by otheros++.  What we
> > > need is a kernel patch to add the highmem info to the repository once it
> > > is known.
> > 
> > OK so where's that patch?
> 
> I put one in my ps3-linux repo.  I'll post it after I do some more
> testing.

Great, thanks.

cheers

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

end of thread, other threads:[~2014-12-23  5:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-20 15:00 [PATCH] arch: powerpc: platforms: ps3: repository.c: Remove unused function Rickard Strandqvist
2014-12-22  5:02 ` Michael Ellerman
2014-12-22 17:26 ` [PATCH] " Geoff Levand
2014-12-22 17:36   ` Nathan Whitehorn
2014-12-22 22:11     ` Rickard Strandqvist
2014-12-23  0:26   ` Michael Ellerman
2014-12-23  2:44     ` Geoff Levand
2014-12-23  5:52       ` Michael Ellerman

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