[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a4a9acf-aa1d-dc73-b171-76654e1b9d47@redhat.com>
Date: Mon, 18 Sep 2023 15:41:22 +0200
From: Hans de Goede <hdegoede@...hat.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Fernando Eckhardt Valle <fevalle@....br>
Cc: Mark Pearson <mpearson-lenovo@...ebb.ca>, corbet@....net,
hmh@....eng.br, markgross@...nel.org, linux-doc@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
ibm-acpi-devel@...ts.sourceforge.net,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86: thinkpad_acpi: sysfs interface to auxmac
Hi,
On 9/15/23 18:18, Ilpo Järvinen wrote:
> On Fri, 15 Sep 2023, Fernando Eckhardt Valle wrote:
<snip>
>> + goto auxmacinvalid;
>> + }
>> +
>> + if (strncmp(obj->string.pointer + 0x8, "#", 1) != 0 ||
>> + strncmp(obj->string.pointer + 0x15, "#", 1) != 0) {
>
> Why use strncmp with (..., 1)? These offsets should defines above and not
> use literals.
Right, good point.
To be extra clear here, this should be replaced by != '#' statements, e.g.:
if (obj->string.pointer[AUXMAC_BEGIN_MARKER] != '#' ||
obj->string.pointer[AUXMAC_END_MARKER] != '#') {
...
Regards,
Hans
Powered by blists - more mailing lists