Re: [PATCH v10 2/3] block: change annotation of rdb_CylBlocks in affs_hardblocks.h

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

 



Hi Christoph,

Am 16.06.2023 um 17:48 schrieb Christoph Hellwig:
On Fri, Jun 16, 2023 at 07:53:11AM +1200, Michael Schmitz wrote:
Thanks - now there's two __s32 fields in that header - one checksum each
for RDB and PB. No one has so far seen the need for a 'signed big endian 32
bit' type, and I'd rather avoid adding one to types.h. I'll leave those as
they are (with the tacit understanding that they are equally meant to be
big endian).

We have those in a few other pleases and store them as __be32 as well.  The
(implicit) cast to s32 will make them signed again.

Where's that cast to s32 hidden? I've only seen

#define __be32_to_cpu(x) ((__force __u32)(__be32)(x))

which would make the checksums unsigned if __be32 was used.

Whether the checksum code uses signed or unsigned math would require inspection of the Amiga partitioning tool source which I don't have, so I've kept __s32 to be safe.

Thanks for reviewing v11!

Cheers,

	Michael



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux