Re: [PATCH 4/4] misc: eeprom_93xx46: Switch based on word size, not addrlen
From: Jonathan Neuschäfer
Date: Sat Apr 24 2021 - 09:44:15 EST
On Sat, Apr 24, 2021 at 02:30:33PM +0200, Emmanuel Gil Peyrot wrote:
> This avoids using magic numbers based on the total size and length of an
> address, where we only want to differentiate between 8-bit and 16-bit,
> and finally makes 93c56 and 93c66 usable!
>
> If the two pointer indirections is too much, we could move the flags to
> the main struct instead, but I doubt it’s going to make any sensible
> difference.
>
> Signed-off-by: Emmanuel Gil Peyrot <linkmauve@xxxxxxxxxxxx>
> ---
Ah, this somewhat addresses my reply to the previous patch.
I think by rearranging and/or squashing the patches, they could tell a
more coherent story, and cause less confusion.
(Basically: avoid creating conditions where the code is wrong — if a
later patch is needed in order to make a previous patch correct, but the
later patch alone wouldn't make the code incorrect, swap them. If there's
breakage either way and you can't tease them apart, squash them together.)
Thanks,
Jonathan
Attachment:
signature.asc
Description: PGP signature