From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AC33396B84 for ; Mon, 9 Mar 2026 11:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773054626; cv=none; b=Qh5xN7rVUv/o/doouYS/wDiqEV7P/+kFZzGeSAwE/xNFn/Rup19cl1Qo+1W6aGx+Rr0LPIt8sckc6Upq0nOq7kTsVIPCQ5Vome7aM2S0qeG1oIC3AxB2eHPNL+sIofwGqWsqSNNHC3sFwVvSaSX0qvs1P0/rpF3QICMH6emA0Qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773054626; c=relaxed/simple; bh=TrKQPfGYeqc6HtQCkvA++9/t50hIZTaufjLG8wxU3Ls=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=OoEMEVvVUKxGvrFRCWumRBj6s85kVuSzAOPlYuZ7uo4aJ0ItHeK9V72qoo9vw6C519unHpdCSP6gGqET9YbEzdjsJys/1I0f9OSfDHWbM2f06cUbyq+QxVM98s6Oatn2/mJku+WO1qbQZRHiXLZ030HrLon2GQGjBnrCXamOfuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=eMwZe4J+; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="eMwZe4J+" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id E4C12C42870; Mon, 9 Mar 2026 11:10:42 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 6C1C55FFB8; Mon, 9 Mar 2026 11:10:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 810EE10369AA7; Mon, 9 Mar 2026 12:10:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1773054621; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=TrKQPfGYeqc6HtQCkvA++9/t50hIZTaufjLG8wxU3Ls=; b=eMwZe4J+GEN+wKwZQuOh02iwA+TN0CxdA77zWChzsDbo2bsmJ4V01R2/qaX3O7xVT6Tl2p hltGyPIjB2eNlZyU1T2Hz9Xc206R/M1JarAN7cM+Rw6xTrXhsE5F91Oc5V5kOSSl8Ryo9M EaQ7BY3vz951xfvSflLAcARZBCWsVsy/pbRB8CYexEt9nRRtjzu9guWJ7qoBAd2KuC8UkP bouPkDDHErlC9Kr05yboTFFCJiyWnzdtgVin03SqP0QmZTIYJESywlh8DvAo4IX9/r1jAH wN/GGMosOfh2UZlSL0IdsT7/2NTYJIYRRpLkLqEC+dr/ic62T7XJmnSzZ7lrRw== 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 Date: Mon, 09 Mar 2026 12:10:14 +0100 Message-Id: Subject: Re: [PATCH] drm/bridge: waveshare-dsi: Fix signedness bug Cc: "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Marek Vasut" , "Joseph Guo" , "kernel test robot" To: "Ethan Tidmore" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , , From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260307033245.71666-1-ethantidmore06@gmail.com> In-Reply-To: <20260307033245.71666-1-ethantidmore06@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 On Sat Mar 7, 2026 at 4:32 AM CET, 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. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202603060341.hNj0pl9L-lkp@i= ntel.com/ > Fixes: fca11428425e9 ("drm/bridge: waveshare-dsi: Add support for 1..4 DS= I data lanes") > Signed-off-by: Ethan Tidmore Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com