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 E868BE7717D for ; Fri, 13 Dec 2024 12:06:08 +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:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qTbNQBPEQXOTcPR/NGXFj9U6WyVSmNA4Hf7Geo3ma1M=; b=NiDxYBSDEJe7TP cZEFkzmdJAubSd/xS7MPEigFVfCEIWUpaHaeA4xJgU7pHN7xc1esOKpd4tZcCjTIk+ws+drpoijqu YPaXPxlaqntysaKINmk2ZjQtPL/Xd46QWHsTjoakoJdWq4J9KfrwWDh0lQOzSIM7xiup2hosteqj3 Rvrz5IyPJJsrv1eQI7XQuzDYG9+UzZtKFWcm1boUFmAtIz4OtQOwYMDBQl7o5iGlUQh3ZKD99ZFmB VxNxW+dpZHia9Esbx292nVUWklkam3S184btirmX9qSDvx+xuQDYi22jJ4THUd+ykWBmjcz6V2wLH hHVgRA6YZvqOFqvYNU0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tM4Qn-00000003f0M-2RYx; Fri, 13 Dec 2024 12:06:05 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tM4Qi-00000003eyr-30Yy for linux-mtd@lists.infradead.org; Fri, 13 Dec 2024 12:06:04 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 761CAC0002; Fri, 13 Dec 2024 12:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1734091557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q07hAkDq3YBTICoUg/PyYGARG9zUOS05b+cgj9MMFrA=; b=otai4DWajRI4i/NYyp88WU/zXYTboiWvXXNaQIogvMyWjQYCGTURwGlxUFjkRSKqpe4poH YEWihwdelPzf4RpF4JbbMuqPTacQDQqVRT2EgXLXm6blKvbY4A2C9FmppM1IALhu3DcX2J 1TSigIT5RnmZz0oAvQ+rLpgrgrXsiCQzh5/WGVwFQe+xE1/i+aIqp2cTs5mI4gx7t0/8aJ CDN1Hy8Wq01UScsFOJVbzO73dfFtPGsYgXPWWfqA+3TsDjLuDXKzPU0ZSZmJKij9KQep9b mXQvbwOqvmLjClMEyOSz2J4Xtey+HBLdlvOJj6EMcCKF3dBWIXvddPr0BYDVkQ== From: Miquel Raynal To: Tudor Ambarus Cc: Richard Weinberger , Vignesh Raghavendra , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, Mark Brown , linux-spi@vger.kernel.org, Steam Lin , Thomas Petazzoni , Sanjay R Mehta , Han Xu , Conor Dooley , Daire McNamara , Matthias Brugger , AngeloGioacchino Del Regno , Haibo Chen , Yogesh Gaur , Heiko Stuebner , Michal Simek Subject: Re: [PATCH 20/24] spi: spi-mem: Reorder SPI_MEM_OP_CMD internals In-Reply-To: <7871b283-7623-4a21-ab75-42359a7c29ae@linaro.org> (Tudor Ambarus's message of "Mon, 11 Nov 2024 14:32:27 +0000") References: <20241025161501.485684-1-miquel.raynal@bootlin.com> <20241025161501.485684-21-miquel.raynal@bootlin.com> <7871b283-7623-4a21-ab75-42359a7c29ae@linaro.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Fri, 13 Dec 2024 13:05:55 +0100 Message-ID: <87y10jlrdo.fsf@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241213_040600_922493_6E5776C2 X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org >> #define SPI_MEM_OP_CMD(__opcode, __buswidth) \ >> { \ >> - .buswidth = __buswidth, \ >> - .opcode = __opcode, \ >> .nbytes = 1, \ >> + .opcode = __opcode, \ >> + .buswidth = __buswidth, \ >> } >> > > I don't mind, but shouldn't we follow the order used at struct declaration? > > struct spi_mem_op { > struct { > u8 nbytes; > u8 buswidth; > u8 dtr : 1; > u8 __pad : 7; > u16 opcode; > } cmd; Sure, let's do that. I also corrected the other macros at the same time (v2). ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 0B1081DF263 for ; Fri, 13 Dec 2024 12:05:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734091562; cv=none; b=V0dcIZrf9Bwcws5p1WIeAyfFIilvGSZPw89F+79k1KAi6+W4PbZT/zERSdtKkvoVLeVGV9RAArDdkjiyQ8v8G3d8XnYT5hAhBkD5JULEA26zMa9eE3qcG6IaLD8ebiQamlb9UoDYJj9NgLVstv64D41cOs9wvnuK2ptgNGd6/Nc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734091562; c=relaxed/simple; bh=avy/BlXoQkszE0jt+F0OzGXyNcKlIcugyvwNkYd3bwc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=u+oyRY9DDcoONOME8kVoWOhxd0fh77TckV3WBliU3HXmYiZAdwi+gMszpOf1/uMTllq6WQN+5Xv4ueyJxTShRSdgWOskd9R0rruzBbtiwLOrAn25SvqpVIhwKiSl50iw72wbJbG+fHQNSC7+ZC/VBDkXUOsmAfKI+5RjtS7qDmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=otai4DWa; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="otai4DWa" Received: by mail.gandi.net (Postfix) with ESMTPSA id 761CAC0002; Fri, 13 Dec 2024 12:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1734091557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q07hAkDq3YBTICoUg/PyYGARG9zUOS05b+cgj9MMFrA=; b=otai4DWajRI4i/NYyp88WU/zXYTboiWvXXNaQIogvMyWjQYCGTURwGlxUFjkRSKqpe4poH YEWihwdelPzf4RpF4JbbMuqPTacQDQqVRT2EgXLXm6blKvbY4A2C9FmppM1IALhu3DcX2J 1TSigIT5RnmZz0oAvQ+rLpgrgrXsiCQzh5/WGVwFQe+xE1/i+aIqp2cTs5mI4gx7t0/8aJ CDN1Hy8Wq01UScsFOJVbzO73dfFtPGsYgXPWWfqA+3TsDjLuDXKzPU0ZSZmJKij9KQep9b mXQvbwOqvmLjClMEyOSz2J4Xtey+HBLdlvOJj6EMcCKF3dBWIXvddPr0BYDVkQ== From: Miquel Raynal To: Tudor Ambarus Cc: Richard Weinberger , Vignesh Raghavendra , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, Mark Brown , linux-spi@vger.kernel.org, Steam Lin , Thomas Petazzoni , Sanjay R Mehta , Han Xu , Conor Dooley , Daire McNamara , Matthias Brugger , AngeloGioacchino Del Regno , Haibo Chen , Yogesh Gaur , Heiko Stuebner , Michal Simek Subject: Re: [PATCH 20/24] spi: spi-mem: Reorder SPI_MEM_OP_CMD internals In-Reply-To: <7871b283-7623-4a21-ab75-42359a7c29ae@linaro.org> (Tudor Ambarus's message of "Mon, 11 Nov 2024 14:32:27 +0000") References: <20241025161501.485684-1-miquel.raynal@bootlin.com> <20241025161501.485684-21-miquel.raynal@bootlin.com> <7871b283-7623-4a21-ab75-42359a7c29ae@linaro.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Fri, 13 Dec 2024 13:05:55 +0100 Message-ID: <87y10jlrdo.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: miquel.raynal@bootlin.com >> #define SPI_MEM_OP_CMD(__opcode, __buswidth) \ >> { \ >> - .buswidth = __buswidth, \ >> - .opcode = __opcode, \ >> .nbytes = 1, \ >> + .opcode = __opcode, \ >> + .buswidth = __buswidth, \ >> } >> > > I don't mind, but shouldn't we follow the order used at struct declaration? > > struct spi_mem_op { > struct { > u8 nbytes; > u8 buswidth; > u8 dtr : 1; > u8 __pad : 7; > u16 opcode; > } cmd; Sure, let's do that. I also corrected the other macros at the same time (v2).