All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com,
	andriy.shevchenko@linux.intel.com,
	stanislaw.gruszka@linux.intel.com, linux-acpi@vger.kernel.org,
	acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ACPI: bus: allow _UID matching for integer zero
Date: Wed, 10 Apr 2024 10:49:17 +0300	[thread overview]
Message-ID: <20240410074917.GX112498@black.fi.intel.com> (raw)
In-Reply-To: <20240328035540.13194-1-raag.jadav@intel.com>

On Thu, Mar 28, 2024 at 09:25:40AM +0530, Raag Jadav wrote:
> Commit b2b32a173881 ("ACPI: bus: update acpi_dev_hid_uid_match() to
> support multiple types") added _UID matching support for both integer
> and string types, which satisfies NULL @uid2 argument for string types
> using inversion, but this logic prevents _UID comparision in case the
                                                ^^^^^^^^^^^

Typo: comparison

> argument is integer 0, which may result in false positives.
> 
> Fix this using _Generic(), which will allow NULL @uid2 argument for
> string types as well as _UID matching for all possible integer values.
> 
> Fixes: b2b32a173881 ("ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types")
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

      parent reply	other threads:[~2024-04-10  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  3:55 [PATCH v1] ACPI: bus: allow _UID matching for integer zero Raag Jadav
2024-04-10  6:00 ` Raag Jadav
2024-04-10 13:31   ` Rafael J. Wysocki
2024-04-10  7:49 ` Mika Westerberg [this message]

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=20240410074917.GX112498@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raag.jadav@intel.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=stanislaw.gruszka@linux.intel.com \
    /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.