diff mbox series

block: remove bogus union

Message ID 20240917045457.429698-1-joshi.k@samsung.com (mailing list archive)
State New
Headers show
Series block: remove bogus union | expand

Commit Message

Kanchan Joshi Sept. 17, 2024, 4:54 a.m. UTC
The union around bi_integrity field is pointless.
Remove it.

Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
---
 include/linux/blk_types.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jens Axboe Sept. 17, 2024, 5:05 a.m. UTC | #1
On Tue, 17 Sep 2024 10:24:57 +0530, Kanchan Joshi wrote:
> The union around bi_integrity field is pointless.
> Remove it.
> 
> 

Applied, thanks!

[1/1] block: remove bogus union
      commit: 4208c562a27899212e8046080555e0f204e0579a

Best regards,
Martin K. Petersen Sept. 17, 2024, 11:34 a.m. UTC | #2
Kanchan,

> The union around bi_integrity field is pointless. Remove it.

That's fine. It was a union to facilitate sharing the space in the
struct with the original copy offload patch series.
diff mbox series

Patch

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 36ed96133217..6d3a0fff2a1d 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -248,11 +248,9 @@  struct bio {
 	struct bio_crypt_ctx	*bi_crypt_context;
 #endif
 
-	union {
 #if defined(CONFIG_BLK_DEV_INTEGRITY)
-		struct bio_integrity_payload *bi_integrity; /* data integrity */
+	struct bio_integrity_payload *bi_integrity; /* data integrity */
 #endif
-	};
 
 	unsigned short		bi_vcnt;	/* how many bio_vec's */