Re: [PATCH RFC v3 2/2] m68k/q40: add data_swab option for pata_falcon to byte-swap disk data

Finn Thain
2023-08-18T00:37:25Z

On Fri, 18 Aug 2023, Michael Schmitz wrote:

> > I think the patch could be simplified by dropping the dynamic memory
> > allocation...
>
> If using a private data pointer field for an int bitmask is acceptable
> use ...
>

I thought that was implicit in Geert's response.

I used a similar technique in drivers/nubus/proc.c and it didn't bother
anyone.

> I'll see if I can find any performance impact from the additional
> swap_data flag. If there's none, your solution may be cleaner.
>

It was the maintenance impact of the extra code that motivated my
suggestion. However, by avoiding kalloc we also avoid having to
dereference the pointer in the fast path.