This code returns 1 on error instead of a negative error. It leads to
an Oops in the caller. A second problem is that the check for
"if (ret != -ENODATA)" cannot be true because "ret" is set to 1.
Fixes: 5785dd7a8ef0 ("drm/msm: Fix duplicate gpu node in icc sum
6ed ("drm/msm: Initial add DSI connector support")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/drm/msm/dsi/dsi_host.c
index c86b5090fae6..42073a5620
This disables a lock which wasn't enabled and it does not disable
the first lock in the array.
Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Return an error code if msm_dsi_manager_validate_current_config().
Don't return success.
Fixes: 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
rates should be unsigned long. (I don't remember why).
730 return 0;
731 }
regards,
dan carpenter
U_DEBUG("%s created for pipe:%u id:%u virtual:%u\n",
pdpu->pipe_name,
1672 pipe, plane->base.id,
master_plane_id);
1673 return plane;
1674
1675 clean_sspp:
1676 if (pdpu && pdpu->pipe_hw)
1677 dpu_hw_sspp_destroy(pdpu->pipe_hw);
1678 clean_plane:
--> 1679 kfree(pdpu);
1680 return ERR_PTR(ret);
1681 }
regards,
dan carpenter
The error code is stored in "dev_priv", not "dev". The "dev" pointer
isn't initialized yet.
Fixes: c2f17e60cbe1 ("drm/gma500: Embed struct drm_device in struct
drm_psb_private")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/gma500/psb_drv.c |
) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/drm_hdcp.c:1208 drm_hdcp_helper_enable_hdcp() error:
uninitialized symbol 'check_link_interval'.
Old smatch warnings:
drivers/gpu
quot; directly.
Fixes: 96fe6a2109db ("[PATCH] fbdev: Add VESA Coordinated Video Timings (CVT)
support")
Signed-off-by: Dan Carpenter
---
drivers/video/fbdev/core/fbcvt.c | 53 +---
1 file changed, 21 insertions(+), 32 deletions(-)
diff --git a/drivers/video/fbd
ret = vmw_fence_obj_wait(fence, arg->lazy, true, timeout);
This is a new Smatch warning. To try figure out places which can
trigger sysbot "task hung" warnings. I don't know if an upper bound on
timeout is appropriate here because this is new experimental check...
825
826 out:
827 ttm_base_object_unref();
regards,
dan carpenter
On Mon, Aug 30, 2021 at 11:25:51PM +0900, Tetsuo Handa wrote:
> On 2021/08/30 22:47, Dan Carpenter wrote:
> > On Mon, Aug 30, 2021 at 10:37:31PM +0900, Tetsuo Handa wrote:
> >> On 2021/08/30 22:00, Dan Carpenter wrote:
> >>>>> diff --git a/drivers/video/fbde
On Mon, Aug 30, 2021 at 10:37:31PM +0900, Tetsuo Handa wrote:
> On 2021/08/30 22:00, Dan Carpenter wrote:
> >>> diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
> >>> index e2757ff1c23d..e483a3f5fd47 100644
> >>> --- a/drivers/vi
this code would be easier to understand if the
integer overflow check were pull out separately and done first:
if (array_size(vxres, vyres) >= UINT_MAX)
return -EINVAL;
if (vxres * vyres > maxmem) {
...
The UINT_MAX is because vxres and vyres are u32.
This would maybe be the first time anyone ever did an integer overflow
check like this in the kernel. It's a new idiom.
regards,
dan carpenter
If the intel_engine_create_pinned_context() function returns an error
pointer, then dereferencing "ce" will Oops. Use "vm" instead of
"ce->vm".
Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration")
Signed-off-by: Dan Carpenter
---
drivers/gpu
The vmw_gmrid_man_get_node() function calls vmw_host_printf() while
holding a spinlock so these functions need to be atomic. Generally,
no one expects printf() functions to sleep.
Fixes: cfdc3458db8a ("drm/vmwgfx: Be a lot more flexible with MOB limits")
Signed-off-by: Dan
mapping,
> pgoff,
>
> FGP_ACCESSED);
> - if (IS_ERR(hpage)) {
> - ret = PTR_ERR(hpage);
> + if (!hpage) {
> + ret = -EINVAL;
> goto err;
> }
> }
>
> I am not sure about ret value in case of failure, so I am looking for any
> reviews :)
You're right. Smatch is sort of supposed to warn about this but
pagecache_get_page() is too complicated.
regards,
dan carpenter
Check whether the kcalloc() fails and return -ENOMEM if it does.
Fixes: eeba0b9046fc ("drm/amdgpu: create amdgpu_vkms (v4)")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amd
ize holes.
regards,
dan carpenter
Huh... Vmware is blocking email to Thomas?
"Recipient is not authorized to accept external mail"
This seems like potentially a serious bug and I don't know how to report
it.
regards,
dan carpenter
On Thu, Jul 29, 2021 at 05:39:45PM +0300, Dan Carpenter wrote:
> Hello Tho
if (ret == VM_FAULT_RETRY && !(vmf->flags &
FAULT_FLAG_RETRY_NOWAIT))
482 return ret;
483
484 out_unlock:
485 dma_resv_unlock(bo->base.resv);
486
487 return ret;
488 }
regards,
dan carpenter
-1ubuntu1~20.04) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
samples/vfio-mdev/mbochs.c:566 mbochs_probe() error: we previously assumed
'mdev_state' could be null (see line 524)
samples/vfio-mdev
On Wed, Jul 28, 2021 at 04:33:18PM -0700, Kees Cook wrote:
>
> Ah-ha, got it:
>
Thanks, Kees! Nice!
regards,
dan carpenter
On Thu, Jul 29, 2021 at 07:56:27AM +0200, Greg Kroah-Hartman wrote:
> On Wed, Jul 28, 2021 at 11:37:30PM +0200, David Sterba wrote:
> > On Wed, Jul 28, 2021 at 02:37:20PM -0700, Bart Van Assche wrote:
> > > On 7/28/21 2:14 AM, Dan Carpenter wrote:
> > > > On Wed, Ju
lore.kernel.org/lkml/fbddb15a-6e46-3f21-23ba-b18f66e34...@suse.com/)
In the kernel we don't care about portability so much. Use the = { }
GCC extension. If the first member of the struct is a pointer then
Sparse will complain about = { 0 }.
I had a patch to make checkpatch.pl complain about = { 0 }; but my
system died and I haven't transfered my postponed messages to the new
system...
regards,
dan carpenter
: Add support for KeemBay Display")
> Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver")
> Cc: Dan Carpenter
> Signed-off-by: Anitha Chrisanthus
> ---
> drivers/gpu/drm/kmb/kmb_drv.c | 9 ++---
> drivers/gpu/drm/kmb/kmb_dsi.c | 9 +--
On Tue, Jul 27, 2021 at 01:57:53PM -0700, Kees Cook wrote:
> In preparation for FORTIFY_SOURCE performing compile-time and run-time
> field bounds checking for memcpy(), memmove(), and memset(), avoid
> intentionally writing across neighboring fields.
>
> The it_present member of struct
et(dev);
> +
> + return 0;
> +
> +err:
> + kfree(ldev);
I'm sorry, in the earlier version I told you to add this kfree() but
this is devm_ allocated so the kfree() is wrong and will lead to a
double free. My bad. That's on me.
> + drm_err(dev, "failed to initialize drm driver: %d\n", ret);
> + return ret;
> +}
regards,
dan carpenter
loongson_modeset_init(struct loongson_device *ldev)
> +{
> + struct drm_encoder *encoder;
> + struct drm_connector *connector;
> + int i;
> + u32 ret;
Same.
> +
> + ldev->dev->mode_config.allow_fb_modifiers = true;
regards,
dan carpenter
struct loongson_crtc *lcrtc = to_loongson_crtc(crtc);
> + struct loongson_device *ldev = lcrtc->ldev;
> + u32 reg_val;
> +
> + if (lcrtc->crtc_id) {
> + reg_val = ls7a_mm_rreg(ldev, FB_INT_REG);
> + reg_val |= FB_VSYNC1_ENABLE;
> +
diff --git a/drivers/gpu/drm/loongson/loongson_plane.c
> b/drivers/gpu/drm/loongson/loongson_plane.c
> new file mode 100644
> index ..b8c247d1ce09
> --- /dev/null
> +++ b/drivers/gpu/drm/loongson/loongson_plane.c
> @@ -0,0 +1,102 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +
> +#include "loongson_drv.h"
> +
> +static void loongson_plane_atomic_update(struct drm_plane *plane,
> + struct drm_atomic_state *state)
> +{
> + struct loongson_crtc *lcrtc;
> + struct loongson_device *ldev;
> + struct drm_plane_state *lstate = plane->state;
> + u32 gpu_addr = 0;
> + u32 fb_addr = 0;
> + u32 reg_val = 0;
> + u32 reg_offset;
> + u32 pitch;
> + u8 depth;
> + u32 x, y;
> +
> + if (!lstate->crtc || !lstate->fb)
> + return;
> +
> + pitch = lstate->fb->pitches[0];
> + lcrtc = to_loongson_crtc(lstate->crtc);
> + ldev = lcrtc->ldev;
> + reg_offset = lcrtc->reg_offset;
> + x = lstate->crtc->x;
> + y = lstate->crtc->y;
> + depth = lstate->fb->format->cpp[0] << 3;
> +
> + gpu_addr = loongson_gpu_offset(lstate);
> + reg_val = (pitch + 255) & ~255;
> + ls7a_mm_wreg(ldev, FB_STRI_REG + reg_offset, reg_val);
> +
> + switch (depth) {
> + case 12 ... 16:
> + fb_addr = gpu_addr + y * pitch + ALIGN(x, 64) * 2;
> + break;
> + case 24 ... 32:
> + default:
> + fb_addr = gpu_addr + y * pitch + ALIGN(x, 64) * 4;
> + break;
> + }
> +
> + ls7a_mm_wreg(ldev, FB_ADDR0_REG + reg_offset, fb_addr);
> + ls7a_mm_wreg(ldev, FB_ADDR1_REG + reg_offset, fb_addr);
> + reg_val = lcrtc->cfg_reg | CFG_ENABLE;
> + ls7a_mm_wreg(ldev, FB_CFG_REG + reg_offset, reg_val);
> +}
> +
> +static const uint32_t loongson_formats[] = {
> + DRM_FORMAT_RGB565,
> + DRM_FORMAT_RGB888,
> + DRM_FORMAT_XRGB,
> + DRM_FORMAT_ARGB,
> +};
> +
> +static const uint64_t loongson_format_modifiers[] = { DRM_FORMAT_MOD_LINEAR,
> + DRM_FORMAT_MOD_INVALID };
> +
> +static const struct drm_plane_funcs loongson_plane_funcs = {
> + .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> + .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> + .destroy = drm_plane_cleanup,
> + .disable_plane = drm_atomic_helper_disable_plane,
> + .reset = drm_atomic_helper_plane_reset,
> + .update_plane = drm_atomic_helper_update_plane,
> +};
> +
> +static const struct drm_plane_helper_funcs loongson_plane_helper_funcs = {
> + .prepare_fb = drm_gem_vram_plane_helper_prepare_fb,
> + .cleanup_fb = drm_gem_vram_plane_helper_cleanup_fb,
> + .atomic_update = loongson_plane_atomic_update,
> +};
> +
> +int loongson_plane_init(struct loongson_crtc *lcrtc)
> +{
> + struct loongson_device *ldev;
> + int crtc_id;
> + int ret;
> +
> + ldev = lcrtc->ldev;
> + crtc_id = lcrtc->crtc_id;
> +
> + lcrtc->plane = devm_kzalloc(ldev->dev->dev, sizeof(*lcrtc->plane),
Why do we use ->dev->dev here and ->dev for drm_universal_plane_init()?
> + GFP_KERNEL);
> + if (!lcrtc->plane)
> + return -ENOMEM;
> +
> + ret = drm_universal_plane_init(ldev->dev, lcrtc->plane, BIT(crtc_id),
> +_plane_funcs, loongson_formats,
> +ARRAY_SIZE(loongson_formats),
> +loongson_format_modifiers,
> +DRM_PLANE_TYPE_PRIMARY, NULL);
> + if (ret) {
> + DRM_ERROR("fail to init planed crtc %d\n", crtc_id);
> + return ret;
> + }
> +
> + drm_plane_helper_add(lcrtc->plane, _plane_helper_funcs);
> +
> + return 0;
> +}
regards,
dan carpenter
+int loongson_dc_gpio_init(struct loongson_device *ldev)
> +{
> + int ret;
> + struct gpio_chip *chip;
struct gpio_chip *chip = >chip;
int ret;
> +
> + chip = >chip;
> + chip->label = "ls7a-dc-gpio";
> + chip->base = LS7A_DC_GPIO_BASE;
&g
If copy_to_user() fails then this should return -EFAULT instead of
-EINVAL.
Fixes: 9b790694a031 ("drm/amdgpu: RAS EEPROM table is now in debugfs")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletion
This error path needs to unlock before returning. While we're at it,
the correct error code from copy_to_user() failure is -EFAULT, not
-EINVAL.
Fixes: 9b790694a031 (""drm/amdgpu: RAS EEPROM table is now in debugfs)
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/
y changing the < to != which works regardless of type
promotion.
Fixes: 6cda0af81a50 ("drm/amdgpu: Fixes to the AMDGPU EEPROM driver")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dri
of "buf_size" to int.
Fixes: 79beb6114014 ("drm/amdgpu: Optimize EEPROM RAS table I/O")
Signed-off-by: Dan Carpenter
---
It's hard for me to tell the exact upper bound that "buf_size" can be,
but if it's over USHRT_MAX then we are well toasted.
drivers/gpu/drm/amd
which involves dropping some locks), if we see any other
> error then the loop is terminated with ww->loop = false, which then
> hits the goto err_out.
>
Ah, yeah, you're right. False positive.
I hadn't looked at this code in context (I only had reviewed the email).
Now that I've pulled the tree and looked at the code, then I'm sort of
surprised that Smatch generates a warning... I will investigate some
more. Thanks!
regards,
dan carpenter
On Fri, Jul 02, 2021 at 02:07:27PM +0300, Dan Carpenter wrote:
> On Fri, Jul 02, 2021 at 11:32:45AM +0100, Matthew Auld wrote:
> > On Fri, 2 Jul 2021 at 09:45, Dan Carpenter wrote:
> > > cf586021642d80 Chris Wilson 2021-06-17 84
> > > cf586021642d80 Chris Wilson 2021
On Fri, Jul 02, 2021 at 11:32:45AM +0100, Matthew Auld wrote:
> On Fri, 2 Jul 2021 at 09:45, Dan Carpenter wrote:
> >
> > tree: git://anongit.freedesktop.org/drm-intel drm-intel-gt-next
> > head: 5cd57f676bb946a00275408f0dd0d75dbc466d25
> > commit: cf586021642d8017
(Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/i915/selftests/intel_memory_region.c:227 igt_mock_reserve()
error: 'mem' dereferencing possible ERR_PTR()
vim +/mem
9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized
symbol 'rq'.
drivers/gpu/drm/i915/gt/selftest_migrate.c:113 copy
ebian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/dma-buf/dma-buf.c:290 dma_buf_poll() error: uninitialized symbol
'fence_excl'.
vim +/fence_excl +290 drivers/dma-buf/dma-
->crtc == crtc)
> + break;
> }
>
> if (!connector) {
This test is wrong/impossible. It should be:
if (list_entry_is_head(connector, _config->connector_list,
head)) {
regards,
dan carpenter
There is a reversed if statement in amdgpu_preempt_mgr_new() so it
always returns -ENOMEM.
Fixes: 09b020bb05a5 ("Merge tag 'drm-misc-next-2021-06-09' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_pre
On Mon, Jun 14, 2021 at 01:43:27PM +0300, Dan Carpenter wrote:
> If nvkm_object_init() fails then we should not call nvkm_object_fini()
> because it results in calling object->func->fini(object, suspend) twice.
> Once inside the nvkm_object_init() function and once inside the
>
On Wed, Jun 16, 2021 at 01:00:38PM +0200, Christian König wrote:
>
>
> Am 16.06.21 um 11:36 schrieb Dan Carpenter:
> > On Wed, Jun 16, 2021 at 10:47:14AM +0200, Christian König wrote:
> > >
> > > Am 16.06.21 um 10:37 schrieb Dan Carpenter:
> > >
On Wed, Jun 16, 2021 at 10:47:14AM +0200, Christian König wrote:
>
>
> Am 16.06.21 um 10:37 schrieb Dan Carpenter:
> > On Wed, Jun 16, 2021 at 08:46:33AM +0200, Christian König wrote:
> > > Sending the first message didn't worked, so let's try again.
> > >
>
On Wed, Jun 16, 2021 at 08:46:33AM +0200, Christian König wrote:
> Sending the first message didn't worked, so let's try again.
>
> Am 16.06.21 um 08:30 schrieb Dan Carpenter:
> > There are three bugs here:
> > 1) We need to call unpopulate() if ttm_tt_populate() succeeds
yway as we already have the value
for "new_mem".
3) The (!new_man->use_tt) condition is reversed.
Fixes: ba4e7d973dd0 ("drm: Add the TTM GPU memory manager subsystem.")
Signed-off-by: Dan Carpenter
---
This is from reading the code and I can't swear that I have understood
The ttm_bo_init_reserved() function calls ttm_bo_put(bo) which calls
nouveau_bo_del_ttm() which frees the "nvbo.bo" so the nouveau_bo_ref()
call leads to a double free.
Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object")
Signed-off-by: Dan Car
On Mon, Jun 14, 2021 at 01:43:27PM +0300, Dan Carpenter wrote:
> If nvkm_object_init() fails then we should not call nvkm_object_fini()
> because it results in calling object->func->fini(object, suspend) twice.
> Once inside the nvkm_object_init() function and once inside the
>
with handle")
Signed-off-by: Dan Carpenter
---
This is something that I spotted while looking for reference counting
bugs. I have tried running it, but it does not fix my crashes. My
system is basically unusable. It's something to do with the new version
of Firefox which triggers the refc
ortunately, making these changes doesn't fix my crashes and I'm still
investigating.
274 ttm_bo_tt_destroy(bo);
275
276 return ret;
277 }
regards,
dan carpenter
[ 159.893081] nouveau :01:00.0: Direct firmware load for
nouveau/nva8_fuc084 failed with error
If amdgpu_gem_prime_export() fails, then this code accidentally
returns zero/success instead of a negative error code.
Fixes: 190f2d7696c8 ("drm/amdgpu: Add DMA mapping of GTT BOs")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +++-
1 file
The amdgpu_bo_unreserve() has to be done on the error path as well.
Fixes: b4f0f97b8f5f ("drm/amdgpu: Move kfd_mem_attach outside reservation")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
679 ("drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen
w/out pre-enable")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
b/drivers/gpu/drm/
There is a reversed if statement in this probe function so the driver is
completely broken.
Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference")
Signed-off-by: Dan Carpenter
---
drivers/video/fbdev/hgafb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
).
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/tiny/simpledrm.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index f72ca3a1c2d4..4f
it66121 driver")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/bridge/ite-it66121.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ite-it66121.c
b/drivers/gpu/drm/bridge/ite-it66121.c
index 6980c9801d0d..7149ed40af83 100644
--- a/driver
This code is passing the wrong variable to PTR_ERR() so it doesn't
return the correct error code.
Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/bridge/ite-it66121.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Fri, May 14, 2021 at 09:34:27AM -0700, Joseph Kogut wrote:
> On Fri, May 14, 2021 at 8:13 AM Joseph Kogut wrote:
> >
> > Hi Dan,
> >
> > On Fri, May 14, 2021 at 6:54 AM Dan Carpenter
> > wrote:
> > >
> > > Hello Joseph Kogut,
>
>static_buffer == NULL))
> + if (unlikely(fifo->static_buffer == NULL)) {
> + kfree(fifo);
> return ERR_PTR(-ENOMEM);
> + }
regards,
dan carpenter
1007 entry->seglist[entry->seg_count++] = dmah;
1008 for (i = 0; i < (1 << page_order); i++) {
1009 DRM_DEBUG("page %d @ 0x%08lx\n",
regards,
dan carpenter
On Thu, Apr 29, 2021 at 05:42:44PM +0300, Dan Carpenter wrote:
> On Wed, Apr 28, 2021 at 04:04:14PM +0300, Andy Shevchenko wrote:
> > @@ -75,20 +75,16 @@ static int fbtft_request_one_gpio(struct fbtft_par *par,
> > struct gpio_desc **gpiop)
> &
turn dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request
%s GPIO\n", name);
> +
> fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
> __func__, name);
>
> - return ret;
> + return 0;
> }
regards,
dan carpenter
__
y: kernel test robot
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/vc4/vc4_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
index a7500716cf3f..5dceadc61600 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.h
+++ b
tr_init_done = true;
> > return soc_dev;
> >
> > out3:
> > @@ -246,6 +248,9 @@ const struct soc_device_attribute *soc_device_match(
> > if (!matches)
> > return NULL;
> >
> > + if (!soc_dev_attr_init_done && !early_s
This code should propagate the error from intel_overlay_pin_fb()
but currently it returns success.
Fixes: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/display/intel_overlay.c | 4 +++-
1 file changed, 3
and make everything consistent.
Fixes: c5d71cb31723 ("drm/i915/gvt: Move vGPU type related code into gvt file")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/i915/gvt/gvt.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/d
If the kmemdup() fails then this should return a negative error code
but it currently returns success
Fixes: b4a7db71ea06 ("drm/amdgpu: add per device user friendly xgmi events for
vega20")
Signed-off-by: Dan Carpenter
---
v2: I sent this patch in Feb but I accidentally added an unre
If nouveau_get_backlight_name() fails then this should return -ENOMEM
but currently it returns success.
Fixes: db1a0ae21461 ("drm/nouveau/bl: Assign different names to interfaces")
Signed-off-by: Dan Carpenter
---
This is from static analysis. In the original commit db1a0ae21461
(&q
-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/i915/display/intel_dp_hdcp.c:582 intel_dp_hdcp2_read_msg()
error: uninitialized symbol 'msg_end'.
vim +/msg_end
as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/video/fbdev/core/fbcon.c:1336 fbcon_cursor() warn: variable
dereferenced before check 'ops' (see
On Wed, Mar 31, 2021 at 03:33:13PM +0200, Adrien Grassein wrote:
> A static analysis shows several issues in the driver code at
> probing time.
>
> DT parsing errors were bad handled and could lead to bugs:
> - Bad error detection;
> - Bad release of ressources
>
> Re
of_node_put(lt->host_node);
But, yeah, putting the of_node_put() after the label isn't bug so
whatever...
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thanks!
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
int);
> + if (data_lanes < 0) {
> + dev_err(lt->dev, "%s: Bad data-lanes property\n", __func__);
> + return lt->data_lanes;
This needs to be "return data_lanes;"
> + }
> + lt->data_lanes = data_lanes;
I really be
port\n", __func__);
> + of_node_put(port_node);
> ret = -EINVAL;
> + goto err_free_host_node;
> }
>
> of_node_put(port_node);
Also, btw the success path does "return ret;" but it would be nicer to
"return 0;".
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Mar 31, 2021 at 11:38:22AM +0200, Adrien Grassein wrote:
> Some issues where found during static analysis of this driver.
>
> Reported-by: Dan Carpenter
> Suggested-by: Dan Carpenter
> Signed-off-by: Adrien Grassein
> ---
> drivers/gpu/drm/bridge/l
e could you use Reported-by?
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Mar 31, 2021 at 11:12:38AM +0300, Dan Carpenter wrote:
>644 of_node_put(endpoint);
>645
>646 lt->host_node = of_graph_get_remote_node(dev->of_node, 0, -1);
>647 if (!lt->host_node) {
>648 dev_err(lt-
rt_node);
674
675 end:
676 return ret;
677
678 err_free_host_node:
679 of_node_put(lt->host_node);
680 return ret;
681 }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
The dp->train_set[] for this driver is only two characters, not four so
this memsets too much. Fortunately, this ends up corrupting a struct
hole and not anything important.
Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort
Subsystem")
Signed-off-by:
p++;
sub_str = strsep(, delimiter);
ret = kstrtol(sub_str, 16, &(param[param_index]));
if (ret)
goto done;
(*param_nums)++;
}
done:
kfree(wr_buf);
return 0;
regards,
dan carpenter
busy_bo = NULL;
665 spin_unlock(>bdev->lru_lock);
^^
Dereference
666 ret = ttm_mem_evict_wait_busy(busy_bo, ctx, ticket);
667 if (busy_bo)
regards,
dan carpenter
l check if the root is an error pointer. So
passing it "handles" errors itself.
The one time where I've seen that checking for errors is essential is
if they driver dereferences the "test_data" dentry itself. That's
pretty uncommon.
[ So probably the commit message for this chunk
of these arrays as having HDCP_MESSAGE_ID_MAX
entries. This doesn't change the code, but it's just a belt and
suspenders approach to try future proof the code.
Fixes: 4c283fdac08a ("drm/amd/display: Add HDCP module")
Signed-off-by: Dan Carpenter
---
>From static analysis, as mentioned
cache.")
Signed-off-by: Dan Carpenter
---
I sent this patch last June but it was never applied.
drivers/gpu/drm/vc4/vc4_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 72d30d90b856c..0af246a5609ca 100644
---
u fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/ttm/ttm_device.c:144 ttm_device_swapout() warn: variable
dereferenced before check 'bo->ttm' (see line 142)
vim +144 drivers/gpu
If devm_request_mem_region() fails this code currently returns success
but it should return -EBUSY.
Fixes: 6076a9711dc5 ("drm/virtio: implement blob resources: probe for host
visible region")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 1 +
1 file
Ditto for
> PTR_ERR(). Have you even looked for these macros implementations?
>
Yeah... It leads to a compile warning:
warning: passing argument 1 of ‘IS_ERR’ makes pointer from integer
without a cast [-Wint-conversion]
regards,
dan carpenter
__
er should fix the
error or disable the feature if they want to continue.
There are lots of places in the kernel where the error handling could
be written to try continue but in a crippled state. It's not the right
approach. Over engineering like that just leads to bugs.
regards,
dan carpente
ere that is missing the fact that
> a line is being indented with spaces and not tabs in the patch
> at
> https://lore.kernel.org/r/1611754972-151016-1-git-send-email-zhangxuez...@gmail.com
>
> Any ideas what broke?
>
/*Tearing Effect Line On*/
Comments are the exception to the "no spaces at the start of a line"
rule. I was expecting that the kbuild-bot would send a Smatch warning
for inconsistent indenting, but comments are not counted there either.
I'm sort of surprised that we don't have checkpatch rule about the
missing space characters. It should be: "/* Tearing Effect Line On */".
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
gpiod_to_irq(par->gpio.te));
> + pr_info("TE request_irq completion.\n");
#SadFaceEmoji
> + }
> + } else {
> + pr_info("%s:%d, TE gpio not specified\n",
> + __func__, __LINE__);
> + }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
("Failed to request te gpio: %d\n", rc);
> par->gpio.te = NULL;
> }
I wish you would just copy and paste the code that I sent you instead,
but this also fixes the crash...
regards,
dan carpenter
___
dri-dev
on the success path. You should add that to your
code while your debugging the feature, but don't push it to the upstream
kernel.
> + }
> + } else {
> + pr_info("%s:%d, TE gpio not specified\n",
> + __func__, __
the error code. Write it exactly like
this:
par->gpio.te = devm_gpiod_get_index_optional(dev, "te", 0, GPIOD_IN);
if (IS_ERR(par->gpio.te))
return PTR_ERR(par->gpio.te);
if (par->gpio.te) {
init_completion(_panel_te);
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
par->gpio.te = NULL;
> + } else {
> + disable_irq_nosync(gpiod_to_irq(par->gpio.te));
> + pr_info("TE request_irq completion.\n");
> + }
> + } else {
> + pr_err("%s:%d, TE gpio not specif
On Mon, Jan 25, 2021 at 04:44:12PM +0800, Carlis wrote:
> From: "carlis.zhang_cp"
I was really expecting that you would fix this and Signed-off-by as
well.
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesk
e);
> + rc = wait_for_completion_timeout(_panel_te,
> +
> msecs_to_jiffies(SPI_PANEL_TE_TIMEOUT));
> + if (rc == 0)
> + pr_err("wait panel TE time out\n&qu
On Mon, Jan 25, 2021 at 07:13:43PM +, Zack Rusin wrote:
>
>
> > On Jan 25, 2021, at 03:45, Dan Carpenter wrote:
> >
> > The devm_memremap() function never returns NULL, it returns error
> > pointers so the test needs to be fixed. Also we need to call
>
401 - 500 of 1456 matches
Mail list logo