From patchwork Fri May 12 09:41:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13238960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D37A5C7EE25 for ; Fri, 12 May 2023 09:43:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240285AbjELJn1 (ORCPT ); Fri, 12 May 2023 05:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240643AbjELJmr (ORCPT ); Fri, 12 May 2023 05:42:47 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53257124BE for ; Fri, 12 May 2023 02:42:04 -0700 (PDT) Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QHkJT6JM6z67nQw; Fri, 12 May 2023 17:40:09 +0800 (CST) Received: from SecurePC30232.china.huawei.com (10.122.247.234) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 12 May 2023 10:41:50 +0100 From: To: , CC: , , , , Subject: [PATCH 3/4] rasdaemon: remove redundant header file and do some cleaup Date: Fri, 12 May 2023 17:41:28 +0800 Message-ID: <20230512094129.1468-4-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20230512094129.1468-1-shiju.jose@huawei.com> References: <20230512094129.1468-1-shiju.jose@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Xiaofei Tan 1.Remove redundant header file and adjust the header files sequence. 2.Use right character format for printf. Signed-off-by: Xiaofei Tan Signed-off-by: Shiju Jose --- non-standard-hisilicon.c | 4 ++-- ras-memory-failure-handler.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/non-standard-hisilicon.c b/non-standard-hisilicon.c index 9873919..721821e 100644 --- a/non-standard-hisilicon.c +++ b/non-standard-hisilicon.c @@ -370,9 +370,9 @@ static int decode_hisi_common_section(struct ras_events *ras, trace_seq_printf(s, "Register Dump:\n"); for (i = 0; i < err->reg_array_size / sizeof(uint32_t); i++) { - trace_seq_printf(s, "reg%02d=0x%08x\n", i, + trace_seq_printf(s, "reg%02u=0x%08x\n", i, err->reg_array[i]); - HISI_SNPRINTF(hevent.reg_msg, "reg%02d=0x%08x", + HISI_SNPRINTF(hevent.reg_msg, "reg%02u=0x%08x", i, err->reg_array[i]); } } diff --git a/ras-memory-failure-handler.c b/ras-memory-failure-handler.c index 85a8633..c74541f 100644 --- a/ras-memory-failure-handler.c +++ b/ras-memory-failure-handler.c @@ -15,11 +15,10 @@ #include #include #include -#include -#include "ras-memory-failure-handler.h" #include "ras-record.h" #include "ras-logger.h" #include "ras-report.h" +#include "ras-memory-failure-handler.h" /* Memory failure - various types of pages */ enum mf_action_page_type {