From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A582FFC9EC0 for ; Sat, 7 Mar 2026 03:44:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E12D310E012; Sat, 7 Mar 2026 03:44:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="AF24SIQN"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="ZhNmsshK"; dkim-atps=neutral Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 034B910E012 for ; Sat, 7 Mar 2026 03:44:18 +0000 (UTC) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4fSTfT2rDtz9tdp; Sat, 7 Mar 2026 04:44:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1772855057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P4Pgh4WefMLVX+2LXxiaugedxOTkXzJWSQIMEPmphhE=; b=AF24SIQNhTwwDjApGXpwDzhJOYm70/sSFUJP3gDTtMNhgyj8rMDOGhQeyQCOkxvRUSszG+ aBoZ9cZy2TNQRJXlAwXmtU4bDhqGloZOhZdpRnjPviVQ/6NwPApPboZVd/fO3ZmXxl1Slz BTMSvL4iAzKq2xF+PFC5znAVb3vtYqpZdSgsXaibBuPgxkWh0Ku61s9oDWEopGIU1TO/6R xqPVvog/Yt2jJjVtIP78n9WWDHYav1/P6vJWBuyHpdx7cE4d38DROWxdt4osx9X2JbCYOu w1TPv/KDF7yC/bwr18e2HNTMxgoIR+rhH2OrIR5kVYiMsdUlYgYtPJYLVl0z+Q== Authentication-Results: outgoing_mbo_mout; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=ZhNmsshK; spf=pass (outgoing_mbo_mout: domain of marek.vasut@mailbox.org designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=marek.vasut@mailbox.org Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1772855055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P4Pgh4WefMLVX+2LXxiaugedxOTkXzJWSQIMEPmphhE=; b=ZhNmsshKF4QM3HVBKLuqqKDQJcllNHMw96ogCrnDF0tmaBXhKVkH5H1WHK/WJxGpMKb0EF sDydn4C2GVbOhaRZgEvFWZ6/2Ukqe56MMVymDnRUAEYeK11zm19Xk3vh4JQ54j9jUIYNoh MpbGcGZ2hukMYl+Jc9ta5b1ZRDxJ9ktxY63ZQYzmewfkMIwO8G+PrrmXtA7q0JMMZvmyTZ SnwvgXG+ZgHAg8mhwP+8d5F6hdsetjnv6jKz8b2heegIH3DXuK6auKhp1lX+9dyijZCmhx WiqmSgPbWBfXcpwFy+VwHHiZfFTSWjvRuQus7Kx3ooFoLWWLNKfJSCvTe934Jw== Date: Sat, 7 Mar 2026 04:44:10 +0100 MIME-Version: 1.0 Subject: Re: [PATCH] drm/bridge: waveshare-dsi: Fix signedness bug To: Ethan Tidmore , Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Marek Vasut , Joseph Guo , kernel test robot References: <20260307033245.71666-1-ethantidmore06@gmail.com> Content-Language: en-US From: Marek Vasut In-Reply-To: <20260307033245.71666-1-ethantidmore06@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: 6207d88a42b8b91a028 X-MBO-RS-META: ff8ar6k6pyuepp3x53h1mn1yi7rtnwbu X-Rspamd-Queue-Id: 4fSTfT2rDtz9tdp X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/7/26 4:32 AM, Ethan Tidmore wrote: > The function drm_of_get_data_lanes_count_ep() returns negative error > codes and dsi->lanes is an unsigned integer, so the check (dsi->lanes < > 0) is always impossible. > > Make the return value of drm_of_get_data_lanes_count_ep() be assigned to > ret, check for error, and then assign dsi->lanes to ret. > > Detected by Smatch: > drivers/gpu/drm/bridge/waveshare-dsi.c:70 ws_bridge_attach_dsi() warn: > unsigned 'dsi->lanes' is never less than zero. I already sent: [PATCH] drm/bridge: waveshare-dsi: Use temporary signed variable for DSI lanes validation