]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
isofs: use unsigned char types consistently
authorArnd Bergmann <arnd@arndb.de>
Thu, 19 Oct 2017 14:47:49 +0000 (16:47 +0200)
committerJan Kara <jack@suse.cz>
Tue, 31 Oct 2017 17:11:33 +0000 (18:11 +0100)
commitcb91775711b2f3f7adea8d33aa83104baf75ee07
tree8363a93ce0fb625d92999c189342c638a987a2f5
parent34be4dbf87fc3e474a842305394534216d428f5d
isofs: use unsigned char types consistently

Based on the discussion about the signed character field for the year,
I went through all fields in the iso9660 and rockridge standards to see
whether they should used signed or unsigned characters. Only a single
8-bit value is defined as signed per 'section 7.1.2': the timezone
offset in a timestamp, this has always been handled correctly through
explicit sign-extension.

All others are either '7.1.1 8-bit unsigned numerical values' or
composite fields. I also read the linux source code and came to the
same conclusion, also I could not find any other part of the
implementation that actually behaves differently for signed or
unsigned values.

Since it is still ambigous to use plain 'char' in interface definitions,
I'm changing all fields representing numbers and reserved bytes to
the unambiguous '__u8'. Fields that hold actual strings are left as
'char' arrays. I built the code with '-Wpointer-sign -Wsign-compare'
to see if anything got left out, but couldn't find anything wrong
with the remaining warnings.

This patch should not change runtime behavior and does not need to
be backported.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/isofs.h
fs/isofs/rock.h
include/uapi/linux/iso_fs.h