All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] raid5-ppl: use swap() to make code cleaner
@ 2021-10-28  8:48 cgel.zte
  2021-11-02 18:27 ` Song Liu
  2021-11-03  6:09 ` Song Liu
  0 siblings, 2 replies; 4+ messages in thread
From: cgel.zte @ 2021-10-28  8:48 UTC (permalink / raw)
  To: song; +Cc: pmenzel, linux-kbuild, linux-kernel, zealci, yang.guang5

From: Yang Guang <yang.guang5@zte.com.cn>

Use the macro `swap()` defined in `include/linux/minmax.h` to avoid
opencoding it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
---
 drivers/md/raid5-ppl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 3ddc2aa0b530..4ab417915d7f 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -1081,7 +1081,7 @@ static int ppl_load_distributed(struct ppl_log *log)
 	struct ppl_conf *ppl_conf = log->ppl_conf;
 	struct md_rdev *rdev = log->rdev;
 	struct mddev *mddev = rdev->mddev;
-	struct page *page, *page2, *tmp;
+	struct page *page, *page2;
 	struct ppl_header *pplhdr = NULL, *prev_pplhdr = NULL;
 	u32 crc, crc_stored;
 	u32 signature;
@@ -1156,9 +1156,7 @@ static int ppl_load_distributed(struct ppl_log *log)
 		prev_pplhdr_offset = pplhdr_offset;
 		prev_pplhdr = pplhdr;
 
-		tmp = page;
-		page = page2;
-		page2 = tmp;
+		swap(page, page2);
 
 		/* calculate next potential ppl offset */
 		for (i = 0; i < le32_to_cpu(pplhdr->entries_count); i++)
-- 
2.30.2


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

* Re: [PATCH v2] raid5-ppl: use swap() to make code cleaner
  2021-10-28  8:48 [PATCH v2] raid5-ppl: use swap() to make code cleaner cgel.zte
@ 2021-11-02 18:27 ` Song Liu
  2021-11-03  6:09 ` Song Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Song Liu @ 2021-11-02 18:27 UTC (permalink / raw)
  To: cgel.zte; +Cc: Paul Menzel, linux-kbuild, open list, zealci, yang.guang5

On Thu, Oct 28, 2021 at 1:48 AM <cgel.zte@gmail.com> wrote:
>
> From: Yang Guang <yang.guang5@zte.com.cn>
>
> Use the macro `swap()` defined in `include/linux/minmax.h` to avoid
> opencoding it.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>

Applied to md-next. Thanks!

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

* Re: [PATCH v2] raid5-ppl: use swap() to make code cleaner
  2021-10-28  8:48 [PATCH v2] raid5-ppl: use swap() to make code cleaner cgel.zte
  2021-11-02 18:27 ` Song Liu
@ 2021-11-03  6:09 ` Song Liu
  2021-11-03  6:47   ` CGEL
  1 sibling, 1 reply; 4+ messages in thread
From: Song Liu @ 2021-11-03  6:09 UTC (permalink / raw)
  To: cgel.zte; +Cc: Paul Menzel, linux-kbuild, open list, zealci, yang.guang5

On Thu, Oct 28, 2021 at 1:48 AM <cgel.zte@gmail.com> wrote:

By the way, who is the owner of cgel.zte@gmail.com? I see the same
account sending patches for different authors. If it is one person sending
patches for another person, we need "Signed-off-by" from both of them.

Thanks,
Song

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

* Re: [PATCH v2] raid5-ppl: use swap() to make code cleaner
  2021-11-03  6:09 ` Song Liu
@ 2021-11-03  6:47   ` CGEL
  0 siblings, 0 replies; 4+ messages in thread
From: CGEL @ 2021-11-03  6:47 UTC (permalink / raw)
  To: Song Liu; +Cc: Paul Menzel, linux-kbuild, open list, zealci, yang.guang5

Hi Song,

Because we don't have right to send out email by @zte.com.cn.
So we all use cgel.zte@gmail.com to send out email and sign by echo one own @zte.com.cn email.
My email is yang.guang5@zte.com.cn.
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Thank you!

On Tue, Nov 02, 2021 at 11:09:07PM -0700, Song Liu wrote:
> On Thu, Oct 28, 2021 at 1:48 AM <cgel.zte@gmail.com> wrote:
> 
> By the way, who is the owner of cgel.zte@gmail.com? I see the same
> account sending patches for different authors. If it is one person sending
> patches for another person, we need "Signed-off-by" from both of them.
> 
> Thanks,
> Song

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

end of thread, other threads:[~2021-11-03  6:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  8:48 [PATCH v2] raid5-ppl: use swap() to make code cleaner cgel.zte
2021-11-02 18:27 ` Song Liu
2021-11-03  6:09 ` Song Liu
2021-11-03  6:47   ` CGEL

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.