From patchwork Fri May 4 05:59:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 134942 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp436845lji; Thu, 3 May 2018 23:01:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpgSG4Z59bJzObzrJY7qe8qLyzEKrXu489y1uQfqQKWQQeHc7/egQeKYxH7xDVufKRkSEYd X-Received: by 2002:a17:902:6b4c:: with SMTP id g12-v6mr26559886plt.148.1525413677002; Thu, 03 May 2018 23:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525413676; cv=none; d=google.com; s=arc-20160816; b=iOk0T6OUN0kaJh+pvs5eZdRNeZPT3DVuWV5PNfLgqvzsdOansrQbL+K8shEJYvZSos EfLTb0ut4GQgqPr+dZ/3Gwqy+pktW5zEUI5azPjdkEGlJCI43D4xQRzq6V40NgAwWM67 1HSApRRmE2AGAa/PNYgT/eNYURjyIV9/iWB6ufTdPS7j52Ap/p/tGATN0kjhdZQuVJIc T+krruUYWLPkH60oWjN16gQ8hMyRTme5psEJhuuacD1kZgNJGZSYMMkt2RvRNIFZZq1j I8pWsttpwoHZpdzQMeI8IFH+4O6OQudGKXyYYzGaSOMabmLFY9wOrAl5lWE8XhWP1ufL 9Tcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=G4kxhD66Wvn9rFQJ4dGKYc6Iu1Lcl5TyW8V/Uf+YAIU=; b=Kgi468wnBPpghA90HU1+8LWSYN4zyp9mHeo+sogWNc9pTSPo9oduma3ksgoa74JWuC 8y308y5VMkAc7GMLgjyz3LXiU6IMqQNZzghRXUHPoAvJ2Y+gbYH30ZWAmnE1S9NFaJg5 9oJJgWQ0FF/UrLcu5EcTQupOxIoU/MpKrkmPpES+41rjNgD65NFG2WB24/PNt9jnearQ tsG5hMV2J6EeH2pyvPX22AqfLJbAFRxNCDnxcyE1r4nxSASrf/nHhcVJfXgYueqxdxdV BtG2wozUbasFj2UFfaByjF1Uu3LkydgiLUzFEC6Ji38IYYkTHXh22ZptXsl189efk78n wgsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EEpTXUoS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25si6655787pfn.248.2018.05.03.23.01.16; Thu, 03 May 2018 23:01:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=EEpTXUoS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbeEDGBM (ORCPT + 29 others); Fri, 4 May 2018 02:01:12 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37439 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbeEDGBG (ORCPT ); Fri, 4 May 2018 02:01:06 -0400 Received: by mail-wr0-f196.google.com with SMTP id c14-v6so19763221wrd.4 for ; Thu, 03 May 2018 23:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G4kxhD66Wvn9rFQJ4dGKYc6Iu1Lcl5TyW8V/Uf+YAIU=; b=EEpTXUoSQPyMXDIrwJrPcSqdcoEB1Q4G6DyMY+YGLw/R1y7AL0rqsKOJIo7+jlVEZt tHj96buQSLuO+DAoh3zpQ9gfOugog0K39Kcju/8OvaA+9r2K6rOiCrMxiyy43lAOALIE AoszcAucLOPXevQB08Y8XIaqdN1MezpvtMFXc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G4kxhD66Wvn9rFQJ4dGKYc6Iu1Lcl5TyW8V/Uf+YAIU=; b=suML2Yr0lh5ViqDkoXkwSfsy4GiWns4xNsMzs6SGmCGd4gh0oUCVygaz0mBYPWpA/d qkpu78UP/Wr6Hti68dZZojRtGP38DGZeF/2wMBcwTwxPAJPF+EV22ecxcqtsKLkJCSeY H5OcisM73ymAo2Dy0RkilNy7oRtyqEIg2tjLgYM4bB563zmAdBsocBUqqFND7YAKFnyS IclB1LAbv20P7ps4CRRFE4sa2KQT2wB5zLar+fBB7xb4FZDByf4v3KE0m5jnDqXBP0tK bWBHUJlQKKz98tH+6h8rG7mLtB4rfbQX69iAqxXH2EbEsPT430Ia/aaCCZK89wRQGdks +kFw== X-Gm-Message-State: ALQs6tAPBPbCzTozpzxhHNc+9BjzpowCh3oPsJWWUFUfYM1nMEbygafG U/EXZs+zjmibOnug2zAS5/Fq2w== X-Received: by 2002:adf:c613:: with SMTP id n19-v6mr16498066wrg.177.1525413664974; Thu, 03 May 2018 23:01:04 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id i30-v6sm32411863wra.38.2018.05.03.23.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 23:01:04 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Borislav Petkov , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: [PATCH 02/17] efi/cper: Remove the INDENT_SP silliness Date: Fri, 4 May 2018 07:59:48 +0200 Message-Id: <20180504060003.19618-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180504060003.19618-1-ard.biesheuvel@linaro.org> References: <20180504060003.19618-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov A separate define just to print a space character is silly and completely unneeded. Remove it. Signed-off-by: Borislav Petkov Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/cper-arm.c | 6 ++---- drivers/firmware/efi/cper.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) -- 2.17.0 diff --git a/drivers/firmware/efi/cper-arm.c b/drivers/firmware/efi/cper-arm.c index 698e5c8e0c8d..502811344e81 100644 --- a/drivers/firmware/efi/cper-arm.c +++ b/drivers/firmware/efi/cper-arm.c @@ -30,8 +30,6 @@ #include #include -#define INDENT_SP " " - static const char * const arm_reg_ctx_strs[] = { "AArch32 general purpose registers", "AArch32 EL1 context registers", @@ -283,7 +281,7 @@ void cper_print_proc_arm(const char *pfx, pfx, proc->psci_state); } - snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP); + snprintf(newpfx, sizeof(newpfx), "%s ", pfx); err_info = (struct cper_arm_err_info *)(proc + 1); for (i = 0; i < proc->err_info_num; i++) { @@ -310,7 +308,7 @@ void cper_print_proc_arm(const char *pfx, if (err_info->validation_bits & CPER_ARM_INFO_VALID_ERR_INFO) { printk("%serror_info: 0x%016llx\n", newpfx, err_info->error_info); - snprintf(infopfx, sizeof(infopfx), "%s%s", newpfx, INDENT_SP); + snprintf(infopfx, sizeof(infopfx), "%s ", newpfx); cper_print_arm_err_info(infopfx, err_info->type, err_info->error_info); } diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c index c165933ebf38..ab21f1614007 100644 --- a/drivers/firmware/efi/cper.c +++ b/drivers/firmware/efi/cper.c @@ -37,8 +37,6 @@ #include #include -#define INDENT_SP " " - static char rcd_decode_str[CPER_REC_LEN]; /* @@ -433,7 +431,7 @@ cper_estatus_print_section(const char *pfx, struct acpi_hest_generic_data *gdata if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) printk("%s""fru_text: %.20s\n", pfx, gdata->fru_text); - snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP); + snprintf(newpfx, sizeof(newpfx), "%s ", pfx); if (guid_equal(sec_type, &CPER_SEC_PROC_GENERIC)) { struct cper_sec_proc_generic *proc_err = acpi_hest_get_payload(gdata); @@ -500,7 +498,7 @@ void cper_estatus_print(const char *pfx, "It has been corrected by h/w " "and requires no further action"); printk("%s""event severity: %s\n", pfx, cper_severity_str(severity)); - snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP); + snprintf(newpfx, sizeof(newpfx), "%s ", pfx); apei_estatus_for_each_section(estatus, gdata) { cper_estatus_print_section(newpfx, gdata, sec_no);