Skip to contentSkip to conversation

drm/i915: fix sparse warning for using false as NULL

PATCH In review Jani Nikula 3 participants 5 messages Mar 16, 2016 – Mar 17, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: fix sparse warning for using false as NULL

drivers/gpu/drm/i915/intel_dpll_mgr.c:1200:32: warning: Using plain integer as NULL pointer

Fixes 304b65cbdc8d ("drm/i915: Move SKL/KLB pll selection logic to intel_dpll_mgr.c")
---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dpll_mgr.c +1 -1
index 74d5aecc0be5..e53d57c39056 100644
@@ -1197,7 +1197,7 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
 		ctrl1 |= DPLL_CTRL1_HDMI_MODE(0);
 
 		if (!skl_ddi_calculate_wrpll(clock * 1000, &wrpll_params))
-			return false;
+			return NULL;
 
 		cfgcr1 = DPLL_CFGCR1_FREQ_ENABLE |
 			 DPLL_CFGCR1_DCO_FRACTION(wrpll_params.dco_fraction) |
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 3 lines · Jani Nikula

drivers/gpu/drm/i915/intel_dpll_mgr.c:1200:32: warning: Using plain integer as NULL pointer

Fixes 304b65cbdc8d ("drm/i915: Move SKL/KLB pll selection logic to intel_dpll_mgr.c")

Forgot to Cc: Ander on this one.

BR,
Jani.

Quoted 18 lines
---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dpll_mgr.c +1 -1
index 74d5aecc0be5..e53d57c39056 100644
@@ -1197,7 +1197,7 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
 		ctrl1 |= DPLL_CTRL1_HDMI_MODE(0);
 
 		if (!skl_ddi_calculate_wrpll(clock * 1000, &wrpll_params))
-			return false;
+			return NULL;
 
 		cfgcr1 = DPLL_CFGCR1_FREQ_ENABLE |
 			 DPLL_CFGCR1_DCO_FRACTION(wrpll_params.dco_fraction) |
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#2 lore raw
In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

drivers/gpu/drm/i915/intel_dpll_mgr.c:1200:32: warning: Using plain integer as NULL pointer

Fixes 304b65cbdc8d ("drm/i915: Move SKL/KLB pll selection logic to intel_dpll_mgr.c")
Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dpll_mgr.c +1 -1
index 74d5aecc0be5..e53d57c39056 100644
@@ -1197,7 +1197,7 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
 		ctrl1 |= DPLL_CTRL1_HDMI_MODE(0);
 
 		if (!skl_ddi_calculate_wrpll(clock * 1000, &wrpll_params))
-			return false;
+			return NULL;
 
 		cfgcr1 = DPLL_CFGCR1_FREQ_ENABLE |
 			 DPLL_CFGCR1_DCO_FRACTION(wrpll_params.dco_fraction) |
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author Applied
#3 lore raw
Quoted 7 lines · Ville Syrjälä
Quoted 4 lines · Jani Nikula

drivers/gpu/drm/i915/intel_dpll_mgr.c:1200:32: warning: Using plain integer as NULL pointer

Fixes 304b65cbdc8d ("drm/i915: Move SKL/KLB pll selection logic to intel_dpll_mgr.c")

Pushed to drm-intel-next-queued, thanks for the review. The CI fails are unrelated.

BR,
Jani.

Quoted 25 lines
Quoted 25 lines
---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dpll_mgr.c +1 -1
index 74d5aecc0be5..e53d57c39056 100644
@@ -1197,7 +1197,7 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
 		ctrl1 |= DPLL_CTRL1_HDMI_MODE(0);
 
 		if (!skl_ddi_calculate_wrpll(clock * 1000, &wrpll_params))
-			return false;
+			return NULL;
 
 		cfgcr1 = DPLL_CFGCR1_FREQ_ENABLE |
 			 DPLL_CFGCR1_DCO_FRACTION(wrpll_params.dco_fraction) |
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✗ Fi.CI.BAT: failure for drm/i915: fix sparse warning for using false as NULL

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: fix sparse warning for using false as NULL
URL : https://patchwork.freedesktop.org/series/4528/
State : failure

== Summary ==

Series 4528v1 drm/i915: fix sparse warning for using false as NULL
http://patchwork.freedesktop.org/api/1.0/series/4528/revisions/1/mbox/

Test drv_module_reload_basic:

                pass       -> SKIP       (bdw-ultra)
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (bdw-nuci7)
        Subgroup basic-flip-vs-wf_vblank:
                dmesg-warn -> PASS       (hsw-brixbox)
        Subgroup basic-plain-flip:
                dmesg-warn -> PASS       (hsw-gt2)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-a:
                dmesg-warn -> PASS       (snb-x220t)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (hsw-gt2)
bdw-nuci7        total:194  pass:181  dwarn:1   dfail:0   fail:0   skip:12 
bdw-ultra        total:194  pass:172  dwarn:0   dfail:0   fail:0   skip:22 
byt-nuc          total:194  pass:155  dwarn:4   dfail:0   fail:0   skip:35 
hsw-brixbox      total:194  pass:172  dwarn:0   dfail:0   fail:0   skip:22 
hsw-gt2          total:194  pass:175  dwarn:2   dfail:0   fail:0   skip:17 
ivb-t430s        total:194  pass:169  dwarn:0   dfail:0   fail:0   skip:25 
skl-i5k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-i7k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-nuci5        total:194  pass:183  dwarn:0   dfail:0   fail:0   skip:11 
snb-x220t        total:194  pass:160  dwarn:0   dfail:1   fail:0   skip:33 

Results at /archive/results/CI_IGT_test/Patchwork_1621/

dbbc6d276864d7b7a3a1edb04f0511153f9c3852 drm-intel-nightly: 2016y-03m-16d-22h-27m-36s UTC integration manifest cd5b3d217902d89f9d48ca773955612bbf9b2577 drm/i915: fix sparse warning for using false as NULL

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx