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 19:25 schrieb Christoph Hellwig:
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.

Well, the return value of be32_to_cpu is going to be a assigned to a,
presumably signed, variable.  With that you get an implicit cast.

I see - as Geert explained, signed or unsigned doesn't matter for the type of checksum algorithm used in this case, so there is no potential for confusion once you think about it (which I didn't, obviously).

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