mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [bug-report] Smatch warns unsigned comparison with zero in dw_mipi_dsi_rockchip_set_lcdsel()
@ 2022-10-17 15:03 Harshit Mogalapalli
  0 siblings, 0 replies; only message in thread
From: Harshit Mogalapalli @ 2022-10-17 15:03 UTC (permalink / raw)
  To: macroalpha82, hjc, heiko
  Cc: airlied, Dan Carpenter, daniel, dri-devel, LKML, kernel-janitors,
	linux-rockchip, Harshit Mogalapalli, harshit.m.mogalapalli

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-17 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 15:03 [bug-report] Smatch warns unsigned comparison with zero in dw_mipi_dsi_rockchip_set_lcdsel() Harshit Mogalapalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®