Received: by 10.223.185.116 with SMTP id b49csp5245131wrg; Tue, 27 Feb 2018 10:04:13 -0800 (PST) X-Google-Smtp-Source: AH8x226eLJSj4kgUl3HZ+8Dj1egW3M/9xFtp0FN+LTczRAG8zcCCWVdCI6wmKO3myDwcFAMOjAQB X-Received: by 10.98.210.70 with SMTP id c67mr14847266pfg.164.1519754653425; Tue, 27 Feb 2018 10:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519754653; cv=none; d=google.com; s=arc-20160816; b=pM2olFKfOnZ97aHLWXFmWYn6EbRbJ6kUqq9ZMSHkvfmgMZlaL4TNvgtf8BKrvWbiJB rw5+lzpiwXaAXFuvA8sbGQfdtTQ9dUK93c55nUIOMwoW9S8I85tt+4ROMyDsYoZVxPuN Wz4XHvVbd/4eiZHQuumc5KJh7qacYLyfEJFMbUI+dBeUo2RWdv+X1QEjrLAFla8HLG4I JBOm083J56Md7+rljooiLOcl9H0eLCRZIRpPeFr0OvTiTuCC8JUWUUI5lWSfGS0ldbko qZeJSvHn4/enuIdQIlLpD1fWzQF2wGQJWucOB0Fpcw7rEvbw1XG44m/a76LstmjZjYKb C9dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=8so2/nOq0dG+gaL2lS9oUiAHOXZDGkQQlTh2i1bRrO8=; b=0b9PCkmNqaFP0fSfCmYUPv8OMormykycXwQ4ok+sxzvL1R/y2eETtMjkPTyntn4Shd R4mLgJxQJ2pcbs7yUni0SZzwwFCKOCvMYJEIEgxxwpmPb4z7Ooi+Oav0QVDJNqT7ptEI OQjk+ECmNSwAbcDBpRhuNdBxIS/y8yK5Mia48tD8Jx6q6ttAKTp9xbr+oN/aJ8o70Uuz +E0niQyxCicBul290i4Kn2IEzKanf+HIW3CJwS6KMlBqSZaq75ID5DajAx99oQe99F12 h47G59yK+OhCiw/A3DXVo+3QKikdQ942mEx+W3HMGUbWfP1WtJG4g5HYTjR4MB6r7Vg0 Gkiw== 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 j1-v6si1837717pld.734.2018.02.27.10.03.53; Tue, 27 Feb 2018 10:04:13 -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; 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 S1751937AbeB0SC6 (ORCPT + 99 others); Tue, 27 Feb 2018 13:02:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:51956 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbeB0SC4 (ORCPT ); Tue, 27 Feb 2018 13:02:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0F7A5AD4B; Tue, 27 Feb 2018 18:02:54 +0000 (UTC) Date: Tue, 27 Feb 2018 19:02:31 +0100 From: Borislav Petkov To: "Ghannam, Yazen" Cc: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ard.biesheuvel@linaro.org" , "x86@kernel.org" Subject: Re: [PATCH v2 3/8] efi: Decode IA32/X64 Processor Error Info Structure Message-ID: <20180227180231.GO26382@pd.tnic> References: <20180226193904.20532-1-Yazen.Ghannam@amd.com> <20180226193904.20532-4-Yazen.Ghannam@amd.com> <20180227142531.GF26382@pd.tnic> <20180227170423.GK26382@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2018 at 05:46:54PM +0000, Ghannam, Yazen wrote: > I think there's value in following the conventions in a subsystem. "conventions in a subsystem" my ass. That's brainless copy-pasting. It was added by f6edea77c8c8 ("ACPI, APEI, CPER: Cleanup CPER memory error output format") and then replicated everywhere. It is simply a dumb way of writing: snprintf(newpfx, sizeof(newpfx), "%s ", pfx); > I can change this if you give a reason besides "it's dumb". Two can play that game: you get to keep it if you give a good reason why. > We do map the spec-defined GUIDs in patch 4 of this set. I don't know if there's > a central place where all vendor-defined GUIDs are listed. I can look into this. Yes, at least for the most prominent ones. > And the raw value should still be printed because > 1) It may represent a type that we can't decode. Maybe a type that's not part of > the spec. If we can't decode it, *then* you dump it: "Unrecognized type: 0x%llx ..." > 2) It's good to have the raw value for reference. We do this with MCA_STATUS > where we print the raw value followed by the decoding. 1. No one stares at the raw value if the bits are decoded 2. MCA_STATUS is one register - this error record is huge. > The structs are all different even though some fields may be the same. Fair enough. Only if it makes sense. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --