From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH] openrisc/boot: Remove unnecessary initialisation in memcpy().
Date: Mon, 24 Jan 2022 08:27:54 +0900 [thread overview]
Message-ID: <Ye3keps4aHhkbYzr@antec> (raw)
In-Reply-To: <20220123020100.45201-1-kuniyu@amazon.co.jp>
On Sun, Jan 23, 2022 at 11:01:00AM +0900, Kuniyuki Iwashima wrote:
> 'd' and 's' are initialised later with 'dest_w' and 'src_w', so we need not
> initialise them before that.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
This looks fine to me. I will queue this for the next release.
Just curious why are you working on OpenRISC?
-Stafford
> ---
> arch/openrisc/lib/memcpy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/openrisc/lib/memcpy.c b/arch/openrisc/lib/memcpy.c
> index fe2177628..e2af9b510 100644
> --- a/arch/openrisc/lib/memcpy.c
> +++ b/arch/openrisc/lib/memcpy.c
> @@ -101,7 +101,7 @@ void *memcpy(void *dest, __const void *src, __kernel_size_t n)
> */
> void *memcpy(void *dest, __const void *src, __kernel_size_t n)
> {
> - unsigned char *d = (unsigned char *)dest, *s = (unsigned char *)src;
> + unsigned char *d, *s;
> uint32_t *dest_w = (uint32_t *)dest, *src_w = (uint32_t *)src;
>
> /* If both source and dest are word aligned copy words */
> --
> 2.30.2
>
WARNING: multiple messages have this Message-ID (diff)
From: Stafford Horne <shorne@gmail.com>
To: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Cc: Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Benjamin Herrenschmidt <benh@amazon.com>,
Kuniyuki Iwashima <kuni1840@gmail.com>,
openrisc@lists.librecores.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] openrisc/boot: Remove unnecessary initialisation in memcpy().
Date: Mon, 24 Jan 2022 08:27:54 +0900 [thread overview]
Message-ID: <Ye3keps4aHhkbYzr@antec> (raw)
In-Reply-To: <20220123020100.45201-1-kuniyu@amazon.co.jp>
On Sun, Jan 23, 2022 at 11:01:00AM +0900, Kuniyuki Iwashima wrote:
> 'd' and 's' are initialised later with 'dest_w' and 'src_w', so we need not
> initialise them before that.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
This looks fine to me. I will queue this for the next release.
Just curious why are you working on OpenRISC?
-Stafford
> ---
> arch/openrisc/lib/memcpy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/openrisc/lib/memcpy.c b/arch/openrisc/lib/memcpy.c
> index fe2177628..e2af9b510 100644
> --- a/arch/openrisc/lib/memcpy.c
> +++ b/arch/openrisc/lib/memcpy.c
> @@ -101,7 +101,7 @@ void *memcpy(void *dest, __const void *src, __kernel_size_t n)
> */
> void *memcpy(void *dest, __const void *src, __kernel_size_t n)
> {
> - unsigned char *d = (unsigned char *)dest, *s = (unsigned char *)src;
> + unsigned char *d, *s;
> uint32_t *dest_w = (uint32_t *)dest, *src_w = (uint32_t *)src;
>
> /* If both source and dest are word aligned copy words */
> --
> 2.30.2
>
next prev parent reply other threads:[~2022-01-23 23:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-23 2:01 [OpenRISC] [PATCH] openrisc/boot: Remove unnecessary initialisation in memcpy() Kuniyuki Iwashima
2022-01-23 2:01 ` Kuniyuki Iwashima
2022-01-23 23:27 ` Stafford Horne [this message]
2022-01-23 23:27 ` Stafford Horne
2022-01-24 0:02 ` [OpenRISC] " Kuniyuki Iwashima
2022-01-24 0:02 ` Kuniyuki Iwashima
2022-01-24 0:45 ` [OpenRISC] " Stafford Horne
2022-01-24 0:45 ` Stafford Horne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ye3keps4aHhkbYzr@antec \
--to=shorne@gmail.com \
--cc=openrisc@lists.librecores.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.