From nobody Fri Dec 19 19:09:48 2025 Received: from gauss.telenet-ops.be (gauss.telenet-ops.be [195.130.132.49]) (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 CB36D14F9FD for ; Wed, 8 Jan 2025 17:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736356939; cv=none; b=ZgK4kQslsPNcXyVyDUyjYGzsyBVI7fL2uDRruYOsBhDjpoYli2T2MSKUo+w9lDX2ADwM2HppcDcGh2b7fWsDsuHjZqHuFv4mDlDqDLpxiETQBrj5O3yK6DRraPT2iZWIPUtVtf8jAA3Iv5LTYfhLpNQHJ4lzWiHtE0Oc+Y99xxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736356939; c=relaxed/simple; bh=ZPp8uUNauXJUjWAZygZIv/4grCqKvflFKgL30dDkoZs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uUuKbr1Fv6PbOp4marys3Nu2UYCachKq3/kKkMsyJE7oncwwX5UpYkpnr+MP5f/DHFK14NUDlM8jeJYIS4me+LY7ernlWZwgjdniEpADSiSy5g50Iqaolh9LqcPAkoDRbocZNI4Yrwx6SjJmGfDo7PslGdaR5cjSZ7zk3GmkCBw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by gauss.telenet-ops.be (Postfix) with ESMTPS id 4YSvqP37xJz4xcYg for ; Wed, 08 Jan 2025 18:22:09 +0100 (CET) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:36eb:83e8:32a9:43e2]) by michel.telenet-ops.be with cmsmtp id yhN12D00A4LMxBm06hN1lk; Wed, 08 Jan 2025 18:22:01 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.97) (envelope-from ) id 1tVZkj-00000009McN-1gOk; Wed, 08 Jan 2025 18:22:01 +0100 Received: from geert by rox.of.borg with local (Exim 4.97) (envelope-from ) id 1tVZkm-00000009yHU-3nDE; Wed, 08 Jan 2025 18:22:00 +0100 From: Geert Uytterhoeven To: Greg Ungerer Cc: Arnd Bergmann , Linus Torvalds , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , kernel test robot Subject: [PATCH] m68k: libgcc: Fix lvalue abuse in umul_ppmm() Date: Wed, 8 Jan 2025 18:22:00 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 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" lib/muldi3.c:53:28: warning: asm output is not an lvalue lib/muldi3.c:53:28: warning: asm output is not an lvalue lib/muldi3.c:53:28: error: not addressable lib/muldi3.c:53:28: warning: generating address of non-lvalue (11) lib/muldi3.c:53:28: warning: generating address of non-lvalue (11) Fix the lvalue warnings by replacing the casts on the output operands by intermediate variables of the right type. Fix the "not addressable" error by replacing the cast on the second input operand by an intermediate variable, too. Treat the other input operand the same for consistency. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501030516.uZrwnuQQ-lkp@int= el.com/ Suggested-by: Linus Torvalds Signed-off-by: Geert Uytterhoeven Acked-by: Greg Ungerer --- To be queued in the m68k for-v6.14 branch. Not folding into commit e96424b86d5098f4 ("m68k: Use kernel's generic muldi3 libgcc function"), as the issue was pre-existing. --- arch/m68k/include/asm/libgcc.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/m68k/include/asm/libgcc.h b/arch/m68k/include/asm/libgcc.h index 1cce6d130d805368..27e17195bd7be41c 100644 --- a/arch/m68k/include/asm/libgcc.h +++ b/arch/m68k/include/asm/libgcc.h @@ -10,11 +10,18 @@ * will fallback to using the C-coded version of umul_ppmm(). */ #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("mulu%.l %3,%1:%0" \ - : "=3Dd" ((unsigned long)(w0)), \ - "=3Dd" ((unsigned long)(w1)) \ - : "%0" ((unsigned long)(u)), \ - "dmi" ((unsigned long)(v))) + do { \ + unsigned long __u =3D (u), __v =3D (v); \ + unsigned long __w0, __w1; \ + \ + __asm__ ("mulu%.l %3,%1:%0" \ + : "=3Dd" (__w0), \ + "=3Dd" (__w1) \ + : "%0" (__u), \ + "dmi" (__v)); \ + \ + (w0) =3D __w0; (w1) =3D __w1; \ + } while (0) #endif /* !CONFIG_CPU_HAS_NO_MULDIV64 */ =20 #endif /* __ASM_M68K_LIBGCC_H */ --=20 2.43.0