From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 85D9B378D7E for ; Fri, 6 Feb 2026 13:39:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770385175; cv=none; b=RPdaHTQZTwNjO7tP1ZUU93OiAHaBQgrGEHfvU8sx+naR3wH18U4jeaOidF66qVWc79+WOkBQJDLYre0eVIfV8OUZ50VxpPUd2cMohGKUdP7v+1U+u8nJ9ONysWCF7s40R/a6/Z+ZLie9Qw5SAGRRE7JGeaZEECnRO/Dh4F/hb4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770385175; c=relaxed/simple; bh=jZWThHDftYwNm+YhUzjnOxGikrrWPbfxCiYzriFQ9dQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=ZQ84aD80jPcnnTU8ljj2smP2JS9bCvy+znFQztspNcbJSqJGCRsgEnD/6m4crv+c0W70TsmtH/DiaTo3jXM7eKUGBM7R1Bmmexadl4iLVJ/8ynGfEb/O+7Mm0Wf1/4PoZDDK8+GnVlk4zmsQBA2PFvmp4Iu/vTocBJnIbT5UMsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bWouwc0n; arc=none smtp.client-ip=209.85.221.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bWouwc0n" Received: by mail-wr1-f65.google.com with SMTP id ffacd0b85a97d-4362c635319so478346f8f.2 for ; Fri, 06 Feb 2026 05:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770385174; x=1770989974; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=f2Y5EKTAj1q05PpGAjFSHOf5Y6g6+lSOxl9Mg+wxTgo=; b=bWouwc0nJbxVZJvJjuTFjKSz/FrUAnVToxFvQahI14iL88Le/iwrpUzVVv+ldPitn7 JHCZzL3MykkhBDy5ST3/155mfL4hVl7xlXAWcf744Ei5KO8YIbn0A9wq1Uzi/isjkBI9 ZY3fYFFEWmC1z+JtHPneO8V8pWo3gZgOmIUe/buM+mPWKbYpxcoEAI2u1NwsmUrE1bOA 3NrAe6yo+YbyogA9dhOlweqhK+A1PPLhpQitOjkZXGht8BmRjQbwZdqqAFDs27t47SIa s0Y5iHHKkb04+j5eQseIrkxyhEQoMdGXdCdwJSDhvLBrcXcgAFpk3h4jymtCRfsvhd4p Odpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770385174; x=1770989974; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f2Y5EKTAj1q05PpGAjFSHOf5Y6g6+lSOxl9Mg+wxTgo=; b=Gr7iLthya3FIv4FQjYZlDxqpWEodJ6t9Dba4nafygtZRoWnreUCsBuPxoVM6aVQ+45 NHK5UMNH4lRI+A5BBQsnqV8Vuv3CwD9AUzbw+FnoigHXyhLXm3CM7B83MQoJB2szcqF1 4R0xFTGSTVKCtBLbQ0iyoZHC9DI2RWsy7XwRt8sjoFZ8rEsNb9Iw5E447staY8ZVpQj+ a4JskQANzXjj/M0b+kN18NytZGe+gh7A5KQVFsNy++84sE8bTmokvnM3SDkV++OwamQ9 B7mc2U1marOVypsNAYQoK1FRn9enQN8yDlH2G6zHAt1Z3G0dlMLbW1oWLHVzui2/YUAX do7A== X-Forwarded-Encrypted: i=1; AJvYcCUFZF3LYTrOTRZF86SdU4sl4TO/AGd28Dw+6GVFrH+c2VP+3uSxkqTFzp52fqO9cFVNImEIELJbimpRnb0=@vger.kernel.org X-Gm-Message-State: AOJu0YzP3Xd0lfBM2743p8ya5diBjWi7LlBfK3BhWlB3M1VQBvwVJzMc Rkx1RytiX7xdZMZN0YEqidFawsv3mEhU74gzpAdkDuA0200WZwkTXC8wGIVbo1k5kobBRKVznpf IHk7w X-Gm-Gg: AZuq6aJfC9vjwVElHRa5nwRsB6K0gqPxK9fQqREohfVYXH5MqIuuDfkSxr8//u5VsGm vdcqnYBxKq+u1c5Ci23G1dvSIDHqUEm6jt9HIMsY4DxhZDK+uYMtjHmU+zP5MsHnt6YC3PBaAyF RPnDsFUKJPeeKoqOgbe+x6kGDzX2psY4Q66fR8V3UwLGHuS3uy7Xm1zg0gnrjgh8vbHyDxGUwHR ndhJet/fisnlTMrIo80JnUAAZWvx3cve7B5pA4TPPWLkcEc3350llwmUCakDx+WGuBNHIKhqfux /NkedosZpwrcAhJJTzHpIu1lhV1/zNZeoiXnOi3rb4M1+IcUwbRNQMewMcNgSH8+Y2PT5vHFPeu KThDdd8RwaR72wqmDy6qfI7O1h1i98eAsmuXTK+83cKbwB+9+3h+Tu5DodqYI6XrzKZGiU9rODW 0Yct8wLwS0SDWBCoQn X-Received: by 2002:a05:6000:22c3:b0:436:1a2e:2c50 with SMTP id ffacd0b85a97d-436290463f5mr4978309f8f.12.1770385173659; Fri, 06 Feb 2026 05:39:33 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-436296b2110sm5804912f8f.3.2026.02.06.05.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 05:39:33 -0800 (PST) Date: Fri, 6 Feb 2026 16:39:30 +0300 From: Dan Carpenter To: Alexandru Dadu Cc: dri-devel@lists.freedesktop.org, linux-kernel Subject: [bug report] drm/imagination: Add gpuid module parameter Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: [ Smatch checking is paused while we raise funding. #SadFace https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ] Hello Alexandru Dadu, Commit 3bf74137340a ("drm/imagination: Add gpuid module parameter") from Jan 13, 2026 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/imagination/pvr_device.c:485 pvr_gpuid_decode_string() warn: error code type promoted to positive: 'ret' drivers/gpu/drm/imagination/pvr_device.c 475 int ret, idx = 0; 476 u16 user_bvnc_u16[4]; 477 u8 dot_cnt = 0; 478 479 ret = strscpy(str_cpy, param_bvnc); 480 481 /* 482 * strscpy() should return at least a size 7 for the input to be valid. 483 * Returns -E2BIG for the case when the string is empty or too long. 484 */ --> 485 if (ret < PVR_GPUID_STRING_MIN_LENGTH) { PVR_GPUID_STRING_MIN_LENGTH is unsigned so -E2BIG is type promoted to positive and treated as success. 486 drm_info(drm_dev, 487 "Invalid size of the input GPU ID (BVNC): %s", 488 str_cpy); 489 return -EINVAL; 490 } 491 492 while (*param_bvnc) { 493 if (*param_bvnc == '.') 494 dot_cnt++; 495 param_bvnc++; 496 } regards, dan carpenter