Re: [PATCH v10 09/26] scsi: ufs: mediatek: Rework the crypt-boost stuff
[email protected] Thu, 30 Jul 2026 10:16:57 +0000
| Newsgroups | org.kernel.vger.linux-scsi,org.infradead.lists.linux-phy,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Missing newline character `\n` in `dev_err` format string. - [Low] Incompatible pointer type passed to `of_property_read_u32`. -- --- Patch [9]: [PATCH v10 09/26] scsi: ufs: mediatek: Rework the crypt-boost stuff --- commit cbee34751328446d33c164e90e794b44773af5eb Author: Nicolas Frattaroli <[email protected]> scsi: ufs: mediatek: Rework the crypt-boost stuff This commit reworks the crypt-boost functionality by adding vendor prefixes to the device tree properties, removing unnecessary clock wrappers, and restructuring the initialization code. > diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c > index 50e7701d7943b..55701172bcf15 100644 > --- a/drivers/ufs/host/ufs-mediatek.c > +++ b/drivers/ufs/host/ufs-mediatek.c [ ... ] > @@ -633,65 +618,51 @@ static void ufs_mtk_boost_crypt(struct ufs_hba *hba, bool boost) [ ... ] > + cfg->reg_vcore = devm_regulator_get_optional(dev, "dvfsrc-vcore"); > + if (IS_ERR(cfg->reg_vcore)) { > + dev_err(dev, "Failed to get dvfsrc-vcore: %pe", cfg->reg_vcore); [Severity: Low] This isn't a bug, but should this error message include a trailing newline? Without it, the next printed kernel message might be appended to the same line, resulting in garbled logs. > + return; > } > > - if (of_property_read_u32(dev->of_node, "boost-crypt-vcore-min", > - &volt)) { > - dev_info(dev, "failed to get boost-crypt-vcore-min"); > - goto disable_caps; > + ret = of_property_read_u32(dev->of_node, "mediatek,boost-crypt-vcore-min", > + &cfg->vcore_volt); [Severity: Low] Does passing &cfg->vcore_volt to of_property_read_u32() cause a compiler warning here? Looking at struct ufs_mtk_crypt_cfg, vcore_volt is declared as an int, but of_property_read_u32() expects a pointer to a u32. This might trigger an incompatible pointer type or pointer sign warning on strict build configurations. > + if (ret) { > + dev_err(dev, "Failed to get mediatek,boost-crypt-vcore-min: %pe\n", > + ERR_PTR(ret)); > + return; > } -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=9