[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0419471e-20d5-4db6-ac58-09ae0c0b9c65@redhat.com>
Date: Tue, 17 Sep 2024 12:30:06 +0200
From: David Hildenbrand <david@...hat.com>
To: Ryan Roberts <ryan.roberts@....com>,
Anshuman Khandual <anshuman.khandual@....com>, linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Mike Rapoport (IBM)" <rppt@...nel.org>, Arnd Bergmann <arnd@...db.de>,
x86@...nel.org, linux-m68k@...ts.linux-m68k.org,
linux-fsdevel@...r.kernel.org, kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>, Guo Ren <guoren@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH V2 1/7] m68k/mm: Change pmd_val()
>> #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
Powered by blists - more mailing lists