From: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
To: Ivan Khoronzhuk
<ivan.khoronzhuk-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
dmidecode-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org,
leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute
Date: Tue, 3 Feb 2015 10:49:53 +0000 [thread overview]
Message-ID: <20150203104953.GA6461@codeblueprint.co.uk> (raw)
In-Reply-To: <54C906A9.1050001-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Wed, 28 Jan, at 05:56:25PM, Ivan Khoronzhuk wrote:
> >diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c
> >index e0f1cb3..61b6a38 100644
> >--- a/drivers/firmware/dmi-sysfs.c
> >+++ b/drivers/firmware/dmi-sysfs.c
> >@@ -29,6 +29,8 @@
> > #define MAX_ENTRY_TYPE 255 /* Most of these aren't used, but we consider
> > the top entry type is only 8 bits */
> >+static const u8 *smbios_raw_header;
There appears to be a mixture of u8 and unsigned char going on here, cf.
'smbios_header'.
While I'm pretty sure all architectures typedef them to be equivalent,
semantically, as a reviewer this makes me think there are type issues.
Is there any way to use one data type for the SMBIOS header?
> >@@ -669,6 +699,18 @@ static int __init dmi_sysfs_init(void)
> > goto err;
> > }
> >+ smbios_raw_header = dmi_get_smbios_entry_area(&size);
> >+ if (!smbios_raw_header) {
> >+ pr_debug("dmi-sysfs: SMBIOS raw data is not available.\n");
> >+ error = -ENODATA;
> >+ goto err;
Perhaps this should be -EINVAL? -ENODATA implies that if you try again
in the future data might be available, i.e. it's a temporary failure.
That's not the case here since the header is invalid.
--
Matt Fleming, Intel Open Source Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Matt Fleming <matt@codeblueprint.co.uk>
To: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org,
grant.likely@linaro.org, matt.fleming@intel.com,
linux-api@vger.kernel.org,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
dmidecode-devel@nongnu.org, leif.lindholm@linaro.org
Subject: Re: [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute
Date: Tue, 3 Feb 2015 10:49:53 +0000 [thread overview]
Message-ID: <20150203104953.GA6461@codeblueprint.co.uk> (raw)
In-Reply-To: <54C906A9.1050001@linaro.org>
On Wed, 28 Jan, at 05:56:25PM, Ivan Khoronzhuk wrote:
> >diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c
> >index e0f1cb3..61b6a38 100644
> >--- a/drivers/firmware/dmi-sysfs.c
> >+++ b/drivers/firmware/dmi-sysfs.c
> >@@ -29,6 +29,8 @@
> > #define MAX_ENTRY_TYPE 255 /* Most of these aren't used, but we consider
> > the top entry type is only 8 bits */
> >+static const u8 *smbios_raw_header;
There appears to be a mixture of u8 and unsigned char going on here, cf.
'smbios_header'.
While I'm pretty sure all architectures typedef them to be equivalent,
semantically, as a reviewer this makes me think there are type issues.
Is there any way to use one data type for the SMBIOS header?
> >@@ -669,6 +699,18 @@ static int __init dmi_sysfs_init(void)
> > goto err;
> > }
> >+ smbios_raw_header = dmi_get_smbios_entry_area(&size);
> >+ if (!smbios_raw_header) {
> >+ pr_debug("dmi-sysfs: SMBIOS raw data is not available.\n");
> >+ error = -ENODATA;
> >+ goto err;
Perhaps this should be -EINVAL? -ENODATA implies that if you try again
in the future data might be available, i.e. it's a temporary failure.
That's not the case here since the header is invalid.
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2015-02-03 10:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 12:39 [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute Ivan Khoronzhuk
2015-01-28 15:56 ` [dmidecode] " Ivan Khoronzhuk
2015-01-28 15:56 ` Ivan Khoronzhuk
[not found] ` <54C906A9.1050001-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-02-03 10:49 ` Matt Fleming [this message]
2015-02-03 10:49 ` Matt Fleming
2015-02-03 14:47 ` Ivan Khoronzhuk
2015-02-03 14:58 ` Mark Salter
2015-02-03 15:48 ` Ivan Khoronzhuk
2015-02-26 8:50 ` [dmidecode] " Jean Delvare
2015-02-26 9:41 ` Jean Delvare
2015-03-04 12:28 ` Ivan.khoronzhuk
2015-03-05 7:46 ` Jean Delvare
2015-03-07 20:53 ` Ivan.khoronzhuk
2015-03-08 11:31 ` Jean Delvare
2015-03-08 13:53 ` Ard Biesheuvel
2015-03-08 17:11 ` Jean Delvare
2015-03-08 17:38 ` Ard Biesheuvel
2015-03-08 18:21 ` Jean Delvare
2015-03-04 12:28 ` Ivan.khoronzhuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150203104953.GA6461@codeblueprint.co.uk \
--to=matt-mf/unelci9gs6ibeejttw/xrex20p6io@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=dmidecode-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ivan.khoronzhuk-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.