lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <364c0959-c82f-a93c-df02-87a04e1c2cea@oracle.com>
Date:   Mon, 17 Oct 2022 20:33:28 +0530
From:   Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To:     macroalpha82@...il.com, hjc@...k-chips.com, heiko@...ech.de
Cc:     airlied@...il.com, Dan Carpenter <dan.carpenter@...cle.com>,
        daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
        harshit.m.mogalapalli@...il.com
Subject: [bug-report] Smatch warns unsigned comparison with zero in
 dw_mipi_dsi_rockchip_set_lcdsel()

Hi,


Smatch warns:
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:755 
dw_mipi_dsi_rockchip_set_lcdsel() warn: unsigned 
'dsi->cdata->lcdsel_grf_reg'
is never less than zero.

static void dw_mipi_dsi_rockchip_set_lcdsel(struct dw_mipi_dsi_rockchip 
*dsi,
                                             int mux)
{
         if (dsi->cdata->lcdsel_grf_reg < 0)
                 regmap_write(dsi->grf_regmap, dsi->cdata->lcdsel_grf_reg,
                         mux ? dsi->cdata->lcdsel_lit : 
dsi->cdata->lcdsel_big);
}

'dsi->cdata->lcdsel_grf_reg' is of u32 type, it can never be less than zero.
So the above if condition is an impossible one.

Note: 'lcdsel_grf_reg' is set to -1 at other places.


Thanks,
Harshit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ