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 E4E432E2EE4; Tue, 8 Jul 2025 16:33:52 +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=1751992433; cv=none; b=sAJ6675Twze+ISciKT3XWHSxHkqWea25HRZ0Ll0arZeeeWYqgkFOZpAcRUNvqW+oiYaftkTrwtV+gFXntmxME4Nn3bDhS1bjSbQn1G95DDQvWcJsdkBaEAilYJusoeChAWrqtgpNvE/6aieB2dCl+SxzdyNuUCBUUJ7xU+Enk6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751992433; c=relaxed/simple; bh=VJjMoUIHMxS1zB22pihIH33CVMWIhtTj5SU84X91Aww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tzoT6RbU1rQGK8BLSxxCObPLe5fw8Bv9WGHPE8kA5i7wAw0Q6O/Jrwn1BkCOfGslYm/TW4h4oq1KhEz1GvCeZNzWvGq+h2bvKZcByEzQ91KRJuPr9vMIxrc9+/zOFmwhhJTFxJ+nyyKg6tm94wGVaV49/mxwUNvdxBY65vyNof4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vYH6t/6C; 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="vYH6t/6C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D70BC4CEED; Tue, 8 Jul 2025 16:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751992432; bh=VJjMoUIHMxS1zB22pihIH33CVMWIhtTj5SU84X91Aww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vYH6t/6CPC6+p68Q0fOL2wruKiSKlXHQw2/CseAhO6oitDLkkv0REHa7RssT4hWUs 0Lgd5mEbG4rfa9eb9ShXEvkPFQNooe4ySEgc+b9jXpPaEu2twVtgVF3ZxlVAB5rCpm LhJM6W5hPLEkZB7RtxNHpJUaRd5z5uYrxEmIIPEw= 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.6 090/132] powerpc: Fix struct termio related ioctl macros Date: Tue, 8 Jul 2025 18:23:21 +0200 Message-ID: <20250708162233.258036356@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162230.765762963@linuxfoundation.org> References: <20250708162230.765762963@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.6-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