linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/spufs: adjust list element pointer type
@ 2020-05-08  9:12 Julia Lawall
  2020-05-08 10:13 ` Jeremy Kerr
  2022-02-15  5:26 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Julia Lawall @ 2020-05-08  9:12 UTC (permalink / raw)
  To: Jeremy Kerr
  Cc: Nic Volanschi, Arnd Bergmann, kernel-janitors, linux-kernel,
	Paul Mackerras, linuxppc-dev

Other uses of &gang->aff_list_head, eg in spufs_assert_affinity, indicate
that the list elements have type spu_context, not spu as used here.  Change
the type of tmp accordingly.

This has no impact on the execution, because tmp is not used in the body of
the loop.

Fixes: c5fc8d2a92461 ("[CELL] cell: add placement computation for scheduling of affinity contexts")
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 arch/powerpc/platforms/cell/spufs/sched.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index f18d5067cd0f..487fcb47f10d 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -344,8 +344,7 @@ static struct spu *aff_ref_location(struct spu_context *ctx, int mem_aff,
 static void aff_set_ref_point_location(struct spu_gang *gang)
 {
 	int mem_aff, gs, lowest_offset;
-	struct spu_context *ctx;
-	struct spu *tmp;
+	struct spu_context *tmp, *ctx;
 
 	mem_aff = gang->aff_ref_ctx->flags & SPU_CREATE_AFFINITY_MEM;
 	lowest_offset = 0;


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

* Re: [PATCH] powerpc/spufs: adjust list element pointer type
  2020-05-08  9:12 [PATCH] powerpc/spufs: adjust list element pointer type Julia Lawall
@ 2020-05-08 10:13 ` Jeremy Kerr
  2020-05-08 10:40   ` Julia Lawall
  2022-02-15  5:26 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Jeremy Kerr @ 2020-05-08 10:13 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Nic Volanschi, Arnd Bergmann, kernel-janitors, linux-kernel,
	Paul Mackerras, linuxppc-dev

Hi Julia,

> Other uses of &gang->aff_list_head, eg in spufs_assert_affinity, indicate
> that the list elements have type spu_context, not spu as used here.  Change
> the type of tmp accordingly.

Looks good to me; we could even use ctx there, rather than the separate
tmp variable.

Reviewed-by: Jeremy Kerr <jk@ozlabs.org>

Cheers,


Jeremy


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

* Re: [PATCH] powerpc/spufs: adjust list element pointer type
  2020-05-08 10:13 ` Jeremy Kerr
@ 2020-05-08 10:40   ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2020-05-08 10:40 UTC (permalink / raw)
  To: Jeremy Kerr
  Cc: Nic Volanschi, Arnd Bergmann, kernel-janitors, linux-kernel,
	Paul Mackerras, linuxppc-dev



On Fri, 8 May 2020, Jeremy Kerr wrote:

> Hi Julia,
>
> > Other uses of &gang->aff_list_head, eg in spufs_assert_affinity, indicate
> > that the list elements have type spu_context, not spu as used here.  Change
> > the type of tmp accordingly.
>
> Looks good to me; we could even use ctx there, rather than the separate
> tmp variable.

I thought about that, but it seemed a little bit abusive, since ctx is
used in an iteration over another list.  But if you prefer that I can
change it.

julia

>
> Reviewed-by: Jeremy Kerr <jk@ozlabs.org>
>
> Cheers,
>
>
> Jeremy
>
>

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

* Re: [PATCH] powerpc/spufs: adjust list element pointer type
  2020-05-08  9:12 [PATCH] powerpc/spufs: adjust list element pointer type Julia Lawall
  2020-05-08 10:13 ` Jeremy Kerr
@ 2022-02-15  5:26 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2022-02-15  5:26 UTC (permalink / raw)
  To: Jeremy Kerr, Julia Lawall
  Cc: Nic Volanschi, Arnd Bergmann, kernel-janitors, linux-kernel,
	Paul Mackerras, linuxppc-dev

On Fri, 08 May 2020 09:12:56 +0000, Julia Lawall wrote:
> Other uses of &gang->aff_list_head, eg in spufs_assert_affinity, indicate
> that the list elements have type spu_context, not spu as used here.  Change
> the type of tmp accordingly.
> 
> This has no impact on the execution, because tmp is not used in the body of
> the loop.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/spufs: adjust list element pointer type
      https://git.kernel.org/powerpc/c/925f76c55784fdc17ab41aecde06b30439ceb73a

cheers

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

end of thread, other threads:[~2022-02-15  5:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  9:12 [PATCH] powerpc/spufs: adjust list element pointer type Julia Lawall
2020-05-08 10:13 ` Jeremy Kerr
2020-05-08 10:40   ` Julia Lawall
2022-02-15  5:26 ` 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).