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 A22392E3385; Tue, 8 Jul 2025 16:44:36 +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=1751993076; cv=none; b=g8h8RTu+UwQwYj8VDagpsNRZIPCqG+tJ/oEwL1CLgNtps4dGRYnsuKb+SN0kn3ZfRcTcu0FSCrbOWejXnPzHAEzlW0STcoP8EucjfVT/CUejAsBKnkyMrSjmvwGVsfhSm8Gz5Rd2Va+8zw8ES83NJd3nzlP/5fASV7F3Vl4Bqds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751993076; c=relaxed/simple; bh=lR36Ve0JjmqeX+/q8e7xwhMe5qTcl9iKIZaLzjON1Xs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A4KrCPWFl3uH6EJYpdqfW0/1ojVqVzDvM1jv6rmibY93FIq3ITdQhEUzRCaNKhMRZDO/4pOrqxC7bAmj/Qy4aUF3Ib1rSGYG6+R7NRgkoaYR5l1s0z5fxOru6sIkPFnvUDsvBZI2ktHDV2zwUiP9eUUpvnIwAAtajmqv7dWDZWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hiiHvL14; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hiiHvL14" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A83CC4CEED; Tue, 8 Jul 2025 16:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751993076; bh=lR36Ve0JjmqeX+/q8e7xwhMe5qTcl9iKIZaLzjON1Xs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hiiHvL146E+AjPCQyqDW+cIzl+wIuFo9oo/iVdcbOWHEXHuOstyBA8AeYuAuNwrWv GCj54nMEjLnaRRpEcie1oiW2ZutUtgAtExIq4jxSorVhUZujUCJipVGExvRkNpZNqq 55k7rZHjYmiqkm6ZRDsYumb7Asl+WwNT8LElJh+w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tulio Magno , Nicholas Piggin , "Justin M. Forbes" , Michael Ellerman , Madhavan Srinivasan , Sasha Levin Subject: [PATCH 6.12 180/232] powerpc: Fix struct termio related ioctl macros Date: Tue, 8 Jul 2025 18:22:56 +0200 Message-ID: <20250708162246.148488299@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162241.426806072@linuxfoundation.org> References: <20250708162241.426806072@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Madhavan Srinivasan [ Upstream commit ab107276607af90b13a5994997e19b7b9731e251 ] Since termio interface is now obsolete, include/uapi/asm/ioctls.h has some constant macros referring to "struct termio", this caused build failure at userspace. In file included from /usr/include/asm/ioctl.h:12, from /usr/include/asm/ioctls.h:5, from tst-ioctls.c:3: tst-ioctls.c: In function 'get_TCGETA': tst-ioctls.c:12:10: error: invalid application of 'sizeof' to incomplete type 'struct termio' 12 | return TCGETA; | ^~~~~~ Even though termios.h provides "struct termio", trying to juggle definitions around to make it compile could introduce regressions. So better to open code it. Reported-by: Tulio Magno Suggested-by: Nicholas Piggin Tested-by: Justin M. Forbes Reviewed-by: Michael Ellerman Closes: https://lore.kernel.org/linuxppc-dev/8734dji5wl.fsf@ascii.art.br/ Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250517142237.156665-1-maddy@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/include/uapi/asm/ioctls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h index 2c145da3b774a..b5211e413829a 100644 --- a/arch/powerpc/include/uapi/asm/ioctls.h +++ b/arch/powerpc/include/uapi/asm/ioctls.h @@ -23,10 +23,10 @@ #define TCSETSW _IOW('t', 21, struct termios) #define TCSETSF _IOW('t', 22, struct termios) -#define TCGETA _IOR('t', 23, struct termio) -#define TCSETA _IOW('t', 24, struct termio) -#define TCSETAW _IOW('t', 25, struct termio) -#define TCSETAF _IOW('t', 28, struct termio) +#define TCGETA 0x40147417 /* _IOR('t', 23, struct termio) */ +#define TCSETA 0x80147418 /* _IOW('t', 24, struct termio) */ +#define TCSETAW 0x80147419 /* _IOW('t', 25, struct termio) */ +#define TCSETAF 0x8014741c /* _IOW('t', 28, struct termio) */ #define TCSBRK _IO('t', 29) #define TCXONC _IO('t', 30) -- 2.39.5