Re: [PATCH/RFC] module: replace module_layout with module_memory

From: Song Liu
Date: Wed Jan 18 2023 - 12:38:20 EST


On Tue, Jan 17, 2023 at 11:40 PM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Tue, Jan 17, 2023 at 10:50:55AM -0800, Song Liu wrote:
> > Hi Thomas and Luis,
> >
> > Could you please share your comments on this? Specifically, is this on
> > the right direction? And, what's your preference with Christophe's
> > suggestions?
> >
> > "I dislike how it looks with enums, things like
> > mod->mod_mem[MOD_MEM_TYPE_INIT
> > _TEXT] are odd and don't read nicely.
> > Could we have something nicer like mod->mod_mem_init_text ?
> > I know it will complicate your for_each_mod_mem_type() but it would look
> > nicer."
>
> FYI, I don't particularly like the array either. But if it makes
> the code much simpler I can live with it.

Thanks for the feedback! Let me see whether I can make the
code clean without the array.

Song