linux-6.6-rc1/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c:2175:26: style: Array index 'i' is used before limits check. [arrayIndexThenCheck]

2023-09-11 Thread David Binderman
lt; optimal_dcfclk_for_uclk[j]) { Regards David Binderman

Re: drivers/gpu/drm/bridge/fsl-ldb.c:101: possible loss of information.

2023-03-09 Thread David Binderman
Hello there Laurent, >Would you be able to send a patch to fix this ? Sadly, no. My success rate with kernel patches is low enough to make it not worth trying. Regards David Binderman From: Laurent Pinchart Sent: 09 March 2023 09:26 To: David Binderman Cc: andrzej.ha...@intel.

Re: drivers/gpu/drm/bridge/fsl-ldb.c:101: possible loss of information.

2023-03-08 Thread David Binderman
n a run time sanity check to make sure no 31 bit overflow. Just a couple of ideas for the code. Regards David Binderman

drivers/gpu/drm/bridge/fsl-ldb.c:101: possible loss of information.

2023-03-07 Thread David Binderman
long literals, like 3500UL, should have been used ? Regards David Binderman

dcn321_fpu.c:626: Array index check in wrong place ?

2022-11-07 Thread David Binderman
amp;& i < num_dcfclk_sta_targets) { It might be wise to move the limits check to before use. Regards David Binderman

linux-5.7-rc4/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c:1393: bad loop termination condition ?

2020-05-05 Thread David Binderman
j--) { but unsigned int i, j, closest_clk_lvl; so it looks like the loop never terminates. Suggest code rework. Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

drivers/gpu/drm/amd/display/modules/hdcp/hdcp1_execution.c:33:33: error: Buffer is accessed out of bounds

2020-02-10 Thread David Binderman
bytes long. Suggest code rework. Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-5.6-rc1/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8411:45: error: Division by zero.

2020-02-10 Thread David Binderman
. Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-5.4-rc2/drivers/video/fbdev/amifb.c:1875: bad expression ?

2019-10-08 Thread David Binderman
datawords = (*(lspr + delta) << 16) | (*lspr); ++lspr; Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-5.3-rc3 bug report

2019-08-06 Thread David Binderman
&& buffer->fault[i]; i++) Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-5.1/drivers/video/fbdev/via/viafbdev.c:233: bad assignment ?

2019-05-08 Thread David Binderman
Hello there, [linux-5.1/drivers/video/fbdev/via/viafbdev.c:233]: (style) Assignment 'depth=30' is redundant with condition 'depth==30'. Source code is else if (depth == 30) depth = 30; Suggest code rework. Regards David Binderman

linux-4.18-rc1/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:207: broken nested if ?

2018-06-18 Thread David Binderman
nable_uvd(adev, true); else amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN, AMD_PG_STATE_UNGATE); So second function call never happens. Suggest code rework. Regards D

linux-4.16-rc5/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:1723]: (warning) Possible null pointer dereference: pipe_ctx

2018-03-13 Thread David Binderman
stream->sink->link->connector_signal != SIGNAL_TYPE_EDP)     return false; Suggest add some code to deal with the case that the for loop doesn't find what it is looking for and so pipe_ctx is NULL. Regards David Binderman ___ dri-d

linux-4.15-rc1/drivers/gpu/drm/i915/gvt/cmd_parser.c:1640: poor error checking ?

2017-11-28 Thread David Binderman
int find_bb_size(struct parser_exec_state *s) so the code isn't properly checking the return value. Suggest code rework. Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/

Re: drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: warning: bitwise comparison always evaluates to false [-Wtautological-compare]

2017-10-25 Thread David Binderman
Hello there, Code I looked at is in linux-4.14-rc6, released 20171023, so reasonably up to date. I did a further check on github.com/torvalds/linux and the code looks wrong there, too. So I don't see the fix you mentioned in either of the places I looked. Regards David Binderman

drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: warning: bitwise comparison always evaluates to false [-Wtautological-compare]

2017-10-24 Thread David Binderman
t new code if ((temp & PIPEACONF_PIPE_STATE) != 0) break; Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-4.13/drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c:86: possible faulty logic ?

2017-09-04 Thread David Binderman
period; u64 delay; if (duty > target) delay = slow_down_period; else if (duty == target) delay = min(bump_period, slow_down_period) ; Last if can never be true, so call to min can never execute. Suggest code rework. Regards David

drivers/gpu/drm/i915/intel_pm.c:4467: bad comparison ?

2017-07-19 Thread David Binderman
Hello there, drivers/gpu/drm/i915/intel_pm.c:4467]: (warning) Comparison of a boolean expression with an integer other than 0 or 1. Source code is else if ((ddb_allocation && ddb_allocation / fixed_16_16_to_u32_round_up(plane_blocks_per_line)) >= 1) Reg

linux-4.11/drivers/gpu/drm/bridge/tc358767.c:715]: (error) Signed integer overflow for expression 'max_tu_symbol<<23'.

2017-05-02 Thread David Binderman
se type long ? Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c:124:: possible unintended fallthrough ?

2017-05-02 Thread David Binderman
ESS_WO: dmaobj->flags0 |= 0x8000; case NV_MEM_ACCESS_RW: dmaobj->flags2 |= 0x0002; break; default: return -EINVAL; } Suggest either document the fallthrough or add the missing break. Regards Dav

drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition

2017-03-29 Thread David Binderman
[drivers/gpu/drm/radeon/r100.c:2550]: (style) Variable 'tmp' is assigned a value that is never used. [drivers/gpu/drm/radeon/r100.c:2875]: (style) Variable 'tmp' is assigned a value that is never used. Regards David Binderman ___ dri-devel mailing li

drivers/gpu/drm/msm/hdmi/hdmi_hdcp.c:1319]: (style) Redundant condition

2017-03-27 Thread David Binderman
_state)) { Suggest code rework. Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-4.11-rc1/drivers/gpu/drm/amd/amdgpu/vi.c: 3 bugs

2017-03-06 Thread David Binderman
, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS); return 0; Regards David Binderman ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ?

2017-03-06 Thread David Binderman
/exynos/exynos5433_drm_decon.c:131]: (style) Same expression on both sides of '|'. Source code is writel(TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN, Regards David Binderman ___ dri-devel mailing l

include/drm/i915_drm.h:96: possible bad bitmask ?

2016-08-08 Thread David Binderman
ike #define INTEL_BSM_MASK (0xUL<< 20) might be better. Regards David Binderman

drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c:1812: possible pointless variable ?

2016-06-27 Thread David Binderman
the variable in some way, or delete it. Regards David Binderman

linux-4.7-rc3/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c: 2 * pointless tests ?

2016-06-15 Thread David Binderman
m_crtcs) return 0; crtc = priv->crtcs[pipe]; Feel free to mess this tentative patch about in any way you see fit. Regards David Binderman On Mon, Jun 13, 2016 at 4:27 PM, Rob Clark wrote: > yup, looks like we can drop the two pipe<0 checks. Care to send a patch? > >

linux-4.7-rc3/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c: 2 * pointless tests ?

2016-06-13 Thread David Binderman
Checking if unsigned variable 'pipe' is less than zero. Duplicate a few lines further down. Regards David Binderman

linux-4.7-rc3/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4836: wierd condition ?

2016-06-13 Thread David Binderman
never used. [drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4657]: (style) Variable 'tmp' is assigned a value that is never used. Regards David Binderman

drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ?

2016-05-30 Thread David Binderman
x) << 20) Regards David Binderman

linux-4.6-rc2/drivers/gpu/drm/radeon/si_dpm.c: multiple problems ?

2016-04-04 Thread David Binderman
lue that is never used. [linux-4.6-rc2/drivers/gpu/drm/radeon/si_dpm.c:4190]: (style) Variable 'voltage_found' is assigned a value that is never used. Regards David Binderman

linux-4.5/drivers/gpu/drm/gma500/oaktrail_crtc.c: 5 * uninit data ?

2016-03-14 Thread David Binderman
= clock; Suggest init all fields of local variable clock shortly after declaration, that way the function mrst_sdvo_find_best_pll can only ever return init'ed data. Regards David Binderman

linux-next/drivers/gpu/drm/rockchip/dw-mipi-dsi.c:470: poor error checking ?

2016-01-18 Thread David Binderman
Hello there, [linux-next/drivers/gpu/drm/rockchip/dw-mipi-dsi.c:470]: (style) Checking if unsigned variable 'bpp' is less than zero.     bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);     if (bpp < 0) { but   unsigned int bpp, i, pre; Suggest code rework. Regards David Binderman

[linux-4.4-rc1/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c:206: possible missing comma ?

2015-11-17 Thread David Binderman
ta Avail"     "Special Packet Sent", Missing comma means the consecutive strings are concatenated and so there are only 31 elements in the array, not the presumably intended 32. Regards David Binderman

linux-4.2-rc1/drivers/gpu/drm/radeon/cik.c:1912: dead code block ?

2015-07-07 Thread David Binderman
   blackout = RREG32(MC_SHARED_BLACKOUT_CNTL);             WREG32(MC_SHARED_BLACKOUT_CNTL, blackout | 1);         } Regards David Binderman

linux-4.1-rc1/drivers/gpu/drm/msm/dsi/dsi_host.c:1799: possible missing break ?

2015-04-27 Thread David Binderman
ase MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT:         pr_err("%s: rx ACK_ERR_PACLAGE\n", __func__);         ret = 0;     case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE:     case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE:         ret = dsi_short_read1_resp(buf, msg);         break; R