From nobody Sun Jun 14 14:28:49 2026 Received: from mail-yx1-f51.google.com (mail-yx1-f51.google.com [74.125.224.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9608B1DF980 for ; Fri, 3 Apr 2026 07:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775200175; cv=none; b=mm7ctzQY9Veh2CWJbb6JCb52R36sNycEx71AyzmnZFcpDnerDjjmXEsdlJN605YABK3jY+cFgQJrTfRt+7yO56G60iUOZ5dLDZhJq/OT3ZlgZX4M0P+pPmopAySzJ6Olg0AS44DvxwKcuZFahuCOZtAMruxYoTVFKTdnzErNjMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775200175; c=relaxed/simple; bh=Morcopt2lGB0ZpVtL8FAdELel3jz9tKgQ0+/EqZDV64=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pZpZ/8yMskPayafIV8TSIXKO6mF4lV6aX+Ic27Uw/HKC0HtncN4JC8gi+ZIOgNFEsZ9/tXUZSNG3/5HBgcV0mJcDUXE7YHG3RS6wYw4JFJ2dJm21CrWUFZ6sRV3ORPCVF9J9ePOEjredMzgLpShy0ojSRMzLUZBpPdfuX+Ix7R4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Mvt6Sv0g; arc=none smtp.client-ip=74.125.224.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mvt6Sv0g" Received: by mail-yx1-f51.google.com with SMTP id 956f58d0204a3-64ee82e853cso1253538d50.3 for ; Fri, 03 Apr 2026 00:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775200174; x=1775804974; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=czTHxpPx48e5trNDy9Haci3gHx5owBw1LqTAi7hI1ps=; b=Mvt6Sv0gW7pfWm3Lka5QwSTN1cs24Iax6va6WIT6Bs9hA3rKnM2GUVbHMil3/rKWBd 9Hg1Y2IejeVJZee9dbWKeiZp/fqxl3RM9rSFZdr0C1iG6DhATMGBtO/SCcdDYLQfbej/ 1aiAF27WmvelqYIRIie1//vxXQqwAPkCHyW6XHI4cg76JupVU3RHHO+0yZxWzNZMXAZu CbHRMx87xdyQqa81KiP0Q7qF0uAgAJOZc9sk6LsWlzn3m39wikhVPYgyUnRnfwFLzkBh s5vswF3+4dYVV5fUYa4hAFopF62PAt69urxH2XC0pipzZ5/qeDELRMs2wZzGEXIxIGho CevA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775200174; x=1775804974; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=czTHxpPx48e5trNDy9Haci3gHx5owBw1LqTAi7hI1ps=; b=onoqplfErZ4J930+nWRRV6XHxs/62VxR9B3ZG8FFNc1/jxLw7gsvtNiCSWTLGyCnJk VcpxKg5SvValVHSWsgXRJchYN1qFfgnC8uLv1qfWVNeU08qVhX0McMdVROm6xvfgCMos Ny4wNC58jQSbVKeSjHKu5JEG1rAIZv3hdo2Aj2UVF+OcRXw8UZxahYckr09hODnY2Kmx cTP5hxil82parNRcu76MnH76TximLBXpnpZ2yDNwxZ1/2VNaLJEml++1k93jMae+I4Qt J0XCp6YIm1txsyJBnLLm+BiEGbftGuzcAnBSJd2URKccjs/fI19gZCp/+q+YVzL79GJR VUPw== X-Forwarded-Encrypted: i=1; AJvYcCV3NDrw+EypWHayQSAH7edie7K7GZ1y45wpGDy/fiwvnt2Co8pPgtS9/3pI028M2UZxdu2kuIrWOWnwuFw=@vger.kernel.org X-Gm-Message-State: AOJu0YyxW1NimOUe55o+YbmMtiAncDaa/zDewg3h2jlfde68vkGR4HA9 QFw+d/tkmzEueodUV1xe+oPbygJEPqXBS8Zq/DzbjrRu/2CVvvoj/KU7 X-Gm-Gg: AeBDiesHlaqRjYFFQZDVroUhWdoPW/8gVob+ClRitu66Yn3FXVWxdzAqAethOuW262m 9gVBmXSYtieY9xOrVNofD3tvVaaey8FPliX7Fwb+PLHZYTjNtJYaZdSWhihvY2Y5eqts6JUgG10 AjMvRMBrPg18GxjFGTGOrx8uTuCOZtL9Od8TwZMFMITrf8olzL5Mz7nIs+D3lJllq5Fb5YuNIIb lUrOVyNny0mZ40RZuaixyuz9pU08Q1gNOzFFU2fhFm50gHVEYRuMWEM5fAJimAahGVjrcTzIDxm 4lZ9r3KCIQOG+Z/UURbpD9Kd0D5WkFG7lQqXWdox/rO2nZ3xvSxHLhgxxPRmemOtw4c1bk2owdN +MtmGqVg5yQk4A5ZgarEXiCQ0TKOyYa5ApDaQeVlPjOGYzyUE5VxLx8K/OjhxBw3GbU4IhI/sF6 LsIYDWi65ButbuD5ffIkVDmPQeZMVyiXpu0KOeZdTAdLMiZKXpeoghTnjln00IzBlMCgw6/jtU3 hAsg8u0owIEAdMU1WkkWrQb X-Received: by 2002:a05:690c:a052:b0:79b:f866:e208 with SMTP id 00721157ae682-7a4d90a2e29mr18612167b3.43.1775200173567; Fri, 03 Apr 2026 00:09:33 -0700 (PDT) Received: from tux ([2601:7c0:c37e:2360::17e2]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7a3712ecc31sm19049057b3.45.2026.04.03.00.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2026 00:09:33 -0700 (PDT) From: Ethan Tidmore To: W_Armin@gmx.de, hansg@kernel.org, ilpo.jarvinen@linux.intel.com Cc: wse@tuxedocomputers.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Ethan Tidmore Subject: [PATCH] platform/x86: uniwill-laptop: Fix signedness bug Date: Fri, 3 Apr 2026 02:09:28 -0500 Message-ID: <20260403070928.802196-1-ethantidmore06@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The function sysfs_match_string() can return negative error codes and the variable assigned to it is the enum 'option'. Which could be an unsigned int due to different compiler implementations. Assign signed variable 'ret' to sysfs_match_string(), check for error, then assign ret to option. Detected by Smatch: drivers/platform/x86/uniwill/uniwill-acpi.c:919 usb_c_power_priority_store() warn: unsigned 'option' is never less than zero. Fixes: 03ae0a0d0973b ("platform/x86: uniwill-laptop: Implement USB-C power = priority setting") Signed-off-by: Ethan Tidmore --- drivers/platform/x86/uniwill/uniwill-acpi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform= /x86/uniwill/uniwill-acpi.c index faade4cf08be..945df5092637 100644 --- a/drivers/platform/x86/uniwill/uniwill-acpi.c +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c @@ -915,10 +915,11 @@ static ssize_t usb_c_power_priority_store(struct devi= ce *dev, unsigned int value; int ret; =20 - option =3D sysfs_match_string(usb_c_power_priority_text, buf); - if (option < 0) - return option; + ret =3D sysfs_match_string(usb_c_power_priority_text, buf); + if (ret < 0) + return ret; =20 + option =3D ret; value =3D usb_c_power_priority_value[option]; =20 guard(mutex)(&data->usb_c_power_priority_lock); --=20 2.53.0