From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 987CB26E6E6 for ; Fri, 14 Nov 2025 08:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763108997; cv=none; b=uAA96/wzvLa1/yfewaKywx93OiynoPjaeMHPHrbsJsP72UdeeWrIA1tPH5EmbQ6DiFxEyjDmzqM3Ae5qJfkZpRVuOb0jNei60u92b/RTsiNwrgmzllGAALEp0Drhq/LJUxURy+zGOuuDZqOvGvRXm27duvtuGNzRfgMlWGVmWxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763108997; c=relaxed/simple; bh=UMYYNNpZ5GR5sG0zLLPnTA5aiyC6fn01mRMVDGvSnmE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=orkdNhFOTbL5kUuXIZn7iLEnhtSk+D6HVL48OFvS1bA9I48bZJ4aAXaoPLO5Nn9nIehFfqd2I0XSSDvqITj0WC++0V1nDXlXgM8T9pHweEB+BSeS6X0IsNwKngla+7gGPjAbtulr4gFtbICFD6oO/kaBMkL6vwCu304O1dso7aY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sDtifvHi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sDtifvHi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54210C4CEF8; Fri, 14 Nov 2025 08:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763108997; bh=UMYYNNpZ5GR5sG0zLLPnTA5aiyC6fn01mRMVDGvSnmE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sDtifvHijRGM0EyOPu1rUe8yBQtBPa1jZ74qwhW5jEU7vIPFGtOR/TQ9qbrfCIK25 PY+uIAbZOtl1C67PN2tiSUax8+3tovE0zPQO/vKsKkjHz1WvndXq2NRIHxGKbXrtGG PTGSa2PV6iJhVbxXY6AJaA60k3sIvHvhS1QvUHxILWqQ/rF1EQhDqreitAiRUcQ1nz OsOEzmF5mxSo44xJcAJ6M83suR+Y8Cuf2el+aPa+ZMtoyn2YSy2b2KBx5+KAIhKLOj bhiEvPMWbfTauZ+6yRLEsEXV9FZofqYtSm06182j/dNqc4+wy5490+XUaiBQ1BkUJF jxhDr7KTxZWZA== Message-ID: <38276135-44cb-4b27-b711-7d012e2908a8@kernel.org> Date: Fri, 14 Nov 2025 09:29:47 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gpu/drm/nouveau: fix return type in nouveau_dmem_migrate_to_ram() To: Balbir Singh , linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org Cc: kernel test robot , Andrew Morton , Zi Yan , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Oscar Salvador , Lorenzo Stoakes , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lyude Paul , Danilo Krummrich , David Airlie , Simona Vetter , Ralph Campbell , =?UTF-8?Q?Mika_Penttil=C3=A4?= , Matthew Brost , Francois Dugast References: <20251114012221.2634832-1-balbirs@nvidia.com> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: <20251114012221.2634832-1-balbirs@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 14.11.25 02:22, Balbir Singh wrote: > ret of type vm_fault_t is reused to capture the return value of > nouveau_dmem_copy_folio(), which returns an int. Use a new variable > err to fix the issue. The issue is not new, prior to this the function > called was called nouveau_dmem_copy_one() and ret was used to capture > it's value. > > The bug does not cause a real issue at runtime, the value is used > as a boolean to check if nouveau_dmem_copy_folio() succeeded or failed. > The different types should not impact the execution of the code at > runtime. Again, spell out that it is a sparse warning one way or the other and ideally paste the relevant part here, Also, take a look at the definition of "bug", like at wikipedia "In engineering, a bug is a design defect in an engineered system—such as software, computer hardware, electronics, circuitry or machinery—that causes an undesired result." Talking about a bug when nothing is broken can be really misleading to people that watch out for CVEs etc. -- Cheers David