[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210514100106.3404011-9-arnd@kernel.org>
Date: Fri, 14 May 2021 12:00:56 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: linux-arch@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Vineet Gupta <vgupta@...opsys.com>,
Arnd Bergmann <arnd@...db.de>,
"Richard Russon (FlatCap)" <ldm@...tcap.org>,
Jens Axboe <axboe@...nel.dk>,
linux-ntfs-dev@...ts.sourceforge.net, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 08/13] partitions: msdos: fix one-byte get_unaligned()
From: Arnd Bergmann <arnd@...db.de>
A simplification of get_unaligned() clashes with callers that pass
in a character pointer, causing a harmless warning like:
block/partitions/msdos.c: In function 'msdos_partition':
include/asm-generic/unaligned.h:13:22: warning: 'packed' attribute ignored for field of type 'u8' {aka 'unsigned char'} [-Wattributes]
Remove the get_unaligned() call and just use the byte directly.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
block/partitions/ldm.h | 2 +-
block/partitions/msdos.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/partitions/ldm.h b/block/partitions/ldm.h
index d8d6beaa72c4..1a77ff09cc5f 100644
--- a/block/partitions/ldm.h
+++ b/block/partitions/ldm.h
@@ -85,7 +85,7 @@ struct parsed_partitions;
#define TOC_BITMAP2 "log" /* bitmaps in the TOCBLOCK. */
/* Borrowed from msdos.c */
-#define SYS_IND(p) (get_unaligned(&(p)->sys_ind))
+#define SYS_IND(p) ((p)->sys_ind)
struct frag { /* VBLK Fragment handling */
struct list_head list;
diff --git a/block/partitions/msdos.c b/block/partitions/msdos.c
index 8f2fcc080264..d78549d7619d 100644
--- a/block/partitions/msdos.c
+++ b/block/partitions/msdos.c
@@ -38,7 +38,7 @@
*/
#include <asm/unaligned.h>
-#define SYS_IND(p) get_unaligned(&p->sys_ind)
+#define SYS_IND(p) (p->sys_ind)
static inline sector_t nr_sects(struct msdos_partition *p)
{
--
2.29.2
Powered by blists - more mailing lists