Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] drm: Sparse warnings due to __u16 usage for little-endian data --
commit 8f50576e49682d9068991d3e7de12fc063b0685f Author: Luca Ceresoli <[email protected]> drm/bridge: ite-it66121: improve reading IDs and log on errors This commit switches from individual regmap_read() calls to a single regmap_bulk_read() when fetching vendor and device IDs. It introduces a union to explicitly handle the data bytes and adds proper error checking to prevent silently continuing with invalid values. > diff --git a/drivers/gpu/drm/bridge/ite-it66121.c > b/drivers/gpu/drm/bridge/ite-it66121.c > --- a/drivers/gpu/drm/bridge/ite-it66121.c > +++ b/drivers/gpu/drm/bridge/ite-it66121.c > @@ -1579,7 +1579,16 @@ static const struct it66121_chip_info > it66xx_chip_info[] = { > > static int it66121_probe(struct i2c_client *client) > { > - u32 revision_id, vendor_ids[2] = { 0 }, device_ids[2] = { 0 }; > + union { > + __u8 byte[4]; > + struct { > + __u16 vendor; > + __u16 device; > + }; [Severity: Low] Should these fields be declared as __le16 instead of __u16? Since they hold little-endian data populated directly by regmap_bulk_read() and are later passed to le16_to_cpu(), using natively-typed __u16 here violates the kernel's endianness typing rules and triggers Sparse warnings for incorrect types. > + } chip_id_regs; > + BUILD_BUG_ON(sizeof(chip_id_regs) != 4); > + u16 vendor_id, device_id; [ ... ] > @@ -1643,19 +1652,22 @@ static int it66121_probe(struct i2c_client *client) [ ... ] > + vendor_id = le16_to_cpu(chip_id_regs.vendor); > + device_id = le16_to_cpu(chip_id_regs.device); -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20261015-drm-ite-it66121-log-probe-errors-v1-0-7fd6994e0...@bootlin.com?part=1
