e);
543 if (err) {
^^^
This should be:
if (err <= 0) {
err = err ?: -ETIMEDOUT;
SUBMIT_ERR(context, "wait for syncobj_in timed out");
It's a bit of a headache to return 0 or negavi
we're just not running them!
It's easy enough to warn about when we have:
ret = dma_fence_wait_timeout();
and ret is an int.
In Smatch I actually had hardcoded dma_fence_wait_timeout() as only
returning up to INT_MAX because there were enough places which saved it
as an int and it triggered false positives in callers where we knew the
timeout was reasonable.
regards,
dan carpenter
it would lead to a NULL pointer
dereference.
To fix this, change the mock_request() function to return error pointers
and update all the callers to expect that.
Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context
interrupt tracking")
Signed-off-by: Dan Carpente
On Mon, Jun 16, 2025 at 11:01:08AM -0400, Rodrigo Vivi wrote:
> On Fri, Jun 06, 2025 at 12:04:49PM +0300, Dan Carpenter wrote:
> > --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> > @@ -290,7 +290,12 @@ struct sm
global breadcrumbs with per-context
interrupt tracking")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/selftests/i915_request.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c
b/drivers/gpu/drm/i915/selftes
This line is indented on tab too far. Delete the extra tab.
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
L dereference.
386
387 if (err >= 0)
388 err =
i915_sw_fence_await_dma_fence(wait,
389
&rq->fence,
390 0,
regards,
dan carpenter
)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project
cd708029e0b2869e80abe31ddb175f7c35361f90)
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
On Fri, Feb 07, 2025 at 12:02:43PM +0100, Andi Shyti wrote:
> Hi Dan,
>
> On Thu, Feb 06, 2025 at 11:17:02AM +0300, Dan Carpenter wrote:
> > The filemap_lock_folio() function doesn't return NULL, it returns error
> > pointers.
> >
> > Fixes: 25dd342f0cc8 (&q
The filemap_lock_folio() function doesn't return NULL, it returns error
pointers.
Fixes: 25dd342f0cc8 ("drm/i915/gem: convert __shmem_writeback() to folios")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
1 file changed, 1 insertion(+), 1 de
hanks!
regards,
dan carpenter
ut BPC for ICL+ is 8 */
2164 return 8;
This 8 becomes "8 * 3" in the caller.
2165 }
regards,
dan carpenter
tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202501080440.cxe0zhxj-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/skl_scaler.c:451 intel_atomic_setup_scaler()
error: uninitialized symbol 'hscale'.
drivers/gp
: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202411071102.0cmtieio-...@intel.com/
smatch warnings:
drivers/gpu/drm/display/drm_dp_mst_topology.c:6043
drm_dp_mst_dsc_aux_for_port() warn: variable dereferenced before check 'port'
(see line 6033)
patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202410100801.8jzbrn3y-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/intel_audio.c:789 intel_audio_compute_sad() error:
uninitialized symbol
-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202410010933.pzc3ug9p-...@intel.com/
New smatch warnings:
drivers/gpu/drm/i915/display/intel_display.c:4792 intel_modeset_pipe_config()
error: uninitialized symbol 'fixed_mode'.
vim +/fixed_
/202409231002.bmp89ipm-...@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.1.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
/20240915/202409151558.etiw5umu-...@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
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202408170547.2jchhuar-...@intel.com/
New smatch warnings:
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:4415 guc_kernel_context_pin()
error: uninitialized symbol 'ret'.
vim +/ret +4415 drivers/gpu/drm/i915/gt/uc/intel_guc_su
On Fri, Jul 26, 2024 at 09:17:20AM +0100, Tvrtko Ursulin wrote:
>
> On 25/07/2024 16:58, Dan Carpenter wrote:
> > On Thu, Jul 25, 2024 at 08:48:35AM +0100, Tvrtko Ursulin wrote:
> > >
> > > Hi,
> > >
> > > On 12/07/2024 22:41, Jonathan Cavitt
On Thu, Jul 25, 2024 at 10:58:08AM -0500, Dan Carpenter wrote:
> On Thu, Jul 25, 2024 at 08:48:35AM +0100, Tvrtko Ursulin wrote:
> >
> > Hi,
> >
> > On 12/07/2024 22:41, Jonathan Cavitt wrote:
> > > Prevent a NULL pointer access in intel_memory_regions_hw_
ay. "I'm not lying" at
the end. It should be the pointless patches which say, "I'm doing a
pointless thing. Don't bother backporting."
Most stable patch backports are done automatically and people have
various tools and scripts to do that. If the tools don't handle this
patch automatically then they are defective.
regards,
dan carpenter
event a NULL pointer access in intel_memory_regions_hw_probe.
> > > >
> > > > Fixes: 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup
> > > > warning")
> > > > Reported-by: Dan Carpenter
> > > > Signed-off-by: Jonathan Cavitt
>
On Wed, Jul 17, 2024 at 05:05:55PM +0200, Nirmoy Das wrote:
>
> On 7/12/2024 11:41 PM, Jonathan Cavitt wrote:
> > Prevent a NULL pointer access in intel_memory_regions_hw_probe.
> >
> > Fixes: 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning&quo
struct intel_memory_region *mem = i915->mm.regions[i];
377 u64 region_size, io_size;
regards,
dan carpenter
changes.
>
> 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
ot;Fixes:" should be used when a
> bug is fixed, but not for harmless static analyzer reports.
>
> Besides, if we want to keep the Fixes tag we should also Cc
> stable, i guess checkpatch.pl complains about it.
>
> (BTW, Cc'ed in this mail we have the inventor of the tag and he
> can confirm after having had his morning coffee :-) ).
>
Good. I keep reminding people that I invented the Fixes tag because it
is my proudest achievement. :)
No. Only use Fixes tags for bug fixes.
regards,
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
gt;display.dp_tunnel_mgr = tunnel_mgr;
797
798 return 0;
799 }
regards,
dan carpenter
.org/0day-ci/archive/20240225/202402250758.kqbqxyrz-...@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
101
102 if (!rq) {
^^^
Previously we assumed "rq" could be NULL.
103 intel_engine_dump(engine, &p,
104 "%s heartbeat not ticking\n",
regards,
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/gp
-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202402171830.n4hwr2id-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/intel_psr.c:1253
_lnl_compute_aux_less_alpm_params() error: uninitialized symbol
'silence_period'.
vim +/silence_pe
/0day-ci/archive/20240131/202401311604.1pllaxek-...@intel.com/config)
compiler: sparc64-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
.
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
;base.pd);
276
277 mutex_destroy(&ppgtt->flush);
278 }
regards,
dan carpenter
-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202310150454.s9qf86bl-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/skl_universal_plane.c:2126
gen12_plane_format_mod_supported() warn: ignoring unreachable code.
vim +2126 drivers/gpu/drm/i915/display/skl_universal_plane.c
E_EXTENSION);
380 }
381
382 intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id),
383 i915_ggtt_offset(dsb->vma) + tail);
384 }
regards,
dan carpenter
0 i915_sched_engine_put(ve->base.sched_engine);
3661 intel_engine_free_request_pool(&ve->base);
regards,
dan carpenter
4336 if (!connector || connector->base.status !=
connector_status_connected)
^
Checked too late.
4337 return 0;
4338
regards,
dan carpenter
: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202309252243.l3lv6ixf-...@intel.com/
New smatch warnings:
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:4181 guc_kernel_context_pin()
error: uninitialized symbol 'ret'.
vim +/ret +4181 drivers/gp
Move the check for "if (IS_ERR(obj))" in front of the call to
i915_gem_object_set_cache_coherency() which dereferences "obj".
Otherwise it will lead to a crash.
Fixes: 43aa755eae2c ("drm/i915/mtl: Update cache coherency setting for context
structure")
Signed-off-b
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202309060644.uwp5zw4i-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display/intel_dp.c:3779 intel_dp_vsc_sdp_pack() warn: was
&& intended here instead of ||?
vim +3779 drivers/gpu/drm/i915
On Wed, Jul 26, 2023 at 09:21:50AM +0800, Su Hui wrote:
> On 2023/7/25 13:51, Dan Carpenter wrote:
> > The reason why the first five attempts had bugs is because we are
> > trying to write it in the most complicated way possible, shifting by
> > logical not what?
> Wond
The reason why the first five attempts had bugs is because we are
trying to write it in the most complicated way possible, shifting by
logical not what?
regards,
dan carpenter
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c
b/drivers/gpu/drm/i915/display/intel_tv.c
index 36b479b46b60
;
> > + mode->clock = clock / (tv_mode->oversample != 1 ?
> > + tv_mode->oversample >> !tv_mode->progressive : 1);
>
> Seems too smart to me, why not just:
> mode->clock = clock / tv_mode->oversample;
> if (!tv_mode->progressive)
> mode->clock <<= 1;
This is nice.
regards,
dan carpenter
user doesn't
> know that a truncation has happened. So that if we save from an
> overflow here, we might encur to an unwanted access later when we
> would start using the array for the size we think is allocated.
SIZE_MAX allocations are guaranteed to fail, so the NULL check
will still return -ENOMEM.
>
> kmalloc_array(), for example, returns NULL of there is a
> multiplication overflow and I think that's a better behaviour,
> although more drastic.
It's the same either way.
regards,
dan carpenter
On Wed, Jun 07, 2023 at 06:44:54PM +, Teres Alexis, Alan Previn wrote:
> On Tue, 2023-06-06 at 21:32 +0300, Dan Carpenter wrote:
> > On Tue, Jun 06, 2023 at 06:07:19PM +, Teres Alexis, Alan Previn wrote:
> > > That was my bad, i could have sword i'd fixed th
the fixes tag is significant.
>
The Fixes tag is correct. It's definitely a bug fix.
(I invented the Fixes tag so technically that makes me the worlds #1
expert on Fixes tags).
regards,
dan carpenter
The mmap_offset_attach() function returns error pointers, it doesn't
return NULL.
Fixes: eaee1c085863 ("drm/i915: Add a function to mmap framebuffer obj")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 ++--
1 file changed, 2 insertions(+), 2 del
This should return negative -EAGAIN instead of positive EAGAIN.
Fixes: e5e1e6d28ebc ("drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet
to GSC")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 2 +-
1 file changed, 1 insertion(+),
grep line to
their scripts to solve that problem. Instead we were having the
opposite discussion the other week where the bpf people didn't want to
backport selftest stuff and Greg wanted to.
https://lore.kernel.org/all/2023052647-tacking-wince-85c5@gregkh/
regards,
dan carpenter
)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202305280453.8yzcms2i-...@intel.com/
smatch warnings:
drivers/gpu/drm/i915/display
/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202305280253.ab8brv2w-...@intel.com/
New smatch warnings:
drivers/gpu/drm/i915/display
On Fri, May 26, 2023 at 02:58:01PM +0200, Andi Shyti wrote:
> Hi Dan,
>
> On Fri, May 26, 2023 at 02:59:31PM +0300, Dan Carpenter wrote:
> > Return the error code if i915_gem_object_create_internal() fails,
> > instead of returning success.
> >
> > Fixes: cf58
intel_context_put(ce);
906 out_spin:
907 igt_spinner_fini(&spin);
908 out_restore:
909 engine->props.preempt_timeout_ms = preempt_timeout_ms;
910 if (err)
911 pr_err("%s: %s error %d\n", __func__, engine->name,
err);
912 return err;
913 }
regards,
dan carpenter
(i915);
848 out_pci_disable:
849 pci_disable_device(pdev);
--> 850 i915_probe_error(i915, "Device initialization failed (%d)\n",
ret);
Oops.
851 return ret;
852 }
regards,
dan carpenter
Return the error code if i915_gem_object_create_internal() fails,
instead of returning success.
Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gt/selftest_migrate.c | 4 +++-
1 file changed, 3 insertions(+),
m_object_create_internal(gt->i915, PAGE_SIZE);
1552 if (IS_ERR(obj)) {
1553 err = PTR_ERR(obj);
1554 goto err_ctx_lo;
1555 }
1556
regards,
dan carpenter
y_worker(data[n].worker);
416 }
417 kfree(data);
418 out_file:
419 fput(file);
420 return err;
421 }
regards,
dan carpenter
vma->vm_ops = obj->ops->mmap_ops;
1008 vma->vm_private_data = node->driver_private;
^^^^
Patch adds unchecked dereference.
1009 return 0;
1010 }
regards,
dan carpenter
2109
--> 2110 return intel_rps_get_cagf(rps, freq);
Warning.
2111 }
regards,
dan carpenter
INTEL_UC_FIRMWARE_ERROR);
820
--> 821 gt_probe_error(gt, "%s firmware %s: fetch failed %pe\n",
822intel_uc_fw_type_repr(uc_fw->type),
uc_fw->file_selected.path, ERR_PTR(err));
823 gt_info(gt, "%s firmware(s) can be downloaded from %s\n",
824 intel_uc_fw_type_repr(uc_fw->type),
INTEL_UC_FIRMWARE_URL);
825
826 release_firmware(fw);/* OK even if fw is NULL */
827 return err;
828 }
regards,
dan carpenter
On Thu, Mar 09, 2023 at 04:51:10PM +0200, Jani Nikula wrote:
> On Thu, 09 Mar 2023, Dan Carpenter wrote:
> > Hello Jani Nikula,
> >
> > This is a semi-automatic email about new static checker warnings.
> >
> > The patch 1b28c1c789d0: "drm/i915/dmc: add i9
1160 goto out;
1161
1162 seq_printf(m, "version: %d.%d\n",
DMC_VERSION_MAJOR(dmc->version),
1163 DMC_VERSION_MINOR(dmc->version));
Unchecked dereferences.
1164
regards,
dan carpenter
l_engine_reset_bh(engine, NULL);
^^
Sleeping.
638 GEM_BUG_ON(rq->fence.error != -EIO);
639
640 engine_unlock_reset_tasklet(engine);
preempt enabled again.
641
642 /* Check that we do not resubmit the held request */
regards,
dan carpenter
u, I'm
too lazy to lift a finger to help so who am I to talk...)
657 }
658
659 /* Signal that the GuC isn't running. */
660 intel_guc_sanitize(guc);
661
662 return 0;
663 }
regards,
dan carpenter
On Mon, Feb 06, 2023 at 04:59:36PM +, Tvrtko Ursulin wrote:
>
> On 06/02/2023 14:19, Dan Carpenter wrote:
> > [ Ancient code but the warning showed up again because the function was
> >renamed or something? - dan ]
> >
> > Hello Chris Wilson,
> >
&
ur
187 * usual understanding of ENOMEM.
188 */
189 if (ret == -ENOSPC)
190 ret = -ENOMEM;
191
192 return ret;
193 }
regards,
dan carpenter
, kindly add following tag where applicable
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/display/drm_dp_mst_topology.c:3316 drm_dp_add_payload_part1()
warn: missing error code 'ret'
vim +/ret +3316 drivers/gpu/drm/display/drm_dp_mst_
test robot
| Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/drm_buddy.c:501 find_continuous_blocks() error: uninitialized
symbol 'block'.
vim +/block +501 drivers/gpu/drm/drm_buddy.c
8a257b57bc11a2 xinhui pan 2022-12-18 472 static struct drm_buddy_block *
8a257b57bc11a2
The "fw" pointer is freed again in the clean up code at the end of the
function. Set it to NULL here to prevent a double free.
Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gt/uc/in
Call intel_vgpu_unpin_mm() on this error path.
Fixes: 418741480809 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after
shadow pdps settled.")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gvt/scheduler.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/dr
On Thu, Sep 22, 2022 at 01:01:48PM -0700, John Harrison wrote:
> On 9/22/2022 07:26, Dan Carpenter wrote:
> > Hello Matthew Brost,
> >
> > The patch 6b540bf6f143: "drm/i915/guc: Implement multi-lrc
> > submission" from Oct 14, 2021, leads to the follow
915_request_guc_submit(rq);
749
750 out:
751 spin_unlock(&ce->guc_state.lock);
--> 752 return err;
753 }
regards,
dan carpenter
This code uses struct_size() but it stores the result in an int so the
integer overflow checks are not effective. Record the types as size_t
to prevent the size from being truncated.
Fixes: bf3c50837506 ("drm/i915/query: Use struct_size() helper")
Signed-off-by: Dan Carpenter
---
I d
-ci/archive/20220830/202208301957.ulaot2oy-...@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c:497
The shmem_pin_map() function doesn't return error pointers, it returns
NULL.
Fixes: be1cb55a07bf ("drm/i915/gt: Keep a no-frills swappable copy of the
default context state")
Signed-off-by: Dan Carpenter
Reviewed-by: Matthew Auld
---
v2: Correct the Fixes tag. Add Matthew
On Fri, Jul 08, 2022 at 10:02:34AM +0100, Matthew Auld wrote:
> On 08/07/2022 09:40, Dan Carpenter wrote:
> > The shmem_pin_map() function doesn't return error pointers, it returns
> > NULL.
> >
> > Fixes: a0d3fdb628b8 ("drm/i915/gt: Split logical ring c
The shmem_pin_map() function returns NULL, it doesn't return error
pointers.
Fixes: 97ea656521c8 ("drm/i915/gvt: Parse default state to update reg
whitelist")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 +++---
1 file changed, 3 insertions(
The shmem_pin_map() function doesn't return error pointers, it returns
NULL.
Fixes: a0d3fdb628b8 ("drm/i915/gt: Split logical ring contexts from execlist
submission"
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gt/selftest_lrc.c | 8
1 file changed, 4 i
This function is supposed to return zero or negative error codes but it
accidentally returns true on failure.
Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and
get phases")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/display/intel_dpll_mgr.c
s_bytes_to_cpy && (!it_ccs.sg ||
883
!sg_dma_len(it_ccs.sg) {
884 err = -EINVAL;
885 break;
886 }
887
888 cond_resched();
889 } while (1);
890
891 out_ce:
892 return err;
893 }
regards,
dan carpenter
ly other places which
rely on the old behavior.
In an ideal world, with the new API the compiler would warn about
uninitialized variables, but unfortunately that warning is disabled by
default so we still have to rely on kbuild/Clang/Smatch to find the
bugs.
But hopefully the new API encourages people to write clearer code so it
prevents bugs in the long run.
regards,
dan carpenter
.c
index ddf5737c63d9..c9dffa5c40a2 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3771,6 +3771,9 @@ EXPORT_SYMBOL(kmem_cache_free_bulk);
*
* Don't free memory not originally allocated by kmalloc()
* or you will run into trouble.
+ *
+ * CHECKER information
+ * frees: $0
*/
void kfree(const void *objp)
{
regards,
dan carpenter
^^^
425
426 for (port = 0; port < r8a66597->max_root_hub; port++) {
427 if (r8a66597->root_hub[port].dev == dev) {
^^^
428 r8a66597->root_hub[port].dev = NULL;
429 break;
430 }
431 }
Printing the freed pointer in debug code is another thing people do.
regards,
dan carpenter
On Mon, Feb 28, 2022 at 10:20:28AM -0800, Joe Perches wrote:
> On Mon, 2022-02-28 at 14:24 +0300, Dan Carpenter wrote:
>
> > a multi-line indent gets curly braces for readability even though
> > it's not required by C. And then both sides would get curly braces.
>
&
een what is a related part of a
patch is a bit vague and some maintainers will ask you to add or subtract
from a patch depending on their individual tastes. I don't really have
an exact answer, but I felt like this patch needs to be subtracted from.
Especially if there is a whole chunk of the patch which can be removed,
then to me, that obviously should be in a different patch.
regards,
dan carpenter
dev_name(&_phy->dev));
> BUG();
> }
> } else {
> - sas_port_create_link(port, phy);
> - list_add_tail(&phy->port_siblings, &port->phy_list);
> + s
nse, but it's out of date now. Just delete it.
> - if (group && &group->list == &rcd->tid_group_list.list)
> + if (!group)
> goto bail_eagain;
> group = list_prepare_entry(group, &rcd->tid_group_list.list,
> list);
regards,
dan carpenter
--
> drivers/media/pci/saa7134/saa7134-alsa.c | 4 ++--
> drivers/perf/xgene_pmu.c | 13 +++--
> 3 files changed, 11 insertions(+), 10 deletions(-)
These are all bug fixes.
1) Send them as 3 separate patches.
2) Add Fixes tags.
regards,
dan carpenter
break;
> + }
> }
> - if (&req->req != _req) {
> + if (!req) {
> ep->stopped = stopped;
> spin_unlock_irqrestore(&ep->dev->lock, flags);
> return -EINVAL;
> @@ -954,7 +957,6 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request
> *_req)
> dev_dbg(ep->dev->dev, "unlink (%s) pio\n", _ep->name);
> net2272_done(ep, req, -ECONNRESET);
> }
> - req = NULL;
Another unrelated change. These are all good changes but send them as
separate patches.
> ep->stopped = stopped;
>
> spin_unlock_irqrestore(&ep->dev->lock, flags);
regards,
dan carpenter
work->vma_res = i915_vma_resource_get(vma->resource);
If "vma->resource" is NULL here then it leads to a crash in
i915_vma_resource_get().
488 work->cache_level = cache_level;
489 work->flags = bind_flags;
490
regards,
dan carpenter
^^
But now that relationship is not so clear so it causes a Smatch warning.
923 if (ret)
924 return ret;
925
926 data_rate = intel_bw_data_rate(dev_priv, new_bw_state);
927 data_rate = DIV_ROUND_UP(data_rate, 1000);
928
regards,
dan carpenter
On Fri, Jan 28, 2022 at 07:20:02AM +0100, Thomas Hellström wrote:
> On Thu, 2022-01-27 at 17:26 -0500, Rodrigo Vivi wrote:
> > On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote:
> > > This "ret" declaration shadows an existing "ret" variable
This "ret" declaration shadows an existing "ret" variable at the top of
the function. Delete it.
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/i915_vma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i
There were two error paths in __cancel_reset() which return success
instead of a negative error code as expected.
Fixes: 4e6835466771 ("drm/i915/selftests: Add a cancel request selftest that
triggers a reset")
Signed-off-by: Dan Carpenter
---
>From static analysis. I am not 1
g()
error: potential divide by zero bug '/ rec->dst_width'.
Prevent this by ensuring that the dst height and width are non-zero.
Fixes: 02e792fbaadb ("drm/i915: implement drmmode overlay support v4")
Signed-off-by: Dan Carpenter
---
>From static analysis. Not
mp;engine->sched_engine->tasklet);
1622 clear_and_wake_up_bit(bit, lock);
1623 }
1624 local_bh_enable();
1625 }
regards,
dan carpenter
cache_level,
^^
This older code dereferences it without checking.
1016 flags, work);
1017 if (err)
regards,
dan carpenter
1 - 100 of 325 matches
Mail list logo