()
= drm_gem_object_unreference()
On the other hand, this is all in the module init so it seems like
locking shouldn't be necessary, and certainly I can't see how it would
cause the suspend bug.
I don't have this hardware btw, so I can't actually test this patch.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git
()
intel_setup_overlay() is always called with struct_mutex unlocked.
There is only one call tree and it is:
i915_load_modeset_init()
= intel_modeset_init()
= intel_setup_overlay()
Signed-off-by: Dan Carpenter erro...@gmail.com
---
V2: The code is the same, but the change log
We don't use timing_level any more after: 9cf00977da0 drm/edid: Unify
detailed block parsing between base and extension blocks.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7188674..3556308 100644
--- a/drivers/gpu/drm
copy_to/from_user() returns the number of bytes remaining and this
function normally returns negative error codes. No one uses the
ttm_bo_fbdev_io() function so this change has no impact.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu
copy_from_user() returns the number of bytes left to be copied but we
want to return a negative error code here. This is in the ioctl handler
so the error code get returned to userspace.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm
copy_to/from_user() returns the number of bytes remaining to be copied
but we want to return a negative error code here. This gets returned to
userspace.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
b/drivers/gpu/drm/vmwgfx
copy_to_user returns the number of bytes remaining to be copied, but we
want to return a negative error code here. These are returned to
userspace.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 59a2bf8
,
This should either be true or false. 8 counts as false.
480 .hburst_start = 72, .hburst_len = 34,
481 .vburst_start_f1 = 9, .vburst_end_f1 = 240,
regards,
dan carpenter
intel_cleanup_ring_buffer()
and they all hold the lock so they're OK.
This was introduced in: 8187a2b70e3 drm/i915: introduce
intel_ring_buffer structure (V2) and it's a regression from v2.6.34.
Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=16247
Signed-off-by: Dan Carpenter erro
copy_to_user() returns the number of bytes remaining to be copied and
I'm pretty sure we want to return a negative error code here.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9ded3da..22691b4 100644
We don't need to check the list cursor in a list_for_each_entry(). It's
always non-null.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/intel_display.c
b/drivers/gpu/drm/i915/intel_display.c
index cc8131f..8a2bdfc 100644
--- a/drivers/gpu/drm/i915
NUM_TV_MODES is the same as ARRAY_SIZE(tv_modes). In the end, I
decided it was cleaner to remove NUM_TV_MODES and just use
ARRAY_SIZE(tv_modes) through out.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index
copy_to_user() returns the number of bytes remaining to be copied, but
we want to return a negative error code. This gets copied to user
space.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index f1d6261
ttm_pool_update_free_locked(pool, freed_pages);
334 /**
335 * Because changing page caching is costly
336 * we unlock the pool to prevent stalling.
regards,
dan carpenter
On Mon, Jul 12, 2010 at 07:12:37PM -0400, Jerome Glisse wrote:
On 07/12/2010 06:39 PM, Dan Carpenter wrote:
327 pages_to_free[freed_pages++] = p;
328 /* We can only remove NUM_PAGES_TO_ALLOC at a time.
*/
329 if (freed_pages
nouveau_load() just returned directly if there was an error instead of
releasing resources.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c
b/drivers/gpu/drm/nouveau/nouveau_state.c
index e632339..e53253a 100644
--- a/drivers/gpu/drm/nouveau
nuveau_load() just returned directly if there was an error instead of
releasing resources.
Signed-off-by: Dan Carpenter erro
-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c
b/drivers/gpu/drm/radeon/radeon_pm.c
index 95f8b3a..965e0f1 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -472,9 +472,9 @@ static const struct attribute_group
changed DRM_ERROR() to dev_err() which is the new preferred
method.
Signed-off-by: Dan Carpenter erro...@gmail.com
---
V2: switched from DRM_ERROR() to dev_err()
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c
b/drivers/gpu/drm/radeon/radeon_pm.c
index 95f8b3a..58038f5 100644
--- a/drivers/gpu/drm
agpmem is never NULL here because it is the list cursor of a
list_for_each_entry() list.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 3778360..fda6746 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
fb_helper_conn is dereferenced before the check for NULL. It's never
actually NULL here, so this is mostly to keep the static checkers happy.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index de82e20..8dd7e6f
On Sat, Jun 19, 2010 at 03:12:51PM +0200, Dan Carpenter wrote:
copy_to_user returns the number of bytes remaining to be copied, but we
want to return a negative error code here. These are returned to
userspace.
I didn't get a response on this patch.
regards,
dan carpenter
Signed-off
On Wed, Jun 23, 2010 at 07:03:01PM +0200, Dan Carpenter wrote:
copy_to_user() returns the number of bytes remaining to be copied and
I'm pretty sure we want to return a negative error code here.
This patch wasn't applied either.
regards,
dan carpenter
Signed-off-by: Dan Carpenter erro
On Wed, Jun 23, 2010 at 07:06:22PM +0200, Dan Carpenter wrote:
We don't need to check the list cursor in a list_for_each_entry(). It's
always non-null.
Here is another one that never got applied. I has a sad face. :(
regards,
dan carpenter
Signed-off-by: Dan Carpenter erro...@gmail.com
ring-space is unsigned so it's never less than zero.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c
b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 51e9c9e..a331898 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm
On Sun, Nov 21, 2010 at 09:23:46AM +, Chris Wilson wrote:
On Sat, 20 Nov 2010 21:32:07 +0300, Dan Carpenter erro...@gmail.com wrote:
Hello Chris,
Is there an integer overflow in validate_exec_list()?
drivers/gpu/drm/i915/i915_gem.c
3633 size_t length = exec[i
are the patches? I pulled drm-next but I don't see them.
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
The e pointer is either NULL or freed when we call
drm_vblank_put(dev, e-pipe) on the error path. Just pass the pipe
variable directly instead.
I changed another caller to use pipe as well for consistency.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/drm_irq.c b
ARRAY_SIZE() was intended here, sizeof() is too large.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/nouveau/nv50_vram.c
b/drivers/gpu/drm/nouveau/nv50_vram.c
index 47489ed..58e98ad 100644
--- a/drivers/gpu/drm/nouveau/nv50_vram.c
+++ b/drivers/gpu/drm/nouveau
There are a bunch of off by one errors in the sanity checks here.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 79ac676..41da786 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon
The extra semicolon was not intended.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index b79619a..b9fafe3 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -517,7 +517,7
instead of patching it
myself. :)
regards,
dan carpenter
drivers/gpu/drm/i915/intel_overlay.c +1471 intel_setup_overlay(73)
error: double unlock 'mutex:dev-struct_mutex'
1445 mutex_unlock(dev-struct_mutex);
^
unlock.
1446
In the original code the kfree() doesn't do anything because
mem-mm_node has been set to NULL. This was introduced in
d2f9c56a drm/nouveau: create temp vmas for both src and dst of
bo moves
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c
b
Two of these error paths returned without freeing ctx.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c
b/drivers/gpu/drm/nouveau/nvc0_graph.c
index 39e9208..5aa3f9e 100644
--- a/drivers/gpu/drm/nouveau/nvc0_graph.c
+++ b/drivers/gpu/drm/nouveau
This off by one range check was copy and pasted a couple places.
It's not really harmful, but we should fix it anyway.
Signed-off-by: Dan Carpenter erro...@gmail.com
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index db8ef19..cf83aa0 100644
--- a/drivers/gpu
, non-prefetchable) [size=4M]
Region 2: Memory at e000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at 1800 [size=8]
Expansion ROM at unassigned [disabled]
Capabilities: access denied
Kernel driver in use: i915
regards,
dan carpenter
Smatch has a new check for Rosenberg type information leaks where
structs are copied to the user with uninitialized stack data in them.
The c32.idx member wasn't initialized.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm
These variables get allocated twice so the first allocation is a
memory leak.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index c7cff3d..86c5e4c 100644
--- a/drivers/gpu/drm/vmwgfx
Casting len from uin32_t to uint8_t in min_t() truncates the upper
bits. It doesn't matter in this case because len is never more
than 0x1f, but Smatch warns about it, so let's change it.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/i915/intel_display.c
b
memtimings is a valid pointer here, the intent was to test for
kcalloc() failure.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c
b/drivers/gpu/drm/nouveau/nouveau_perf.c
index 9f178aa..33d03fb 100644
--- a/drivers/gpu/drm/nouveau
The intent here was to return an error code, but instead the code
returns the number of bytes remaining (that weren't copied).
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index 97f23ab..3f63435
If ret is non-zero then we don't initialize the struct which leaks
stack information to user space.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index d4a1d8b..28e1c35 100644
--- a/drivers
radeon_benchmark_do_move() returns an int so time should be int
too. Making it unsigned breaks the error handling.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c
b/drivers/gpu/drm/radeon/radeon_benchmark.c
index 5cafc90..17e1a9b
check.
819 nouveau_vm_map(vma, new_mem-mm_node);
820 } else
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
The if (!p !p-dev) condition isn't right because || was intended
instead of . But actually, p is the list cursor and so it's always
non-NULL and we can just remove that bit. We can remove the another
similar check as well.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git
calc_mclk() returns zero on success and negative on failure but clk is
a u32.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c
b/drivers/gpu/drm/nouveau/nv50_pm.c
index 0393721..3508de9 100644
--- a/drivers/gpu/drm/nouveau/nv50_pm.c
+++ b
bo_va is dereferenced in the error message.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c
b/drivers/gpu/drm/radeon/radeon_gart.c
index 3ef58ca..2944c78 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon
The second lock should be an unlock or it causes a deadlock.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c
b/drivers/gpu/drm/radeon/radeon_gart.c
index 2944c78..4a9f797 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu
On Tue, Jan 10, 2012 at 12:28:13AM +0100, Martin Peres wrote:
Le 04/01/2012 08:20, Dan Carpenter a écrit :
calc_mclk() returns zero on success and negative on failure but clk is
a u32.
Signed-off-by: Dan Carpenterdan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c
b
Logical negate is always false here. This was found by Sparse:
drivers/gpu/drm/gma500/psb_irq.c:407:17: warning: dubious: x !y
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c
index 7be802b..4ce680f 100644
The caller doesn't check the return value, but this function returns a
bool so static checkers complain when we return a negative error code.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c
b/drivers/gpu/drm/nouveau/nouveau_dp.c
index
We store stuff in texdw[7] so this array needs to have 8 elements.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c
b/drivers/gpu/drm/radeon/evergreen_cs.c
index 2ed17f7..49203b6 100644
--- a/drivers/gpu/drm/radeon/evergreen_cs.c
+++ b
? : ,
^^^
-ring is an unsigned bitfield so it's never equal to -1.
ring_str(err-ring),
cache_level_str(err-cache_level));
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http
test work. You can
compare unsigned int and longs to -1 and it works but for smaller
types it doesn't.
regards,
dan carpenter
signature.asc
Description: Digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http
If we hit an error here, then we should unlock and unreference obj
before returning.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 852642d..6de6130 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers
These are unintuitive. These are type bool and return -1 casted to true
on failure. Let's just make it return an int. The callers don't care,
but let's change this as a cleanup.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/gma500/intel_bios.h
b/drivers
}
246
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
We can just return -ENOMEM here if the allocation fails.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 0874a6d..fb44e7e 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
drm_core_ioremap() initializes -handle. We already know
dev-agp_buffer_map is a valid pointer.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/savage/savage_bci.c
b/drivers/gpu/drm/savage/savage_bci.c
index cb1ee4e..6eb507a 100644
--- a/drivers/gpu/drm/savage
On Thu, Mar 22, 2012 at 09:30:56AM +0300, Dan Carpenter wrote:
If we hit an error here, then we should unlock and unreference obj
before returning.
This is still present in linux-next.
regards,
dan carpenter
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu
CPU we are holding the info-lock and want the
config.mutex. On the other CPU we hold the config.mutex and want
the -mmap_sem.
Deadlock.
---
Could you take a look?
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
is false here
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
These are unintuitive. These are type bool and return -1 casted to true
on failure. Let's just make it return an int. The callers don't care,
but let's change this as a cleanup.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Acked-by: Daniel Vetter daniel.vet...@ffwll.ch
---
Originally
We need to check that ctx is a valid pointer before dereferencing it.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Applies to linux-next.
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c
b/drivers/gpu/drm/i915/i915_gem_context.c
index 9ae3f2c..a82c0ec 100644
--- a/drivers/gpu
) {
^
Old check.
600 struct radeon_connector
*radeon_connector = to_radeon_connector(connector);
601 struct
radeon_connector_atom_dig *dig_connector =
regards,
dan carpenter
Static checkers complain if this we don't check for allocation failure.
Also we can use the new kmalloc_array() function here as a cleanup.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c
b/drivers/gpu/drm/radeon/radeon_ring.c
index
On Fri, Jul 20, 2012 at 03:45:28PM +0200, Christian König wrote:
On 20.07.2012 13:17, Dan Carpenter wrote:
Static checkers complain if this we don't check for allocation failure.
Also we can use the new kmalloc_array() function here as a cleanup.
Signed-off-by: Dan Carpenter dan.carpen
We don't allocate enough data for this struct. As soon as we start
modifying event-event on the next lines, then we're going beyond the
end of the memory we allocated.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Static checker work. Not tested.
diff --git a/drivers/gpu/drm/vmwgfx
) {
^^
Old check.
205 ret = nouveau_fence_emit(fence, chan);
206 if (ret)
regards,
dan carpenter
See also:
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri
This is fixed now?
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
We set .disable to ast_crtc_disable twice.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index f3b2a7c..e87f1ff 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -582,7 +582,6
-chan-handle 0x));
Is that bitwise AND in the right place? Oxff would be enough to hold
0-63.
135 nouveau_channel_del(chan-chan);
136 }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
We check whether this pointer is NULL a few lines later in the function
so probably we should check here too.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
This is a static checker fix.
diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
index d752c96..036253e 100644
copy_to_user() returns the number of bytes remaining to be copied, but
we want to return a negative error code here. I fixed a couple of these
last year, but I missed this one.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
I think there were only three copy_to/from_user() functions
On Wed, Dec 19, 2012 at 06:34:05AM +1300, Tony Prisk wrote:
Resend to include mailing lists.
Replace IS_ERR_OR_NULL with IS_ERR on clk_get results.
The original code is correct. clk_get() can return NULL depending
on the .config.
regards,
dan carpenter
...
patch
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
I don't care either way, but being different from the documentation
is less bad than crashing which is what your patch does. Please
be more careful in the future.
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http
data is a void pointer and args is data after we have casted it to
a struct. We care about the sizeof the struct here. Btw, sizeof(*data)
is 1.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
b/drivers/gpu/drm/nouveau/core
data is a void pointer and args is data after we have casted it to
a struct. We care about the size of the struct here. Btw,
sizeof(*data) is 1.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
v2: tweaked the commit message
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
/dcarpenter/progs/kernel/devel/drivers/gpu/drm/nouveau/core/engine/disp/Makefile'.
Stop.
make: *** [drivers/gpu/drm/nouveau/core/engine/disp/nv50.o] Error 2
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http
= sandybridge_pcode_write(dev_priv,
GEN6_PCODE_WRITE_RC6VIDS, rc6vids);
2664 if (ret)
2665 DRM_ERROR(Couldn't fix incorrect rc6
voltage\n);
2666 }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel
; i++) {
570 priv-tpc_nr[i] = nv_rd32(priv, GPC_UNIT(i, 0x2608));
^^^
If -gpc_nr is more than 4 we are writing past the end of the array.
571 priv-tpc_total += priv-tpc_nr[i];
572 }
573
regards,
dan
The test here should be = ARRAY_SIZE() instead of ARRAY_SIZE().
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
This was introduced in git://git.freedesktop.org/git/nouveau/linux-2.6
drm-nouveau-fixes-3.9
It hadn't hit linux-next yet yesterday.
diff --git a/drivers/gpu/drm/nouveau
to check: http://lwn.net/Articles/205624/
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
list and request are already declared as __user pointers, it's just
this cast which is missing the annotation.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Sparse doesn't complain about this because it hits the error: bad
integer constant expression and stops printing warnings.
diff
On Mon, Apr 22, 2013 at 10:03:13AM -0400, alexdeuc...@gmail.com wrote:
From: Alex Deucher alexander.deuc...@amd.com
Reported-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Alex Deucher alexander.deuc...@amd.com
---
drivers/gpu/drm/radeon/atombios.h|2 ++
drivers/gpu
On Mon, Apr 22, 2013 at 10:18:09AM -0400, Alex Deucher wrote:
On Mon, Apr 22, 2013 at 10:08 AM, Dan Carpenter
dan.carpen...@oracle.com wrote:
On Mon, Apr 22, 2013 at 10:03:13AM -0400, alexdeuc...@gmail.com wrote:
From: Alex Deucher alexander.deuc...@amd.com
Reported-by: Dan Carpenter
align is u32 but info-addr and info-buffer[info-buffer_nr] are u64.
The = ~(align - 1) operation clears the high bits accidentally. I
have fixed this by using the ALIGN() macro.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0
This macro doesn't need a semi-colon.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e5cc7c0..592b0eb9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1773,7 +1773,7
On Wed, Apr 03, 2013 at 01:33:09PM +0200, Maarten Lankhorst wrote:
Op 03-04-13 10:05, Dan Carpenter schreef:
The test here should be = ARRAY_SIZE() instead of ARRAY_SIZE().
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Acked-by: Maarten Lankhorst maarten.lankho...@canonical.com
It should be = instead of here. The table-mc_reg_address[]
array has SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE (16) elements.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index bab0185..55491e7 100644
The error path does this:
for (--i; i = 0; --i) {
which is a forever loop because i is unsigned.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/radeon_test.c
b/drivers/gpu/drm/radeon/radeon_test.c
index f4d6bce..12e8099 100644
--- a/drivers
These checks should be = instead of . j is used as an offset into
the table-mc_reg_address[] array and that has
SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE (16) elements.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
The rv6xx_clocks_per_unit() function pretends it can set flags in a u64
bitfield but really because 1 is an int it doesn't work for more than
32 bits. The only caller truncates the high bits away anyway. I've
just changed it to be a u32.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
There are two break statements in a row.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
index 3be7b95..f1c0767 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph
We care about the upper 32 bits here so we have to use 1ULL instead of 1
to avoid a shift wrapping bug.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
index 64dca26
i915_gem_vma_create() returns and ERR_PTR() or a valid pointer, it never
returns NULL.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 40c2fc6..9a9a77a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b
i915_gem_vma_destroy() frees its argument so we have to move the
drm_mm_remove_node() call up a few lines.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9a9a77a..f347ad5 100644
--- a/drivers/gpu/drm/i915
TTM_PL_FLAG_TT) size 256 * 1024)
224 nvbo-page_shift =
drm-client.base.vm-vmm-lpg_shift;
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
1 - 100 of 1437 matches
Mail list logo