Re: [PATCH 1/1] drm/amd/powerplay: initialize a variable before using it

2017-11-04 Thread Nicolas Iooss
On Sun, Sep 3, 2017 at 2:00 PM, Nicolas Iooss <nicolas.iooss_li...@m4x.org> wrote: > > Function vega10_apply_state_adjust_rules() only initializes > stable_pstate_sclk_dpm_percentage when > data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1 > and 100. T

[PATCH 1/1] drm/amd/powerplay: initialize a variable before using it

2017-09-03 Thread Nicolas Iooss
support (v5)") Signed-off-by: Nicolas Iooss <nicolas.iooss_li...@m4x.org> --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmg

[PATCH 1/1] drm/sti: use seq_puts to display a string

2017-03-31 Thread Nicolas Iooss
literal and no format arguments [-Wformat-security] seq_printf(s, gdp_format_to_str[i].name); ^ Silence this warning by using seq_puts() instead. Signed-off-by: Nicolas Iooss <nicolas.iooss_li...@m4x.org> --- drivers/gpu/drm/sti/sti_gdp

[PATCH 1/1] drm/amd/powerplay: fix misspelling in header guard

2017-01-22 Thread Nicolas Iooss
In smu7_clockpowergating.h, the #ifndef statement which prevents multiple inclusions of the header file uses _SMU7_CLOCK_POWER_GATING_H_ but the following #define statement uses _SMU7_CLOCK__POWER_GATING_H_. Signed-off-by: Nicolas Iooss <nicolas.iooss_li...@m4x.org> --- drivers/gpu/d

[PATCH 1/1] drm/i915/gvt: verify functions types in new_mmio_info()

2016-12-26 Thread Nicolas Iooss
write ? write : intel_vgpu_default_mmio_write; ^ ~ ~ This allows the compiler to detect that sbi_ctl_mmio_write() returns a "bool" value instead of an expected "int" one. Fix this. Signed-off-by: Nicolas Iooss ---

[PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-10-23 Thread Nicolas Iooss
/patch/108941/ On 04/09/16 20:58, Nicolas Iooss wrote: > When building the kernel with clang and some warning flags, the compiler > reports that the return value of dcs_get_backlight() may be > uninitialized: > > drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c:53:2: error: varia

[Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-12 Thread Nicolas Iooss
On 08/09/16 16:31, Dave Gordon wrote: > On 08/09/16 00:02, Nicolas Iooss wrote: >> On 07/09/16 18:03, Dave Gordon wrote: >>> On 06/09/16 21:36, Nicolas Iooss wrote: >>>> On 06/09/16 12:21, Dave Gordon wrote: >>>>> On 04/09/16 19:58, Nicolas Iooss wrot

[Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-08 Thread Nicolas Iooss
On 07/09/16 18:03, Dave Gordon wrote: > On 06/09/16 21:36, Nicolas Iooss wrote: >> On 06/09/16 12:21, Dave Gordon wrote: >>> On 04/09/16 19:58, Nicolas Iooss wrote: >>>> When building the kernel with clang and some warning flags, the >>>> c

[Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-06 Thread Nicolas Iooss
On 06/09/16 12:21, Dave Gordon wrote: > On 04/09/16 19:58, Nicolas Iooss wrote: >> When building the kernel with clang and some warning flags, the compiler >> reports that the return value of dcs_get_backlight() may be >> uninitialized: >> >> drivers/gpu/drm/i9

[PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-04 Thread Nicolas Iooss
ght_ports seems to be always initialized to a non-null value, the content of the for loop is always executed and there is no bug in the current code. Nevertheless the compiler has no way of knowing that assumption, so initialize variable 'data' to silence the warning here. Signed-off-by: Nico

[PATCH 1/1] drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value

2016-06-18 Thread Nicolas Iooss
sult' to silence this warning int result; ^ = 0 Fixes: 3f1d35a03b3c ("drm/amdgpu: implement new cgs interface for acpi function") Signed-off-by: Nicolas Iooss Cc: stable at vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c

[PATCH v2 2/2] drm: use dev_name as default unique name in drm_dev_alloc()

2015-12-11 Thread Nicolas Iooss
441.html, the unique name of a new DRM device can be set as dev_name(parent_dev) when parent_dev is not NULL (vgem is a special case). Signed-off-by: Nicolas Iooss Acked-by: Boris Brezillon --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 drivers/gpu/drm/drm_drv.c

[PATCH v2 1/2] drm: make drm_dev_set_unique() not use a format string

2015-12-11 Thread Nicolas Iooss
79266b1 ("configfs: fix kernel infoleak through user-controlled format string"). False positives which do not bring an extra value make the work of finding real bugs harder. Therefore remove the format-string feature from drm_dev_set_unique(). Signed-off-by: Nicolas Iooss --- v2: updat

[PATCH 1/2] drm: make drm_dev_set_unique() not use a format string

2015-12-09 Thread Nicolas Iooss
On 12/09/2015 12:28 AM, Emil Velikov wrote: > On 8 December 2015 at 22:12, Nicolas Iooss > wrote: >> drm_dev_set_unique() uses a format string to define the unique name of a >> device. This feature is not used as currently all the calls to this >> function either use

[PATCH 2/2] drm: use dev_name as default unique name in drm_dev_alloc()

2015-12-08 Thread Nicolas Iooss
441.html, the unique name of a new DRM device can be set as dev_name(parent_dev) when parent_dev is not NULL (vgem is a special case). Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 drivers/gpu/drm/drm_drv.c| 9 + drivers/gpu/drm/

[PATCH 1/2] drm: make drm_dev_set_unique() not use a format string

2015-12-08 Thread Nicolas Iooss
79266b1 ("configfs: fix kernel infoleak through user-controlled format string"). False positives which do not bring an extra value make the work of finding real bugs harder. Therefore remove the format-string feature from drm_dev_set_unique(). Signed-off-by: Nicolas Iooss --- drivers/

[PATCH] drm: do not use device name as a format string

2015-12-07 Thread Nicolas Iooss
On 12/07/2015 01:31 PM, Thierry Reding wrote: > On Mon, Dec 07, 2015 at 12:46:52PM +0100, Daniel Vetter wrote: >> On Mon, Dec 07, 2015 at 11:53:01AM +0200, Jani Nikula wrote: >>> On Mon, 07 Dec 2015, Daniel Vetter wrote: >>>> On Sun, Dec 06, 2015 at 11:16:3

[PATCH] drm: do not use device name as a format string

2015-12-06 Thread Nicolas Iooss
On 12/06/2015 10:35 AM, Daniel Vetter wrote: >> On 11/18/2015 06:58 PM, Nicolas Iooss wrote: >>> drm_dev_set_unique() formats its parameter using kvasprintf() but many >>> of its callers directly pass dev_name(dev) as printf format string, >>> without any forma

[PATCH] drm: do not use device name as a format string

2015-12-05 Thread Nicolas Iooss
Hello, I sent the path below a few weeks ago and did not have any feedback. Is there any issue in it that I need to fix before submitting it again? Thanks, Nicolas Iooss On 11/18/2015 06:58 PM, Nicolas Iooss wrote: > drm_dev_set_unique() formats its parameter using kvasprintf() but many >

[PATCH] drm: do not use device name as a format string

2015-11-18 Thread Nicolas Iooss
quot; when using drm_dev_set_unique() with dev_name(). Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c| 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.c| 2 +- i

[PATCH 2/2] drm/vmwgfx: make vmw_cotable_unbind return an initialized value

2015-09-20 Thread Nicolas Iooss
In vmw_cotable_unbind(), local variable ret is never initialized before being used in a return statement at the end of the function. Fix this by directly returning zero and removing the variable. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 3 +-- 1 file changed

[PATCH 1/2] drm/vmwgfx: make vmw_kms_helper_dirty return an initialized value

2015-09-20 Thread Nicolas Iooss
In vmw_kms_helper_dirty(), local variable ret is never initialized before begin used in a return statement when vmw_fifo_reserve() fails. Instead of returning an uninitialized value, return -ENOMEM here and remove the useless variable. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/vmwgfx

[PATCH] drm/amdgpu: increment queue when iterating on this variable.

2015-08-01 Thread Nicolas Iooss
condition not modified in loop body [-Werror,-Wloop-analysis] for (queue = 0; queue < 8; i++) { ^ Fix this by incrementing variable queue instead of i in this loop. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c