public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Bob Moore <robert.moore@intel.com>,
	Saket Dumbre <saket.dumbre@intel.com>
Subject: [PATCH v1 7/8] ACPICA: Fix warnings from PR #295 merge
Date: Wed, 26 Mar 2025 21:10:39 +0100	[thread overview]
Message-ID: <2304653.iZASKD2KPV@rjwysocki.net> (raw)
In-Reply-To: <5873907.DvuYhMxLoT@rjwysocki.net>

From: Saket Dumbre <saket.dumbre@intel.com>

Possible loss of data from u32 to u8 conversions.

ACPICA commit 1d7a0aa04793ff731da13f2070877ec7a9498571

Link: https://github.com/acpica/acpica/commit/1d7a0aa0
Signed-off-by: Saket Dumbre <saket.dumbre@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/acpica/dsutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 2bdae8a25e08..baf6a1f27605 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -723,11 +723,11 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
 	 * pop everything off of the operand stack and delete those
 	 * objects
 	 */
-	walk_state->num_operands = i;
+	walk_state->num_operands = (u8)(i);
 	acpi_ds_obj_stack_pop_and_delete(new_num_operands, walk_state);
 
 	/* Restore operand count */
-	walk_state->num_operands = prev_num_operands;
+	walk_state->num_operands = (u8)(prev_num_operands);
 
 	ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
 	return_ACPI_STATUS(status);
-- 
2.43.0





  parent reply	other threads:[~2025-03-26 21:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 20:04 [PATCH v1 0/8] ACPICA: ACPICA 20241212 Rafael J. Wysocki
2025-03-26 20:05 ` [PATCH v1 1/8] ACPICA: fix acpi operand cache leak in dswstate.c Rafael J. Wysocki
2025-03-26 20:06 ` [PATCH v1 2/8] ACPICA: fix acpi parse and parseext cache leaks Rafael J. Wysocki
2025-03-26 20:07 ` [PATCH v1 3/8] ACPICA: New release 20240927 Rafael J. Wysocki
2025-03-26 20:07 ` [PATCH v1 4/8] ACPICA: actbl1: Update values to hex to follow ACPI specs Rafael J. Wysocki
2025-03-26 20:08 ` [PATCH v1 5/8] ACPICA: actbl1: Add EINJv2 get error type action Rafael J. Wysocki
2025-03-26 20:09 ` [PATCH v1 6/8] ACPICA: Fix typo in comments for SRAT structures Rafael J. Wysocki
2025-03-26 20:10 ` Rafael J. Wysocki [this message]
2025-03-26 20:11 ` [PATCH v1 8/8] ACPICA: Logfile: Changes for version 20241212 Rafael J. Wysocki

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=2304653.iZASKD2KPV@rjwysocki.net \
    --to=rjw@rjwysocki.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.moore@intel.com \
    --cc=saket.dumbre@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox