aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorJon Derrick <[email protected]>2023-02-24 11:33:22 -0700
committerSong Liu <[email protected]>2023-04-13 22:20:24 -0700
commit10172f200b67aafcb9b8ce7d0575d713c1aafbb7 (patch)
tree06f77774f5aa2ef9d4b970343d61873123c6ce09 /drivers/usb/cdns3/cdns3-debug.h
parent328e17d8d9428b390ab48bdedcaf5106e4b511fe (diff)
md: Fix types in sb writer
Page->index is a pgoff_t and multiplying could cause overflows on a 32-bit architecture. In the sb writer, this is used to calculate and verify the sector being used, and is multiplied by a sector value. Using sector_t will cast it to a u64 type and is the more appropriate type for the unit. Additionally, the integer size unit is converted to a sector unit in later calculations, and is now corrected to be an unsigned type. Finally, clean up the calculations using variable aliases to improve readabiliy. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jon Derrick <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions