Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3309740pxb; Mon, 24 Jan 2022 07:03:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1afmlTAp7Fi/fFMtXZuUrdPwUVlvw2gj5/CbSmuoscK/xAoJJ2xHrht/yoq5na5BfgX60 X-Received: by 2002:a17:902:d883:b0:149:8429:88a7 with SMTP id b3-20020a170902d88300b00149842988a7mr14232678plz.165.1643036617048; Mon, 24 Jan 2022 07:03:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643036617; cv=none; d=google.com; s=arc-20160816; b=zHkGPWwuKHJ5+fvdJwl/5ocR7Pko7iToiiDLNPzmmNvQAwcShq+B5UNS+MU5fx7ch2 Y+h7PU0txfbHhJFFEtb+zhynpVNW7EWTXFODf61agRpOqTDWPZM8hkWo9FABT9TEbbBL VTwydub7R6Wn21OBlJAXenJSMDcfPdCUCy2Pc5kMDFGHw+yFsH1LOYQ8lQ0Ddiw10i2x YIfZ83G5EFloXAY6bJQG4B9jkzzt5YLSKQsqRg3oai7rCS525MRKto6zypkUypJBOKCh 7tr6xFVCmF1EiNdwI5b9TNIoG4kBqPHU0+jPE4xhmPaaoYHV0TPAT9F14wlMsyZZ01zv Wizw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=884EPx7zeLdONILeLA66h3ygMwUbXySanvZ39llmgO4=; b=Fs3Dj6ZnTG0b4z6qQx4hE1H2pUuD1dEv0i4GK2sP7OIhYqL43q3whg1pMuHkGLtIbE F0QwyaJqZQIqKSZS9vpQlIGWRnLZ62PmGTLtip2BwVqof35x0EaXQHlx1vQBxQATps+G 7fGbTv/uGAgmYH/iyca4lvsCOFR92bvHDcFMA47/he1Uu9FjrbaM3hyuuS1Om2oLxKYm R8VUr8IwYOQop+3GrT+fY4lVwZvgTAL/nFL4fUOxr5EqZrfXf30w/6yGn474W0Yn0MQW +g5ic74d6bH59gZtUGNnNUAHcH/7aGdfpSyCxSGsR2ir7DCZmlDhcpj365zCbc3+txqS WrSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.jp header.s=amazon201209 header.b=TOD+OLNe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q132si13624911pgq.162.2022.01.24.07.03.02; Mon, 24 Jan 2022 07:03:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.co.jp header.s=amazon201209 header.b=TOD+OLNe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240527AbiAXAC6 (ORCPT + 99 others); Sun, 23 Jan 2022 19:02:58 -0500 Received: from smtp-fw-80006.amazon.com ([99.78.197.217]:32056 "EHLO smtp-fw-80006.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235204AbiAXAC5 (ORCPT ); Sun, 23 Jan 2022 19:02:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.co.jp; i=@amazon.co.jp; q=dns/txt; s=amazon201209; t=1642982577; x=1674518577; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=884EPx7zeLdONILeLA66h3ygMwUbXySanvZ39llmgO4=; b=TOD+OLNeYlk0ouJ1ouncPyWLDPG4rL+Yl8fd+NymAviHihc1eCihUUnq EmHwJ2alfnmLSRn6V3i2Ax7x1VWQdgCP1EBkmQYAGq7NBZAyLf4Q4ULJA rVSoeQjFiJeutXFvoNe/ICejMqjUcn6O4lRWuC6S0EURsTkn1wbvp2Fy4 E=; X-IronPort-AV: E=Sophos;i="5.88,311,1635206400"; d="scan'208";a="57429041" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP; 24 Jan 2022 00:02:57 +0000 Received: from EX13MTAUWC002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com (Postfix) with ESMTPS id EE8794199F; Mon, 24 Jan 2022 00:02:56 +0000 (UTC) Received: from EX13D04ANC001.ant.amazon.com (10.43.157.89) by EX13MTAUWC002.ant.amazon.com (10.43.162.240) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 24 Jan 2022 00:02:56 +0000 Received: from 88665a182662.ant.amazon.com (10.43.160.114) by EX13D04ANC001.ant.amazon.com (10.43.157.89) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 24 Jan 2022 00:02:53 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , Subject: Re: [PATCH] openrisc/boot: Remove unnecessary initialisation in memcpy(). Date: Mon, 24 Jan 2022 09:02:49 +0900 Message-ID: <20220124000249.4295-1-kuniyu@amazon.co.jp> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.160.114] X-ClientProxiedBy: EX13D03UWC003.ant.amazon.com (10.43.162.79) To EX13D04ANC001.ant.amazon.com (10.43.157.89) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stafford Horne Date: Mon, 24 Jan 2022 08:27:54 +0900 > 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 > > This looks fine to me. I will queue this for the next release. Thank you. > > Just curious why are you working on OpenRISC? While reading memcpy() variants, I found a nit to fix in x86 boot-time memcpy() [0]. While I'm at it, I just started reading all arch ones ;) [0]: https://lore.kernel.org/lkml/20220123015807.45005-1-kuniyu@amazon.co.jp/ > > -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