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 BAB292A1BA; Tue, 8 Jul 2025 16:28:49 +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=1751992129; cv=none; b=ll9Lq0/Tx17ekmLwBEVLR1MsawuJo7V0BvJR9Xxe+TRQey/w3i/El0wwQ+cGOSQWWHYcIsumzSIAXPIcbN+OvIxTW6zQk9WolBuf0i20eQo4rxHHwkARrakRmZbmL4qiGoibB1+jAfUfxZ/eOCEQd5frici9q0FlH6rMsR7eZrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751992129; c=relaxed/simple; bh=TNLO7LAjNeLheDeY4IN75pIzeHAcAH3kPlBI7kFM6YE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qyuvA1DkCnlFT0dL98gqtyl/VMICfNQ5M8z0Vrkcrc288ngYdtONYDJEfB9eW9nJT4tDd4BagXCkn4MMb03rJ/gNz3xYW0IWuw+8xyPMxtOpfTK7rin8oh2pEOh+aJd00IIQ58geTPDiOBNg+PHcZZ3+CTc/+FmctCf/8Fzm4Og= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=chvoo4Vr; 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="chvoo4Vr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42D55C4CEED; Tue, 8 Jul 2025 16:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751992129; bh=TNLO7LAjNeLheDeY4IN75pIzeHAcAH3kPlBI7kFM6YE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chvoo4VrTVwGu2A2abR5d2RhZqnRKpxvO99uAjB2oYZ7bkx6z7zwY+C6xNWQ2pLub BmMgwCEucFRGlneEWOrSQPRg1ajscQRxa3DfTWZWKDCUN8/XS1RnDdvYcHnS8a8lzV F6vcVF0DiuGIf5id1InahYaSOKZcKLgEfcF9pQpI= 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.1 50/81] powerpc: Fix struct termio related ioctl macros Date: Tue, 8 Jul 2025 18:23:42 +0200 Message-ID: <20250708162226.606034414@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162224.795155912@linuxfoundation.org> References: <20250708162224.795155912@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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