All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush
@ 2024-01-26  2:12 Kunwu Chan
  2024-01-26  6:27 ` Arnd Bergmann
  2024-05-08 13:39 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Kunwu Chan @ 2024-01-26  2:12 UTC (permalink / raw)
  To: jk, arnd, mpe, npiggin, christophe.leroy, aneesh.kumar, naveen.n.rao
  Cc: linuxppc-dev, linux-kernel, Kunwu Chan

This part was commented from commit a33a7d7309d7
("[PATCH] spufs: implement mfc access for PPE-side DMA")
in about 18 years before.

If there are no plans to enable this part code in the future,
we can remove this dead code.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
Changes in v2:
    - Remove unnecessary label 'out'
    - Add Suggested-by label in commit msg
---
 arch/powerpc/platforms/cell/spufs/file.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 02a8158c469d..7f4e0db8eb08 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -1704,23 +1704,11 @@ static int spufs_mfc_flush(struct file *file, fl_owner_t id)
 
 	ret = spu_acquire(ctx);
 	if (ret)
-		goto out;
-#if 0
-/* this currently hangs */
-	ret = spufs_wait(ctx->mfc_wq,
-			 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2));
-	if (ret)
-		goto out;
-	ret = spufs_wait(ctx->mfc_wq,
-			 ctx->ops->read_mfc_tagstatus(ctx) == ctx->tagwait);
-	if (ret)
-		goto out;
-#else
-	ret = 0;
-#endif
+		return ret;
+
 	spu_release(ctx);
-out:
-	return ret;
+
+	return 0;
 }
 
 static int spufs_mfc_fsync(struct file *file, loff_t start, loff_t end, int datasync)
-- 
2.39.2


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

* Re: [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush
  2024-01-26  2:12 [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush Kunwu Chan
@ 2024-01-26  6:27 ` Arnd Bergmann
  2024-01-26  9:11   ` Kunwu Chan
  2024-05-08 13:39 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-01-26  6:27 UTC (permalink / raw)
  To: Kunwu Chan, Jeremy Kerr, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, aneesh.kumar, Naveen N. Rao
  Cc: linuxppc-dev, linux-kernel

On Fri, Jan 26, 2024, at 03:12, Kunwu Chan wrote:
> This part was commented from commit a33a7d7309d7
> ("[PATCH] spufs: implement mfc access for PPE-side DMA")
> in about 18 years before.
>
> If there are no plans to enable this part code in the future,
> we can remove this dead code.
>
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>

Nobody is actively working on this code, so it clearly won't
be needed in the future.

Acked-by: Arnd Bergmann <arnd@arndb.de>

On the other hand there is probably little use in removing
the dead code either. It looks you sent a lot of these
patches with identical changelog texts to remove blocks
of dead code, which does not seem productive to me as
these were clearly all left in the code to document
something.

      Arnd

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

* Re: [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush
  2024-01-26  6:27 ` Arnd Bergmann
@ 2024-01-26  9:11   ` Kunwu Chan
  0 siblings, 0 replies; 4+ messages in thread
From: Kunwu Chan @ 2024-01-26  9:11 UTC (permalink / raw)
  To: Arnd Bergmann, Jeremy Kerr, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, aneesh.kumar, Naveen N. Rao
  Cc: linuxppc-dev, linux-kernel

On 2024/1/26 14:27, Arnd Bergmann wrote:
> On Fri, Jan 26, 2024, at 03:12, Kunwu Chan wrote:
>> This part was commented from commit a33a7d7309d7
>> ("[PATCH] spufs: implement mfc access for PPE-side DMA")
>> in about 18 years before.
>>
>> If there are no plans to enable this part code in the future,
>> we can remove this dead code.
>>
>> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
>> Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> 
> Nobody is actively working on this code, so it clearly won't
> be needed in the future.
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> On the other hand there is probably little use in removing
> the dead code either. It looks you sent a lot of these
> patches with identical changelog texts to remove blocks
> of dead code, which does not seem productive to me as
> these were clearly all left in the code to document
> something.
Yes, I was doing some cleanup of useless code the other day.
The previous patches were submitted to remove some code that had been 
unused for a long time and was ineffective.
I didn't remove the comments in the header file and the 
debugging-related parts. Because these parts may be used later.

Thank you very much for the reminder.I'll pay attention to whether it 
has a document feature later.
> 
>        Arnd
-- 
Thanks,
   Kunwu


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

* Re: [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush
  2024-01-26  2:12 [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush Kunwu Chan
  2024-01-26  6:27 ` Arnd Bergmann
@ 2024-05-08 13:39 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2024-05-08 13:39 UTC (permalink / raw)
  To: jk, arnd, mpe, npiggin, christophe.leroy, aneesh.kumar,
	naveen.n.rao, Kunwu Chan
  Cc: linuxppc-dev, linux-kernel

On Fri, 26 Jan 2024 10:12:58 +0800, Kunwu Chan wrote:
> This part was commented from commit a33a7d7309d7
> ("[PATCH] spufs: implement mfc access for PPE-side DMA")
> in about 18 years before.
> 
> If there are no plans to enable this part code in the future,
> we can remove this dead code.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/cell: Code cleanup for spufs_mfc_flush
      https://git.kernel.org/powerpc/c/66d8e646e8e78ea6088d9f6b9465e211566b5133

cheers

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

end of thread, other threads:[~2024-05-08 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26  2:12 [PATCH v2] powerpc/cell: Code cleanup for spufs_mfc_flush Kunwu Chan
2024-01-26  6:27 ` Arnd Bergmann
2024-01-26  9:11   ` Kunwu Chan
2024-05-08 13:39 ` Michael Ellerman

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.