Re: [PATCH V2 1/7] m68k/mm: Change pmd_val()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




  #if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3
-typedef struct { unsigned long pmd[16]; } pmd_t;
-#define pmd_val(x)     ((&x)->pmd[0])
-#define __pmd(x)       ((pmd_t) { { (x) }, })
+typedef struct { unsigned long pmd; } pmd_t;
+#define pmd_val(x)     ((&x)->pmd)
+#define __pmd(x)       ((pmd_t) { (x) } )
  #endif

So I assume this should be fine

I think you're implying that taking the address then using arrow operator was
needed when pmd was an array? I don't really understand that if so? Surely:

   ((x).pmd[0])

would have worked too?

I think your right, I guess one suspects that there is more magic to it than there actually is ... :)

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux