From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4066EC4707B for ; Thu, 18 Jan 2024 08:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EYfvCSV2cEuStnwiQ+WOV8Rn30JwjyTln3sWpNj9S1g=; b=h4Sdqaz58cJRS+ ETsMogaxLbcB8rCIcT5H/rXgZwP3dSMGg2jazwK/gwdL9NyuNCoUQGUbfNi74gIznA/dhCyYj19+K 0AbufI79PfOIPw7Bryy4cHwCn62E4MaqgZlSjmTwZ2Qf4Hh2gbuweMTbOgeiDbbESpQQbAuvHGbpL kBCVrODshDbE8Ipk+JtIvPtunKZlyb2I4L+pz29bEgME6Cf6vMZVbOhSO3AF4JsSIEIgI0aukTlVX LzdJyuGNT22KoYeSF17YF+VH1T0B0NpyeXOO85s/7ugQVHYWWjgphl3TfrCcTi36jEG+sAb7J2YJH giJb9s6ax+c5EYj0QKJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQO0g-002AXk-2D; Thu, 18 Jan 2024 08:44:26 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQO0e-002AWa-1j for linux-arm-kernel@lists.infradead.org; Thu, 18 Jan 2024 08:44:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B5CBCCE1759; Thu, 18 Jan 2024 08:44:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98676C433F1; Thu, 18 Jan 2024 08:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705567462; bh=QATaYohPU+L5T8X2rlTM5GZ2caeXAoEQ/uZIIr7aU1U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qDOVfwNXPTBRCJJg2DsnbrWD+GBWjItEjJYLihQ4vm5Ea9tjsJfj9afAR9e4SFLrj a0jpkuK9PGdPOh7QduSQDGLZcx5J+D9OWSCq2C7CXWlDsEP1fVMWCpaFk9uOfSLpx6 0ut6xaJFBERvT6tqZ+GdP+8E6aSn1du1yPv/93Cw= Date: Thu, 18 Jan 2024 09:44:19 +0100 From: Greg KH To: Crescent CY Hsieh Cc: Christoph Niedermaier , jirislaby@kernel.org, LinoSanfilippo@gmx.de, lukas@wunner.de, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 1/2] tty: serial: Cleanup the bit shift with macro Message-ID: <2024011824-squiggle-foil-8db4@gregkh> References: <20231201071554.258607-2-crescentcy.hsieh@moxa.com> <20240117145623.3556-1-cniedermaier@dh-electronics.com> <2024011836-glimmer-seventh-f2a7@gregkh> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240118_004424_753045_4E02974D X-CRM114-Status: GOOD ( 15.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 18, 2024 at 04:14:41PM +0800, Crescent CY Hsieh wrote: > On Thu, Jan 18, 2024 at 08:01:58AM +0100, Greg KH wrote: > > On Wed, Jan 17, 2024 at 03:56:23PM +0100, Christoph Niedermaier wrote: > > > > struct serial_rs485 { > > > > __u32 flags; > > > > -#define SER_RS485_ENABLED (1 << 0) > > > > -#define SER_RS485_RTS_ON_SEND (1 << 1) > > > > -#define SER_RS485_RTS_AFTER_SEND (1 << 2) > > > > > > In the old definition (1 << 3) wasn't used. > > > > > > > -#define SER_RS485_RX_DURING_TX (1 << 4) > > > > -#define SER_RS485_TERMINATE_BUS (1 << 5) > > > > -#define SER_RS485_ADDRB (1 << 6) > > > > -#define SER_RS485_ADDR_RECV (1 << 7) > > > > -#define SER_RS485_ADDR_DEST (1 << 8) > > > > +#define SER_RS485_ENABLED _BITUL(0) > > > > +#define SER_RS485_RTS_ON_SEND _BITUL(1) > > > > +#define SER_RS485_RTS_AFTER_SEND _BITUL(2) > > > > +#define SER_RS485_RX_DURING_TX _BITUL(3) > > > > > > Isn't it a break if number 3 isn't skipped here as well? > > Sorry I might have misunderstood the meaning of "broke userspace". > > In this case, does it imply splitting the "cleanup" patch and the "add > feature" patch, or leaving the third bit unused? Or perhaps both? You can not redefine existing defines to different values, like you did here, that changes the user/kernel api of the system. Luckily this isn't in any released kernel, I'll either revert this after -rc1 is out, or take a patch from anyone else to do so if they want to send it now. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel