Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1249098pxb; Fri, 1 Apr 2022 08:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW3aenQY1lYZnT+4gCNwturMvv0d1L8nN3QdBPc/S/IWB0IIdjS1u7uZ2igX1vuc6VH7Is X-Received: by 2002:a17:907:1c82:b0:6e0:acef:d238 with SMTP id nb2-20020a1709071c8200b006e0acefd238mr324143ejc.96.1648826478741; Fri, 01 Apr 2022 08:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648826478; cv=none; d=google.com; s=arc-20160816; b=1E9FR/bjZrZbiX4eQFDvRN9pdDMHeHEHAm3U3e7tdiAnHiVDXMIbxdH+oTw58DX3dk 6coZsivaxBjopSWvkmOgU0O4GKyOeNvMpbcEBAwhNDDEv59OnLN+TVLh4+kBen36JqTr Dw7uhoFnj/JEZkE+5DRaDtWCnye+o4JzOI+jrhEuo01krF3y7IBu00ouRSGhja7n59TB aRU8992eLk8unFqJXuZqKQ2UUW3MqXn2kFac5OVPU0Dh8x4zxwJKlWBkqKaPek3D2AtS pulWYmPZgM3taUzG0iNkltVg1j7grUofWA87bUCAm2CdMCdQfzjBzQqVk2Siy3S+tqfM YEiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=as+p58iMm+e6SBmBuSRsZ9U+ucRlpHf/7JnVVUQeuiE=; b=IfCzOvqpgIMq2O04+/IOYjExPgsgnbqjTtyBCTohu0XnZjahQlPNP4AfYSGwYfrm3c bgbI4UGI9w/hPn5s7xKt/XNb+XaMdB0ffgC8FsUXV+KpA2HqgNMkZM2zx8vCLObNgivg MG43w8Z8M94OiRPKJX7l/DWCOF8wyZbDPj8A6eyPFt4Dd3RF5ID8ct8WjcHsbq/v4zGb TDhv7dwnHpvHMJCt+MD30qh8iCT76GLRlC0bM5aMxFzaB9baJ/zPxbv7p/CuIMT/mW1s oyGRwixQmW2fLcVi8xl9KKLOTOwOURbQHWBXlPdS0qgaYRx/vFGC2528/k9PmxOw1VGi 0vmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g13-20020a056402090d00b0041b6412d2cesi2340528edz.171.2022.04.01.08.20.32; Fri, 01 Apr 2022 08:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245355AbiDAGWD (ORCPT + 99 others); Fri, 1 Apr 2022 02:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245346AbiDAGWC (ORCPT ); Fri, 1 Apr 2022 02:22:02 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FC111987A; Thu, 31 Mar 2022 23:20:12 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0V8o8chS_1648794008; Received: from 30.240.122.30(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0V8o8chS_1648794008) by smtp.aliyun-inc.com(127.0.0.1); Fri, 01 Apr 2022 14:20:10 +0800 Message-ID: Date: Fri, 1 Apr 2022 14:20:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v7 0/3] EDAC/ghes: refactor memory error reporting to avoid code duplication Content-Language: en-US To: bp@alien8.de, rric@kernel.org Cc: mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com, ardb@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, zhangliguang@linux.alibaba.com, zhuo.song@linux.alibaba.com References: <20211210134019.28536-1-xueshuai@linux.alibaba.com> <20220308144053.49090-1-xueshuai@linux.alibaba.com> From: Shuai Xue In-Reply-To: <20220308144053.49090-1-xueshuai@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Borislav, 在 2022/3/8 PM10:40, Shuai Xue 写道: > ghes_edac_report_mem_error() in ghes_edac.c is a Long Method and have > Duplicated Code with cper_mem_err_location(), cper_dimm_err_location(), and > cper_mem_err_type_str() in drivers/firmware/efi/cper.c. In addition, the > cper_print_mem() in drivers/firmware/efi/cper.c only reports the error > status and misses its description. > > This patch set is to refactor ghes_edac_report_mem_error with: > > - Patch 01 is to wrap up error status decoding logics and reuse it in > cper_print_mem(). > - Patch 02 is to introduces cper_*(), into ghes_edac_report_mem_error(), > this can avoid bunch of duplicate code lines; > - Patch 03 is to improve report format > > Changes since v6: > - Rework patch 02 by Borislav Petkov > - add patch 03 to improve format > - Link: https://lore.kernel.org/r/20220303122626.99740-3-xueshuai@linux.alibaba.com > > Changes since v5: > - Delete change summary in commit log > - Link: https://lore.kernel.org/all/20220126081702.55167-1-xueshuai@linux.alibaba.com/ > - Thanks Borislav Petkov for review comments. > > Changes since v4: > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220125024939.30635-1-xueshuai@linux.alibaba.com/ > > Changes since v3: > > - make cper_mem_err_status_str table a lot more compact > - Fix alignment and format problem > - Link: https://lore.kernel.org/all/20220124024759.19176-1-xueshuai@linux.alibaba.com/ > > Changes since v2: > > - delete the unified patch > - adjusted the order of patches > - Link: https://lore.kernel.org/all/20211210134019.28536-1-xueshuai@linux.alibaba.com/ > > Changes since v1: > > - add a new patch to unify ghes and cper before removing duplication. > - document the changes in patch description > - add EXPORT_SYMBOL_GPL()s for cper_*() > - document and the dependency and add UEFI_CPER dependency explicitly > - Link: https://lore.kernel.org/all/20211207031905.61906-2-xueshuai@linux.alibaba.com/ > > Shuai Xue (3): > efi/cper: add cper_mem_err_status_str to decode error description > EDAC/ghes: Unify CPER memory error location reporting > efi/cper: reformat CPER memory error location to more readable > > drivers/edac/Kconfig | 1 + > drivers/edac/ghes_edac.c | 200 +++++++----------------------------- > drivers/firmware/efi/cper.c | 64 ++++++++---- > include/linux/cper.h | 3 + > 4 files changed, 87 insertions(+), 181 deletions(-) Ping. I am wondering if you have any comments on this series of patches? Best Regards, Shuai