Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3564172ybx; Fri, 8 Nov 2019 23:30:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxovchT+5QzwnJc05spPBwrtmswuVMRpV48q4jlrqcjjMTklUZAKau6P6r0+LsuRtZo6kFr X-Received: by 2002:a05:6402:7cd:: with SMTP id u13mr14722116edy.246.1573284618332; Fri, 08 Nov 2019 23:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573284618; cv=none; d=google.com; s=arc-20160816; b=D5KvLW9QNSIXd9LLKaaRGPkyZ56tPPTEeDfZaPd9tKVwnQj/zVbRRZIT1y6w8jn6Hd z5MPeBWqZtX8bcqfWQf1en3XP0piQ6/AG6kMc1K3VPnofDhES77nGG2+KYZCBK6/VwCY AgUgQtKHb2Op5MSx+sKYHbKMXS/20WYcNrH9/ylYDjWJnZqa+RmG1kmziN17Nd1LOFro pD+yi1uwOSa4+2hC2hCH5Lrb0ByM7MGEQqbVruL1RqOL8JE9F5PFMlyJd/H0nWLxgwEs rfZHYNUeOXf3NucBzLxSAkjVRpYPX1beBf8HjrJBe4Q1PGrmUT8td8se3XFNBgRo2i2w JsBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4j3hTmax7mad/kEmIkt+tEDYzel5W1al3JAspAyNu+A=; b=OwZTwA5RhBm4MtmHKclfAhD+BkzqTg4nWE/UQg6ShfZ7ZEkjsVMjzhM9y1HlIC1/MO TTPmYw7KLMowWc0SAgCYSyn4px17b+dtKGMepcw/cBPNxPVlJH/4Yx/K+fsscpM7j4Ce 1ozqt/lhx3ayvrsKqY+z5Tf19Xq6y9m+05m0FGLvdI9p/X3jHYfc4sOj+tdAHglBdon6 l0vAtdTpD1V2pTCGKo57V77atEZJM3b9uVtKwE6NUSZZ9H/xWuk6wdE+lSbGJsyA479f az+K65LCLToHaoi88i5HwAQTiH/zyYnxURThzuee/jdp0Dbc+9EQdrXJIqCP1QYlunot MH2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TKe28YAN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ha21si5217732ejb.137.2019.11.08.23.29.55; Fri, 08 Nov 2019 23:30:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TKe28YAN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfKIH2I (ORCPT + 99 others); Sat, 9 Nov 2019 02:28:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:46122 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbfKIH2I (ORCPT ); Sat, 9 Nov 2019 02:28:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4j3hTmax7mad/kEmIkt+tEDYzel5W1al3JAspAyNu+A=; b=TKe28YANSZuBn7sgl7v8/1Thd hcxHeiRQuHl6pzVY8zReuQeT9iRW3IoNpfKEYPvBc9T3An6h3DnWTFpDgn6qjbnuBZuMRbejpKnJE AqDvc0QUuw+gvPFIcC2GQ2/628+pJ6MY36DBdqcfmapucmaAmcRsQWJPGeVsV3+aJIex5Xx1LkL/J RX0vpDzRNSyHZz/JeyffjpczTsIogi+c9v34XHolCaTs0IdedMghPUAMf/1n+3AcZdJDe/wkBfROw 1KNHWBVkwFYWhWJd/55FV2ebTWD4g7XwequaWDGl5KhtdtjI3SVWGXgB1fzeVfYEmHf0ikIKi1nLd SZ3GBtBCw==; Received: from [80.156.29.194] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTLAD-0006Ag-3Z; Sat, 09 Nov 2019 07:28:05 +0000 Date: Sat, 9 Nov 2019 08:28:01 +0100 From: Mauro Carvalho Chehab To: Robert Richter Cc: Borislav Petkov , Tony Luck , James Morse , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Joe Perches Subject: Re: [PATCH v2 05/20] EDAC, mc: Remove needless zero string termination Message-ID: <20191109082801.5d999284@kernel.org> In-Reply-To: <20191106093239.25517-6-rrichter@marvell.com> References: <20191106093239.25517-1-rrichter@marvell.com> <20191106093239.25517-6-rrichter@marvell.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 6 Nov 2019 09:33:11 +0000 Robert Richter escreveu: > Since this is a string already and strlen() has been used to advance > the pointer, the end of the buffer is already zero terminated. Remove > the needless zero string termination. > > Suggested-by: Joe Perches > Signed-off-by: Robert Richter Reviewed-by: Mauro Carvalho Chehab > --- > drivers/edac/edac_mc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c > index f2cbca77bc50..8bfe76d1bdf1 100644 > --- a/drivers/edac/edac_mc.c > +++ b/drivers/edac/edac_mc.c > @@ -1183,7 +1183,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, > } > strcpy(p, dimm->label); > p += strlen(p); > - *p = '\0'; > > /* > * get csrow/channel of the DIMM, in order to allow Cheers, Mauro