Message ID | 20210514100106.3404011-9-arnd@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Unify asm/unaligned.h around struct helper | expand |
On Fri, May 14, 2021 at 12:00:56PM +0200, Arnd Bergmann wrote: > /* Borrowed from msdos.c */ > -#define SYS_IND(p) (get_unaligned(&(p)->sys_ind)) > +#define SYS_IND(p) ((p)->sys_ind) Please just kill this macro entirely. > -#define SYS_IND(p) get_unaligned(&p->sys_ind) > +#define SYS_IND(p) (p->sys_ind) Same here.
On Mon, May 17, 2021 at 12:28 PM Christoph Hellwig <hch@infradead.org> wrote: > > On Fri, May 14, 2021 at 12:00:56PM +0200, Arnd Bergmann wrote: > > /* Borrowed from msdos.c */ > > -#define SYS_IND(p) (get_unaligned(&(p)->sys_ind)) > > +#define SYS_IND(p) ((p)->sys_ind) > > Please just kill this macro entirely. > > > -#define SYS_IND(p) get_unaligned(&p->sys_ind) > > +#define SYS_IND(p) (p->sys_ind) > > Same here. Done, thanks for taking a look. Arnd
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) {