[PATCH] drm/amdgpu: delete unnecessary check

2024-05-04 Thread Dan Carpenter
The "ret" variable is zero. No need to check. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index a0

[PATCH] drm/amd/pm: Fix error code in vega10_hwmgr_backend_init()

2024-05-04 Thread Dan Carpenter
Return -EINVAL on error instead of success. Also on the success path, return a literal zero instead of "return result;" Fixes: e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/pm/powerplay/hwmg

Re: [PATCH] staging: fb_tinylcd Alignment to open parenthesis

2024-05-04 Thread Dan Carpenter
as been sent before. Otherwise ignore checkpatch if it tells you to do something that makes the code less readable. regards, dan carpenter

Re: [PATCH] staging: fb_tinylcd Alignment to open parenthesis

2024-05-02 Thread Dan Carpenter
On Thu, May 02, 2024 at 06:52:16PM -0700, Ashok Kumar wrote: > Corrected coding style CHECK: Alignment should match open parenthesis > The original author was aligned it deliberately to improve readability. Just ignore checkpatch on this. regards, dan carpenter

Re: [PATCH] staging: fbtft:fixes unnecessary parentheses

2024-04-28 Thread Dan Carpenter
mp;& > + devcode != 0x9320) Nah, just leave it. It's a personal preference for Greg. https://lore.kernel.org/all/?q=init_display%20devcode regards, dan carpenter

[PATCH] drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()

2024-04-28 Thread Dan Carpenter
The "instance" variable needs to be signed for the error handling to work. Fixes: b34ddc71267a ("drm/amdgpu: add error handle to avoid out-of-bounds") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH] drm/amd/display: re-indent dpp401_dscl_program_isharp()

2024-04-28 Thread Dan Carpenter
at I could replace "scl_data->dscl_prog_data." with just "data->" and shorten the lines a bit. It's more readable without the line breaks. I also tried to align it so you can see what is changing on each line. Signed-off-by: Dan Carpenter --- .../display/dc

[PATCH v2] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- v2: Delete another blank line (checkpatch.pl --strict). drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:33:11PM +0200, Christian König wrote: > Am 24.04.24 um 15:20 schrieb Dan Carpenter: > > On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > > > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > > > These lines are indented

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > These lines are indented too far. Clean the whitespace. > > > > Signed-off-by: Dan Carpenter > > --- > > drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c

Re: [PATCH] staging:fbtft:fb_ili9320 Removed redundant Parentheses

2024-04-22 Thread Dan Carpenter
ct fbtft_par *par) > devcode = read_devicecode(par); > fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: > 0x%04X\n", 4) This patch is corrupt and will not apply. Read the first two paragraphs of Documentation/process/email-clients.rst. regards, dan carpenter

[bug report] drm/nouveau/disp/r535: initial support

2024-04-15 Thread Dan Carpenter
CTRL_CMD_INTERNAL_INIT_BRIGHTC_STATE_LOAD, 1495 sizeof(*ctrl)); 1496 if (IS_ERR(ctrl)) regards, dan carpenter

Re: [PATCH] treewide: Fix common grammar mistake "the the"

2024-04-11 Thread Dan Carpenter
gt; > Signed-off-by: Thorsten Blum > --- It's tricky to know which tree a patch like this would go through. We used to have a trivial tree for this stuff but I guess that didn't work. It's possible that it could go through linux-doc, but probably it has to go as a set of patches through each o

[bug report] drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference

2024-04-11 Thread Dan Carpenter
_state->current_mode); 2066 2067 dev_dbg(mhdp->dev, "%s: Enabling mode %s\n", __func__, mode->name); 2068 2069 mhdp->bridge_enabled = true; 2070 2071 out: 2072 mutex_unlock(>link_mutex); 2073 if (ret < 0) --> 2074 schedule_work(>modeset_retry_work); 2075 } regards, dan carpenter

Re: [bug report] drm/panthor: Add the scheduler logical block

2024-04-10 Thread Dan Carpenter
On Wed, Apr 10, 2024 at 03:11:52PM +0100, Steven Price wrote: > On 08/04/2024 08:35, Dan Carpenter wrote: > > Hello Boris Brezillon, > > > > Commit de8548813824 ("drm/panthor: Add the scheduler logical block") > > from Feb 29, 2024 (linux-next), leads to th

[PATCH] drm/panthor: clean up some types in panthor_sched_suspend()

2024-04-08 Thread Dan Carpenter
ut the top 32 bits which would likely be a bug if anything were stored there. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sc

[bug report] drm/panthor: Add the scheduler logical block

2024-04-08 Thread Dan Carpenter
v, csg_id, i); 1171 } 1172 } 1173 1174 group->state = new_state; 1175 } regards, dan carpenter

Re: [PATCH 7/7] drm/udl: Remove struct udl_connector

2024-04-05 Thread Dan Carpenter
/202404051359.y6aguwfi-...@intel.com/config) compiler: hppa-linux-gcc (GCC) 13.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https

[PATCH] drm: xlnx: db: fix a memory leak in probe

2024-04-04 Thread Dan Carpenter
Free "dp" before returning. Fixes: be318d01a903 ("drm: xlnx: dp: Reset DisplayPort IP") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xl

Re: [PATCH v5 02/10] PCI: Deprecate iomap-table functions

2024-04-04 Thread Dan Carpenter
.qixhnemu-...@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Dan Carpenter
On Tue, Apr 02, 2024 at 05:19:25PM +0200, Boris Brezillon wrote: > On Tue, 2 Apr 2024 17:44:18 +0300 > Dan Carpenter wrote: > > > On Tue, Apr 02, 2024 at 04:38:38PM +0200, Boris Brezillon wrote: > > > On Tue, 2 Apr 2024 07:14:11 -0700 > > > Harshit Mogalapalli

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Dan Carpenter
4bdca1150792 ("drm/panthor: Add the driver frontend block") > > I would explain that the code was correct, but the documentation didn't > match the function behavior, otherwise it feels a bit weird to have a > Fixes tag here. The code wasn't correct, it returned a mix of error pointers and NULL. So it needs a Fixes tag. regards, dan carpenter

[PATCH] drm/panthor: Fix a couple -ENOMEM error codes

2024-04-02 Thread Dan Carpenter
These error paths forgot to set the error code to -ENOMEM. Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_mmu.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH] drm/panthor: Fix off by one in panthor_fw_get_cs_iface()

2024-04-02 Thread Dan Carpenter
The ->iface.streams[csg_slot][] array has MAX_CS_PER_CSG elements so this > comparison needs to be >= to prevent an out of bounds access. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_fw.c | 2 +-

[PATCH] drm/panthor: Fix error code in panthor_gpu_init()

2024-04-02 Thread Dan Carpenter
ge <= to < 0. Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/pant

Re: [PATCH 4/8] media: platform: ti: use for_each_endpoint_of_node()

2024-03-25 Thread Dan Carpenter
: of_node_put(endpoint); return pdata; Since endpoint is NULL this was always a pointless no-op but now it's more obvious, so lets delete that. regards, dan carpenter

Re: [PATCH v5 08/11] devm-helpers: Add resource managed version of debugfs directory create function

2024-03-25 Thread Dan Carpenter
NFIG_DEBUGFS is disabled. I have written a blog about this: https://staticthinking.wordpress.com/2023/07/24/debugfs-functions-are-not-supposed-to-be-checked/ regards, dan carpenter

[PATCH] backlight: mp3309c: fix signedness bug in mp3309c_parse_fwnode()

2024-03-16 Thread Dan Carpenter
3309c: Make use of device properties") Signed-off-by: Dan Carpenter --- drivers/video/backlight/mp3309c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c index c80a1481e742..4e98e60417d2 100644 --- a/dri

[PATCH] drm/amd/display: delete unnecessary check in dcn35_set_long_vblank()

2024-03-16 Thread Dan Carpenter
"timing" is "_ctx[i]->stream->timing" where ->timing is not the first struct member of ->stream. So it's the address which points into the middle of a struct. It can't be NULL so delete the NULL check. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/dis

Re: [PATCH 3/6] backlight/omap1-bl: Replace FB_BLANK_ states with simple on/off

2024-03-14 Thread Dan Carpenter
ound for over a year. I don't care about which > patches go in as long as they remove the dependency on . I saw > that Dan has already r-b'ed the current patchset, but if you prefer I'll > adopt yours. I hadn't seen Sam's patch. It's a little bit more daring, but it's really nice code and I trust him. regards, dan carpenter

Re: [PATCH 0/6] backlight: Remove struct backlight_properties.fb_blank

2024-03-13 Thread Dan Carpenter
I was only going to comment on the staging bits but, heck, I reviewed the whole series. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
mplements/. regards, dan carpenter

Re: [PATCH 5/6] staging/fbtft: Remove reference to fb_blank

2024-03-13 Thread Dan Carpenter
t/fb_ssd1351.c | 4 +--- > drivers/staging/fbtft/fbtft-core.c | 5 ++--- Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
e an advantage to making this const? regards, dan carpenter

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-13 Thread Dan Carpenter
Thanks! Acked-by: Dan Carpenter regards, dan carpenter

[drm-intel:for-linux-next-gt 1/4] drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2680 guc_context_policy_init_v70() warn: variable dereferenced before check 'ce' (see line 2663)

2024-03-10 Thread Dan Carpenter
/20240310/202403101225.7ahejhzj-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes

Re: [PATCH] soc: qcom: pmic_glink_altmode: Use common error handling code in pmic_glink_altmode_probe()

2024-02-28 Thread Dan Carpenter
it would need a bit of adjusting for this use case but it's basically what you want. regards, dan carpenter

Re: [PATCH] staging: fbtft: Fix "space prohibited before that close parenthesis ')'" error reported by checkpatch

2024-02-21 Thread Dan Carpenter
> close parenthesis ')'". > > Signed-off-by: Kyoji Ogasawara This breaks the build. You could do a search for it. https://lore.kernel.org/all/?q=define_fbtft_write_reg regards, dan carpenter

Re: [PATCH v2] udmabuf: Fix a potential (and unlikely) access to unallocated memory

2024-02-19 Thread Dan Carpenter
On Mon, Feb 19, 2024 at 06:59:02PM +0100, Christophe JAILLET wrote: > Le 19/02/2024 à 09:37, Dan Carpenter a écrit : > > On Sun, Feb 18, 2024 at 06:46:44PM +0100, Christophe JAILLET wrote: > > > If 'list_limit' is set to a very high value, 'lsize' computation could > > &

Re: [PATCH v2] udmabuf: Fix a potential (and unlikely) access to unallocated memory

2024-02-19 Thread Dan Carpenter
an integer overflow then you kind of deserve what you get. This patch is nice for kernel hardening and making the code easier to read/audit but the real world security impact is negligible. regards, dan carpenter

Re: [PATCH 16/28] drm/i915/color: Create a transfer function color pipeline

2024-02-18 Thread Dan Carpenter
| Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202402180310.gmdixajx-...@intel.com/ New smatch warnings: drivers/gpu/drm/i915/display/intel_color.c:3867 intel_plane_tf_pipeline_init() error: 'colorop' dereferencing possible ERR_PTR() vim +/colorop +3867 drivers/gpu/drm/i915

[PATCH] drm/nouveau/mmu/r535: uninitialized variable in r535_bar_new_()

2024-02-13 Thread Dan Carpenter
If gf100_bar_new_() fails then "bar" is not initialized. Fixes: 5bf0257136a2 ("drm/nouveau/mmu/r535: initial support") Signed-off-by: Dan Carpenter --- It looks like this was intended to handle a failure from the "rm" func but "rm" can't actually fail so

[PATCH] drm/imx/dcss: fix resource size calculation

2024-02-13 Thread Dan Carpenter
The resource is inclusive of the ->start and ->end addresses so this calculation is not correct. It should be "res->end - res->start + 1". Use the resource_size() to do the calculation. Fixes: 90393c9b5408 ("drm/imx/dcss: request memory region") Signed-off-by:

[PATCH] drm/amd/display: Fix && vs || typos

2024-02-09 Thread Dan Carpenter
These ANDs should be ORs or it will lead to a NULL dereference. Fixes: fb5a3d037082 ("drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'") Fixes: 886571d217d7 ("drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'"

[bug report] drm/bridge: imx: add driver for HDMI TX Parallel Video Interface

2024-02-07 Thread Dan Carpenter
flags; 81 else if (bridge_state) This check for NULL is too late. Hopefully it can it be removed? 82 bus_flags = bridge_state->input_bus_cfg.flags; 83 regards, dan carpenter

[PATCH] drm/imagination: Fix an IS_ERR vs NULL bug in pvr_context_create()

2024-02-01 Thread Dan Carpenter
The pvr_vm_context_lookup() function returns NULL on error (not error pointers). Update the check accordingly. Fixes: d2d79d29bb98 ("drm/imagination: Implement context creation/destruction ioctls") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imagination/pvr_context.c | 4 ++

Re: [PATCH next 10/11] block: Use a boolean expression instead of max() on booleans

2024-01-29 Thread Dan Carpenter
); > > > These are bool, so it is just a bitwise or. > > > > Should be a logical or, really. And || in code. > > Not really, bitwise is fine for bool (especially for 'or') > and generates better code. For | vs || the type doesn't make a difference... It makes a difference for AND. "0x1 & 0x10" vs "0x1 && 0x10". regards, dan carpenter

[PATCH] drm/i915/gvt: Fix uninitialized variable in handle_mmio()

2024-01-26 Thread Dan Carpenter
. Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/handlers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handler

[bug report] drm/amdkfd: Export DMABufs from KFD using GEM handles

2024-01-23 Thread Dan Carpenter
if (WARN_ON_ONCE(IS_ERR(dmabuf))) 826 return PTR_ERR(dmabuf); 827 mem->dmabuf = dmabuf; 828 } 829 830 return 0; 831 } regards, dan carpenter

Re: [PATCH][next] drm/nouveau/fifo/gk104: remove redundant variable ret

2024-01-23 Thread Dan Carpenter
Let's CC Felix on this one because he might know the answer. All day long I spend looking at code like this: net/core/dev.c:724 dev_fill_forward_path() info: returning a literal zero is cleaner net/core/dev.c:732 dev_fill_forward_path() info: returning a literal zero is cleaner net/core/dev.c

Re: [PATCH][next] drm/nouveau/fifo/gk104: remove redundant variable ret

2024-01-22 Thread Dan Carpenter
On Tue, Jan 23, 2024 at 12:04:23AM +0100, Danilo Krummrich wrote: > On 1/16/24 13:31, Dan Carpenter wrote: > > On Tue, Jan 16, 2024 at 11:16:09AM +, Colin Ian King wrote: > > > The variable ret is being assigned a value but it isn't being > > > read afterwards.

Re: [PATCH][next] drm/nouveau/fifo/gk104: remove redundant variable ret

2024-01-16 Thread Dan Carpenter
vice, u64 engine) > { > u64 runm = 0; > - int ret, i; > + int i; > > - if ((ret = nvif_fifo_runlists(device))) > + if (nvif_fifo_runlists(device)) > return runm; Could we return a literal zero here? Otherwise, I'm surprised this doesn't trigger a static checker warning. regards, dan carpenter

[PATCH] drm/nouveau/disp/r535: fix error code in r535_dp_aux_xfer()

2024-01-12 Thread Dan Carpenter
This code was shuffled around but the return wasn't updated. It should return "ret" instead of "ctrl". Fixes: 4ae3a20102b2 ("nouveau/gsp: don't free ctrl messages on errors") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c | 2 +

[PATCH] drm/amdgpu: fix return value in aca_bank_hwip_is_matched()

2024-01-12 Thread Dan Carpenter
The aca_bank_hwip_is_matched() function is type bool. This error path return -EINVAL which is cast to true, but it should return false instead. Fixes: 22a4fa4709e3 ("drm/amdgpu: implement RAS ACA driver framework") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/amdgpu

[bug report] backlight: hx8357: Convert to agnostic GPIO API

2024-01-10 Thread Dan Carpenter
lcdev); 629 if (ret) { 630 dev_err(>dev, "Couldn't initialize panel\n"); 631 return ret; 632 } 633 634 dev_info(>dev, "Panel probed\n"); 635 636 return 0; 637 } regards, dan carpenter

[PATCH] drm/xe: clean up type of GUC_HXG_MSG_0_ORIGIN

2024-01-08 Thread Dan Carpenter
The GUC_HXG_MSG_0_ORIGIN definition should be unsigned. Currently it is defined as INT_MIN. This doesn't cause a problem currently but it's still worth cleaning up. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xe/abi/guc_messages_abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[bug report] drm/amdgpu/vpe: enable vpe dpm

2024-01-05 Thread Dan Carpenter
or); 67 68 uint16_t remainder; 69 regards, dan carpenter

[PATCH] drm/xe/device: clean up on error in probe()

2024-01-05 Thread Dan Carpenter
This error path should clean up before returning. Smatch detected this bug: drivers/gpu/drm/xe/xe_device.c:487 xe_device_probe() warn: missing unwind goto? Fixes: 4cb12b71923b ("drm/xe/xe2: Determine bios enablement for flat ccs on igfx") Signed-off-by: Dan Carpenter --- Speeking

[bug report] drm/xe: Introduce a new DRM driver for Intel GPUs

2024-01-05 Thread Dan Carpenter
holds it now */ 2261 drm_gem_object_put(>ttm.base); 2262 if (!err) 2263 args->handle = handle; 2264 return err; 2265 } regards, dan carpenter

[bug report] drm/xe: shift wrapping in xe_gem_create_ioctl()

2024-01-05 Thread Dan Carpenter
hift wrapping. 1917 1918 if (args->flags & DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM) { 1919 if (XE_IOCTL_DBG(xe, !(bo_flags & XE_BO_CREATE_VRAM_MASK))) 1920 return -EINVAL; 1921 1922 bo_flags |= XE_BO_NEEDS_CPU_ACCESS; 1923 } 1924 regards, dan carpenter

[PATCH] drm/xe/selftests: Fix an error pointer dereference bug

2024-01-05 Thread Dan Carpenter
Check if "bo" is an error pointer before calling xe_bo_lock() on it. Fixes: d6abc18d6693 ("drm/xe/xe2: Modify xe_bo_test for system memory") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xe/tests/xe_bo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --g

[PATCH] drm/xe: unlock on error path in xe_vm_add_compute_exec_queue()

2024-01-05 Thread Dan Carpenter
Drop the ">lock" before returning. Fixes: 24f947d58fe5 ("drm/xe: Use DRM GPUVM helpers for external- and evicted objects") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xe/xe_vm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/d

Re: [PATCH 1/3] drm: property: One function call less in drm_property_create() after error detection

2024-01-04 Thread Dan Carpenter
ation details out. > > That doesn't answer my question. > > Without seeing the actual Coccinelle report, I'll assume that it didn't > actually call for this change. This isn't one of the Coccinelle scripts which ship with the kernel, it's something that Markus wrote himself. regards, dan carpenter

[bug report] drm/xe: missing access_ok() in ioctl

2024-01-04 Thread Dan Carpenter
retry: 172 if (!xe_vm_in_lr_mode(vm) && xe_vm_userptr_check_repin(vm)) { 173 err = down_write_killable(>lock); 174 write_locked = true; 175 } else { regards, dan carpenter

Re: [PATCH 08/11] nouveau/gsp: don't free ctrl messages on errors

2024-01-04 Thread Dan Carpenter
On Thu, Jan 04, 2024 at 10:41:50AM +1000, Dave Airlie wrote: > On Thu, 4 Jan 2024 at 00:47, Dan Carpenter wrote: > > > > Hi Dave, > > > > kernel test robot noticed the following build warnings: > > > > https://git-scm.com/docs/git-format-patch#_base_tree_

[bug report] drm/xe: Introduce a new DRM driver for Intel GPUs

2024-01-04 Thread Dan Carpenter
", false" so much. 3) You could mark the _interruptible version as must check and the other version could be a void function. 4) Smatch could parse it automatically. I can write some custom code to parse the existing function but it's a small hassle for me. regards, dan carpenter

Re: [PATCH 08/11] nouveau/gsp: don't free ctrl messages on errors

2024-01-03 Thread Dan Carpenter
robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202312271917.55xudmdc-...@intel.com/ New smatch warnings: drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:659 r535_gsp_rpc_rm_ctrl_push() warn: passing zero to 'PTR_ERR' drivers/gpu/drm/nouveau/nvkm/engine/disp/r535.c:1063

Re: [PATCH 2/2] drm/imagination: Fix error path in pvr_vm_create_context

2023-12-13 Thread Dan Carpenter
Thanks so much. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH v4 06/10] drm/panel: Add Synaptics R63353 panel driver

2023-12-06 Thread Dan Carpenter
), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202312070214.eyi9t4eq-...@intel.com/ smatch warnings: drivers/gpu/drm/panel/panel-synaptics-r63353.c:132 r63353_panel_activate() warn: missing unwind goto? vim +132 drivers

[PATCH] drm/bridge: nxp-ptn3460: simplify some error checking

2023-12-06 Thread Dan Carpenter
meter can never be zero, but even if it were, then I feel like this would still be the best way to write it. Fixes: 914437992876 ("drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking") Signed-off-by: Dan Carpenter --- This is not really a bug fix but I added a Fixes tag because

[PATCH] drm/imagination: Move dereference after NULL check in pvr_mmu_backing_page_init()

2023-12-06 Thread Dan Carpenter
This code dereferences "page->pvr_dev" and then checked for NULL on the next line. Re-order it to avoid a potential NULL pointer dereference. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imaginatio

[bug report] drm/imagination: Implement MIPS firmware processor and MMU support

2023-12-06 Thread Dan Carpenter
023/07/25/wsign-compare-is-garbage/ You didn't ask for rants... No one ever asks for rants... 205 WRITE_ONCE(mips_data->pt[pfn], 0); 206 207 pvr_mmu_flush_request_all(pvr_dev); 208 WARN_ON(pvr_mmu_flush_exec(pvr_dev, true)); 209 210 return err; 211 } regards, dan carpenter

[bug report] drm/imagination: Implement firmware infrastructure and META FW support

2023-12-06 Thread Dan Carpenter
everything is set up. It's complicated to review. So I kind of always think that people should manually kfree() things in their allocation functions and then do a kref_init() at the end. 635 636 return ERR_PTR(err); 637 } regards, dan carpenter

[bug report] drm/imagination: Implement firmware infrastructure and META FW support

2023-12-06 Thread Dan Carpenter
ROGUE_CR_MTS_BGCTX_THREAD1_DM_ASSOC, 219ROGUE_CR_MTS_BGCTX_THREAD1_DM_ASSOC_MASKFULL & 220 ROGUE_CR_MTS_BGCTX_THREAD1_DM_ASSOC_DM_ASSOC_CLRMSK); 221 222 /* Extra Idle checks. */ 223 err = pvr_cr_poll_reg32(pvr_dev, ROGUE_CR_BIF_STATUS_MMU, 0, regards, dan carpenter

[PATCH] drm/msm/dp: Fix platform_get_irq() check

2023-12-06 Thread Dan Carpenter
The platform_get_irq() function returns negative error codes. It never returns zero. Fix the check accordingly. Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++-- 1 file

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Dan Carpenter
On Tue, Dec 05, 2023 at 03:04:49PM +0100, Robert Foss wrote: > On Tue, Dec 5, 2023, 15:01 Dan Carpenter wrote: > > > On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > > > On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > > > > The i2c_ma

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Dan Carpenter
On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > > The i2c_master_send/recv() functions return negative error codes or the > > number of bytes that were able to be sent/received. This code has > > two p

Re: Kunit drm_test_check_plane_state: EXPECTATION FAILED at drivers/gpu/drm/tests/drm_plane_helper_test.c:123

2023-12-05 Thread Dan Carpenter
day for some > unrelated reason, so it should be fixed in next-20231205 onward. Sorry, that's a bummer that these patches were reverted. :( The whole episode was a bit unfortunate... Qualcom has been working on those patches for a year. They must not be using kunit testing as part of their QC... It's some kind of communication failure on our part. Hopefully we can get this all sorted out and re-apply the patches soon. regards, dan carpenter

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-04 Thread Dan Carpenter
On Mon, Dec 04, 2023 at 02:53:05PM +0100, Neil Armstrong wrote: > On 04/12/2023 13:29, Dan Carpenter wrote: > > The i2c_master_send/recv() functions return negative error codes or the > > number of bytes that were able to be sent/received. This code has > > two problems. 1)

[bug report] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-12-04 Thread Dan Carpenter
eturn 0; 545 } 546 547 if (kiq_ring->sched.ready && !adev->job_hang) 548 r = amdgpu_ring_test_helper(kiq_ring); 549 spin_unlock(>ring_lock); regards, dan carpenter

[PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-04 Thread Dan Carpenter
send/receive then we should return a negative error code but this code returns success. Fixes: a9fe713d7d45 ("drm/bridge: Add PTN3460 bridge driver") Cc: sta...@vger.kernel.org Signed-off-by: Dan Carpenter --- This is from static analysis and code review. It's always a concern wh

[PATCH] drm/imagination: fix off by one in pvr_vm_mips_init() error handling

2023-11-29 Thread Dan Carpenter
0). At that point we know that all the elements thus far are initialized so we don't need to have NULL checks. Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and MMU support") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imagination/pvr_vm_mips.c | 11 +

[bug report] drm/imagination: Implement firmware infrastructure and META FW support

2023-11-29 Thread Dan Carpenter
OGUE_CR_MTS_SCHEDULE_DM_CLRMSK); ^^ PVR_FWIF_DM_GP is zero. 278 279 out_unlock: 280 mutex_unlock(_ccb->lock); 281 } regards, dan carpenter

[PATCH 2/2] drm/imagination: Fix IS_ERR() vs NULL bug in pvr_request_firmware()

2023-11-29 Thread Dan Carpenter
The pvr_build_firmware_filename() function returns NULL on error. It doesn't return error pointers. Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imagination/pvr_device.c | 4 ++-- 1 file changed, 2

[PATCH 1/2] drm/imagination: Fix error codes in pvr_device_clk_init()

2023-11-29 Thread Dan Carpenter
There is a cut and paste error so this code returns the wrong variable. Fixes: 1f88f017e649 ("drm/imagination: Get GPU resources") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imagination/pvr_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

Re: [bug report] backlight: mp3309c: Add support for MPS MP3309C

2023-11-29 Thread Dan Carpenter
On Wed, Nov 29, 2023 at 11:12:29AM +, Flavio Suligoi wrote: > Hi Dan, > > Can I add the "Reported-by" tag, with your name, in my 2nd vers of > the commit to fix this bug? Yeah. Thanks! If the bug report is sent to a public mailing list then there is no need to ask. regards, dan carpenter

[bug report] backlight: mp3309c: Add support for MPS MP3309C

2023-11-27 Thread Dan Carpenter
pdata->default_brightness = pdata->max_brightness; 294 if (pdata->default_brightness > pdata->max_brightness) { 295 dev_err(chip->dev, 296 "default brightness exceeds max brightness\n"); 297 pdata->default_brightness = pdata->max_brightness; 298 } 299 300 /* regards, dan carpenter

[PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send()

2023-11-27 Thread Dan Carpenter
This unlock doesn't belong here and it leads to a double unlock in the caller, r535_gsp_rpc_push(). Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 +--- 1 file changed, 1

Re: [Freedreno] [PATCH v2] drm/msm: remove unnecessary NULL check

2023-11-20 Thread Dan Carpenter
On Thu, Nov 16, 2023 at 01:05:52PM -0800, Abhinav Kumar wrote: > > > On 11/1/2023 12:23 PM, Abhinav Kumar wrote: > > > > > > On 10/13/2023 1:25 AM, Dan Carpenter wrote: > > > This NULL check was required when it was added, but we shuffle

Re: [RFC] drm/tests: annotate intentional stack trace in drm_test_rect_calc_hscale()

2023-11-15 Thread Dan Carpenter
know to look for WARN(), lockdep, and KASAN. What other bugs formats do we have? Probably someone like the syzbot devs have already has written a script like this? regards, dan carpenter

[PATCH] nouveau/gsp/r535: Fix a NULL vs error pointer bug

2023-11-07 Thread Dan Carpenter
pport for booting GSP-RM") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index e31f9641114b..f8

[PATCH] nouveau/gsp/r535: uninitialized variable in r535_gsp_acpi_mux_id()

2023-11-07 Thread Dan Carpenter
The if we hit the "continue" statement on the first iteration through the loop then "handle_mux" needs to be set to NULL so we continue looping. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Dan Carpenter --- drivers/g

[PATCH] drm/rect: only print the stack trace in drm_calc_scale() once

2023-11-02 Thread Dan Carpenter
://lore.kernel.org/all/CA+G9fYuA643RHHpPnz9Ww7rr3zV5a0y=7_uFcybBSL=qp_s...@mail.gmail.com/ Signed-off-by: Dan Carpenter --- drivers/gpu/drm/drm_rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_rect.c b/drivers/gpu/drm/drm_rect.c index 85c79a38c13a

Re: [RFC] drm/tests: annotate intentional stack trace in drm_test_rect_calc_hscale()

2023-11-01 Thread Dan Carpenter
Let me add Richard to the CC list. See lore for more details. https://lore.kernel.org/all/CA+G9fYuA643RHHpPnz9Ww7rr3zV5a0y=7_uFcybBSL=qp_s...@mail.gmail.com/ On Tue, Oct 31, 2023 at 09:57:48PM +0530, Naresh Kamboju wrote: > On Mon, 30 Oct 2023 at 14:33, Dan Carpenter wrote: > > &g

[RFC] drm/tests: annotate intentional stack trace in drm_test_rect_calc_hscale()

2023-10-30 Thread Dan Carpenter
t; message at the end. I haven't actually tested this patch... Daniel, do you have a list of intentional stack traces we could annotate? Signed-off-by: Dan Carpenter --- drivers/gpu/drm/tests/drm_rect_test.c | 2 ++ include/kunit/test.h | 3 +++ 2 files changed, 5 insertions(+)

Re: [bug report] drm: Warn about negative sizes when calculating scale factor

2023-10-27 Thread Dan Carpenter
On Fri, Oct 20, 2023 at 05:11:24PM +0300, Dan Carpenter wrote: > On Fri, Oct 20, 2023 at 02:55:37PM +0300, Ville Syrjälä wrote: > > On Fri, Oct 20, 2023 at 02:39:04PM +0300, Dan Carpenter wrote: > > > On Wed, Oct 18, 2023 at 05:17:42PM +0300, Dan Carpenter wrote: > > > &

[PATCH 2/2] fbdev/imsttfb: fix a resource leak in probe

2023-10-27 Thread Dan Carpenter
I've re-written the error handling but the bug is that if init_imstt() fails we need to call iounmap(par->cmap_regs). Fixes: c75f5a550610 ("fbdev: imsttfb: Fix use after free bug in imsttfb_probe") Signed-off-by: Dan Carpenter --- drivers/video/fbdev/i

[PATCH 1/2] fbdev/imsttfb: fix double free in probe()

2023-10-27 Thread Dan Carpenter
The init_imstt() function calls framebuffer_release() on error and then the probe() function calls it again. It should only be done in probe. Fixes: 518ecb6a209f ("fbdev: imsttfb: Fix error path of imsttfb_probe()") Signed-off-by: Dan Carpenter --- drivers/video/fbdev/imsttfb.c | 6

Re: [PATCH v2] vga_switcheroo: Fix impossible judgment condition

2023-10-26 Thread Dan Carpenter
uot;) > Signed-off-by: Su Hui > --- > v2: > - add check of VGA_SWITCHEROO_UNKNOWN_ID(Dan's suggestion). > > By the way, all functions of 'get_client_id' will never return error code > or VGA_SWITCHEROO_UNKNOWN_ID,should we remove this check or keep it for > future. >

  1   2   3   4   5   6   7   8   9   10   >