Skip to content

Commit

Permalink
openrisc/boot: Remove unnecessary initialisation in memcpy().
Browse files Browse the repository at this point in the history
'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>
Signed-off-by: Stafford Horne <shorne@gmail.com>
  • Loading branch information
Kuniyuki Iwashima authored and Stafford Horne committed Jan 30, 2022
1 parent e783362 commit 862cf8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/openrisc/lib/memcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 862cf8d

Please sign in to comment.