Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbbD0QKQ (ORCPT ); Mon, 27 Apr 2015 12:10:16 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:33598 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803AbbD0QKM (ORCPT ); Mon, 27 Apr 2015 12:10:12 -0400 Message-ID: <553E5F5D.60302@gmail.com> Date: Mon, 27 Apr 2015 19:10:05 +0300 From: subscivan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jean Delvare , LKML CC: Ivan Khoronzhuk Subject: Re: [PATCH 1/2] firmware: dmi_scan: Simplified displayed version References: <20150421144555.35e2828d@endymion.delvare> In-Reply-To: <20150421144555.35e2828d@endymion.delvare> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2237 Lines: 51 Hi, Jean On 21.04.15 15:45, Jean Delvare wrote: > The trailing .x adds no information for the reader, and if anyone > tries to parse that line, this is more work as they have 3 different > formats to handle instead of 2. Plus, this makes backporting fixes > harder. > > Signed-off-by: Jean Delvare > Fixes: 95be58df74a5 ("firmware: dmi_scan: Use full dmi version for SMBIOS3") > Cc: Ivan Khoronzhuk > --- > It doesn't actually "fix" the mentioned commit, as there is no bug, but > if anyone backports dmi-related commits, picking this one will make > his/her life easier. > > drivers/firmware/dmi_scan.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > --- linux-4.0.orig/drivers/firmware/dmi_scan.c 2015-04-17 10:35:56.959512401 +0200 > +++ linux-4.0/drivers/firmware/dmi_scan.c 2015-04-17 10:38:02.090156803 +0200 > @@ -506,9 +506,8 @@ static int __init dmi_present(const u8 * > if (dmi_walk_early(dmi_decode) == 0) { > if (smbios_ver) { > dmi_ver = smbios_ver; > - pr_info("SMBIOS %d.%d%s present.\n", > - dmi_ver >> 8, dmi_ver & 0xFF, > - (dmi_ver < 0x0300) ? "" : ".x"); > + pr_info("SMBIOS %d.%d present.\n", > + dmi_ver >> 8, dmi_ver & 0xFF); > } else { > dmi_ver = (buf[14] & 0xF0) << 4 | > (buf[14] & 0x0F); > > The main idea here was that dmi version after 3 is in format x.x.x And after v3 it's expected to see such format. But in case if (I hope that will never happen) firmware has 32 bit version of SMBIOS3 the table doesn't have fields to hold revision number, that's why, to warn user about trimming of revision the .x was added. IMHO the 3.2.x is more informative then 3.2 3.2 can be wrongly interpreted as 3.2.0. If script (or else) needs to see version in usual way, it can parse tables recently exposed. But if you insist on 3.2, maybe it be good to warn user in some way like printing pr_info("SMBIOS doc revision cannot be accessible"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/