From nobody Fri Oct 3 08:49:07 2025 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 7329936809D for ; Wed, 3 Sep 2025 18:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756925624; cv=none; b=eg8pnF4IseIJqwXbUV97yuH2z8UINfLHZcvRxaI80Iorg9tTKUZoc9iAXu/geeztfTPHYv3Ch2AX9ht+VT7EnPfuxdaULlorGhXJrsW/M7m7tcAbJL+I8FKxWgny3G7SSUP9kdr7v42vb+m2IycL/p0Gzb2HGZVi3HwkesqDv0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756925624; c=relaxed/simple; bh=tb01GjZKeVYDMqeiQU+MbdxDJ+LoCTMzjQNhhcNJEgk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dQB5tUdPWUEG+lYwh/ccthUB9XhAyDZZ+jpEV1DhOksYmGdE1aVd2LIMBPDDehoa6C3pMI/94CvBqPdr0QBusolQzObqnnX7QynRvxLjYvYtJKB0c3u7yzIbXho7ssTqOrE+IvUl+ExnO93bMUl6PLDDO0yjmcemif03vGS51Ro= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc.com header.i=@rivosinc.com header.b=cCSDia/8; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc.com header.i=@rivosinc.com header.b="cCSDia/8" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-45b8b8d45b3so2448815e9.1 for ; Wed, 03 Sep 2025 11:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc.com; s=google; t=1756925620; x=1757530420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AquE8JHU3wpKOnx9hZ4dVcOYBLYMLbey8qkeKp2ZqhQ=; b=cCSDia/862o+r4MP6gHZ1kvpUMik4dc++H5ox7ra2ujjjSyMZECoPUp6AXcxwz0Dy2 FuATVK7TL8b5OKcGuNrER1+PYUx+H6mFgtaBnDQ2OSdTudPvFBkQGGR9ddLz8hIl0QPa y1judUKKgTsJa28VQyVnHD+UBiA9giwQpCOQqKWaihNBO4fdJlnadWuDf0XSKMH8pWe/ cXL3fFonPEo6w+bAbGoCtTNl/neCA9COFp5/T4N/5CbdYoDrDGwiXGqSjqYXl6mRY3HB +PEPvAvH6ju8G3IqEqCsZ+0C16Gjo0QZk1902p7HF6nyKR4VBRDZlRg9AWbnT3B4B2GS I8og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756925620; x=1757530420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AquE8JHU3wpKOnx9hZ4dVcOYBLYMLbey8qkeKp2ZqhQ=; b=CWDnp4vA+mxlioKeff4cG4hj4mq9t9Jzz1/vF1LQDUi6W5bROjvGlJIon4KZvFcFtb 0CidAwXdI5WE9mdZiWB6t/4f6DmA3UR0r6g3XawiPBQGhA1flXrtrePP2ZZj38/cvDw6 TjpaqeTpd7ls4ygqmuNRem3bj2pUfb9Q+XQ09gFTkKu64HqlSoLVRggZTbrS17ZflrbP 0psKlMKqKS/V+cbZnNjrC9WiQTvjSl6tZAdPPCRW6WrVflmqNu/GRzPJebt3OR1Sv/LP GBqygQ4qVBgAuEy/CazJvGXX+eACwAvKZLRRNeg7IaVrwEHH0ebJNzGu049NM8JaAxjg IZZQ== X-Forwarded-Encrypted: i=1; AJvYcCXjGPEwwCHnbv6zGWZ6FzExMAwREO3SacLkqCPKTBNUYaJ/dflovp0zQ8oLeW+xUjZOVW6jzJaLLnXPnUM=@vger.kernel.org X-Gm-Message-State: AOJu0YyLfdhATo1k8CerOwEJhmxnuimHIt6KUxPVSyoogTd6GAuo21Fd 3L6w/UPhhPdyfNyjUPFzocYaRTJW1JVpZEHcIbQLurieWk2RKvyzBSou7NYD/h34I5g= X-Gm-Gg: ASbGncuVemYPoZb1fOlUnoH9GC/aXMBVsIuY/hiUxO+GWbjy5STrZIA+Zjvv1QQ2YDq HlKnscGfQgCfBVKdf8IJ75MkYNa9KnGY3SDSe9EZtFcBTQ5XLVtZB/alliLLoNs+te+rKP3nP9e rTF3tvTFO0fh97G8rIM0WVkKrDVejZ4DOsIzwPhPjHckYlJmym+uVTPRf0MlaKw7eA+1ZhA+dBa Lr1R1iGP141yTr61hwQvmQU+QTVl8rhNl6Lc5+Nx42zWhlOvM8gTXAAqfLnotoNWWfw5SZ18W42 K6QCLK4FwLvewy5l5zuh95nRt/5mLhmzG8W2zDgY4U79KDZT5MMuWQO1rfxmYFgVsioyoGnFzaO 11jFTDsfyXcagcCJssb6dNAXT36Y152YPlJY8+rM5JamOaJkVu7t6cV8VxvoWQ6HL8iHosCWaJb a+v4S/ X-Google-Smtp-Source: AGHT+IERl6smvjSqMpuCaH/LYojC/JM0ih8kKGx0MImSuDXXr6hrLMvQiHu6Ro0U1pMEYuo7OfIbrQ== X-Received: by 2002:a05:600c:4f8f:b0:456:f1e:205c with SMTP id 5b1f17b1804b1-45b85550704mr136866395e9.4.1756925620576; Wed, 03 Sep 2025 11:53:40 -0700 (PDT) Received: from alexghiti.eu.rivosinc.com (alexghiti.eu.rivosinc.com. [141.95.202.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d690f2edf1sm13920647f8f.16.2025.09.03.11.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Sep 2025 11:53:40 -0700 (PDT) From: Alexandre Ghiti Date: Wed, 03 Sep 2025 18:53:08 +0000 Subject: [PATCH 1/2] riscv: Fix sparse warning in __get_user_error() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250903-dev-alex-sparse_warnings_v1-v1-1-7e6350beb700@rivosinc.com> References: <20250903-dev-alex-sparse_warnings_v1-v1-0-7e6350beb700@rivosinc.com> In-Reply-To: <20250903-dev-alex-sparse_warnings_v1-v1-0-7e6350beb700@rivosinc.com> To: kernel test robot , Al Viro , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Cyril Bur , Jisheng Zhang Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Ghiti , stable@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1106; i=alexghiti@rivosinc.com; h=from:subject:message-id; bh=tb01GjZKeVYDMqeiQU+MbdxDJ+LoCTMzjQNhhcNJEgk=; b=owGbwMvMwCGWYr9pz6TW912Mp9WSGDJ29G3SnJAmn34r1vLZRsOeyyGHZpo9PH76uxIva6PxS 96P+1d7dJSyMIhxMMiKKbIomCd0tdifrZ/959J7mDmsTCBDGLg4BWAibocZ/kcbd8yp174kdHxF 6sf3i4o/3NqR2Hv9xkQ9ebk5od7bdN0Y/gd3lPq5tRpbKH/3+XHc/Xu55pram/3feFas3LDyk63 JcX4A X-Developer-Key: i=alexghiti@rivosinc.com; a=openpgp; fpr=DC049C97114ED82152FE79A783E4BA75438E93E3 We used to assign 0 to x without an appropriate cast which results in sparse complaining when x is a pointer: >> block/ioctl.c:72:39: sparse: sparse: Using plain integer as NULL pointer So fix this by casting 0 to the correct type of x. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202508062321.gHv4kvuY-lkp@int= el.com/ Fixes: f6bff7827a48 ("riscv: uaccess: use 'asm_goto_output' for get_user()") Cc: stable@vger.kernel.org Signed-off-by: Alexandre Ghiti Reviewed-by: Cl=C3=A9ment L=C3=A9ger Reviewed-by: Cyril Bur --- arch/riscv/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uacc= ess.h index 22e3f52a763d1c0350e8185225e4c99aac3fc549..551e7490737effb2c238e6a4db5= 0293ece7c9df9 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -209,7 +209,7 @@ do { \ err =3D 0; \ break; \ __gu_failed: \ - x =3D 0; \ + x =3D (__typeof__(x))0; \ err =3D -EFAULT; \ } while (0) =20 --=20 2.34.1