Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6469435ybi; Wed, 29 May 2019 08:16:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6B5DBZ9iTwfFizKlJ7NKASYP8YMtFQrgXKZj5JnyZNvuC1umtmGAtnmo464tkqJJQM51t X-Received: by 2002:a17:90a:8d14:: with SMTP id c20mr12779208pjo.136.1559142994775; Wed, 29 May 2019 08:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559142994; cv=none; d=google.com; s=arc-20160816; b=uCSqBtdvR/zkd2JXKKbGt0dZDjbcheZlZYqwOgOzWhYQM3DwZNyx1K5Wqj4beVNm3j mFf+8RW2gbxVO186BVeubOpfTQZsgIAv3qCRWYQ/p5J3qFd42ri6/QDfME18unQ2wBnD SCQRLWdR296z4LHtDcfTF0hpA6PxZeIUSVWM2BBANL2A30B64pYXCKa+yq8yQkGYefND OsGwxu73LneNcjoFgeXRSkZ/N/iMeTa3H5ynfS0ZCyTKaMIoXKWjEJYlIOJ4oe9mZ1ld swdlj4SoyEpxJe1KW9xEgffHVbGNm780z8IGzRbCnL1TqDXiJixe1oB/PZoE+8NIh7O0 HMRw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fA8qAV5yY0iA5fVgGLxNDn05IPclDLP9ZJut36x3RtQ=; b=lwG2i1SAmoDLVer6Rqc31ND32f3LwpL6gDurOzPmLX2OxKEO790CCmCGqbCx8ZPRnX JvnKgiAZROhhM3gZWAZ3AqMqSofoOD3KR3KCmIsUqFLVyfqfwf4fhDbK/esTynIJFu4U Ou/GSGPCwbq6X9LyHMsUYrbuM+OANP/TvTrthFrfRePB2rTrhaNil4h1SJQBnNPh0A0h tCLZJwPfxiRWMqJ5zWF5Cpz5QWzym6N2/ZX1/bacQlkVY7460MacaEibxlF/1Eqk+1bB 0O9wceP/2XjY3yKuDeeP0D+CAxx4mEMWqNsmJRUsDa0ODdz6ZozakFBt1dR+/6oNR8ja mTcw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si24368007pgp.35.2019.05.29.08.16.16; Wed, 29 May 2019 08:16:34 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbfE2PNX (ORCPT + 99 others); Wed, 29 May 2019 11:13:23 -0400 Received: from foss.arm.com ([217.140.101.70]:47932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbfE2PNX (ORCPT ); Wed, 29 May 2019 11:13:23 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 829D4341; Wed, 29 May 2019 08:13:22 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6F6E03F5AF; Wed, 29 May 2019 08:13:21 -0700 (PDT) Subject: Re: [PATCH 10/21] EDAC, ghes: Remove pvt->detail_location string To: Robert Richter Cc: Borislav Petkov , Tony Luck , Mauro Carvalho Chehab , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20190529084344.28562-1-rrichter@marvell.com> <20190529084344.28562-11-rrichter@marvell.com> From: James Morse Message-ID: <7017c91e-8923-c8d2-26ca-875328ab855a@arm.com> Date: Wed, 29 May 2019 16:13:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190529084344.28562-11-rrichter@marvell.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On 29/05/2019 09:44, Robert Richter wrote: > The detail_location[] string in struct ghes_edac_pvt is complete > useless and data is just copied around. Put everything into > e->other_detail from the beginning. We still print all that complete-useless detail_location stuff... so this commit message had me confused about what you're doing here. I think you meant the space for the string, instead of the value! | detail_location[] is used to collect two location strings so they can be passed as one | to trace_mc_event(). Instead of having an extra copy step, assemble the location string | in other_detail[] from the beginning. > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c > index 39702bac5eaf..c18f16bc9e4d 100644 > --- a/drivers/edac/ghes_edac.c > +++ b/drivers/edac/ghes_edac.c > @@ -23,8 +23,7 @@ struct ghes_edac_pvt { > struct mem_ctl_info *mci; > > /* Buffers for the error handling routine */ > - char detail_location[240]; > - char other_detail[160]; > + char other_detail[400]; > char msg[80]; > }; > > @@ -225,13 +224,14 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err) > memset(e, 0, sizeof (*e)); > e->error_count = 1; > strcpy(e->label, "unknown label"); > - e->msg = pvt->msg; > - e->other_detail = pvt->other_detail; > e->top_layer = -1; > e->mid_layer = -1; > e->low_layer = -1; > - *pvt->other_detail = '\0'; > + e->msg = pvt->msg; > + e->other_detail = pvt->other_detail; > + > *pvt->msg = '\0'; > + *pvt->other_detail = '\0'; ... so no change? Could you drop this hunk? Regardless, Reviewed-by: James Morse Thanks, James