* [PATCH] drm/i915/opregion: Remove null check before kfree
@ 2017-08-30 13:31 Himanshu Jha
2017-08-31 6:30 ` Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Himanshu Jha @ 2017-08-30 13:31 UTC (permalink / raw)
To: jani.nikula
Cc: joonas.lahtinen, rodrigo.vivi, airlied, intel-gfx, dri-devel,
linux-kernel, Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
---
drivers/gpu/drm/i915/intel_opregion.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 98154ef..2427b40 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -830,10 +830,8 @@ void intel_opregion_unregister(struct drm_i915_private *dev_priv)
memunmap(opregion->rvda);
opregion->rvda = NULL;
}
- if (opregion->vbt_firmware) {
- kfree(opregion->vbt_firmware);
- opregion->vbt_firmware = NULL;
- }
+ kfree(opregion->vbt_firmware);
+ opregion->vbt_firmware = NULL;
opregion->header = NULL;
opregion->acpi = NULL;
opregion->swsci = NULL;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/opregion: Remove null check before kfree
2017-08-30 13:31 [PATCH] drm/i915/opregion: Remove null check before kfree Himanshu Jha
@ 2017-08-31 6:30 ` Jani Nikula
2017-09-27 12:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-27 16:39 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2017-08-31 6:30 UTC (permalink / raw)
To: Himanshu Jha
Cc: joonas.lahtinen, rodrigo.vivi, airlied, intel-gfx, dri-devel,
linux-kernel, Himanshu Jha
On Wed, 30 Aug 2017, Himanshu Jha <himanshujha199640@gmail.com> wrote:
> kfree on NULL pointer is a no-op and therefore checking is redundant.
IMO the code has more clarity as it is.
BR,
Jani.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_opregion.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index 98154ef..2427b40 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -830,10 +830,8 @@ void intel_opregion_unregister(struct drm_i915_private *dev_priv)
> memunmap(opregion->rvda);
> opregion->rvda = NULL;
> }
> - if (opregion->vbt_firmware) {
> - kfree(opregion->vbt_firmware);
> - opregion->vbt_firmware = NULL;
> - }
> + kfree(opregion->vbt_firmware);
> + opregion->vbt_firmware = NULL;
> opregion->header = NULL;
> opregion->acpi = NULL;
> opregion->swsci = NULL;
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/opregion: Remove null check before kfree
@ 2017-08-31 6:30 ` Jani Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2017-08-31 6:30 UTC (permalink / raw)
Cc: intel-gfx, joonas.lahtinen, linux-kernel, dri-devel,
Himanshu Jha, rodrigo.vivi
On Wed, 30 Aug 2017, Himanshu Jha <himanshujha199640@gmail.com> wrote:
> kfree on NULL pointer is a no-op and therefore checking is redundant.
IMO the code has more clarity as it is.
BR,
Jani.
>
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_opregion.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index 98154ef..2427b40 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -830,10 +830,8 @@ void intel_opregion_unregister(struct drm_i915_private *dev_priv)
> memunmap(opregion->rvda);
> opregion->rvda = NULL;
> }
> - if (opregion->vbt_firmware) {
> - kfree(opregion->vbt_firmware);
> - opregion->vbt_firmware = NULL;
> - }
> + kfree(opregion->vbt_firmware);
> + opregion->vbt_firmware = NULL;
> opregion->header = NULL;
> opregion->acpi = NULL;
> opregion->swsci = NULL;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/opregion: Remove null check before kfree
2017-08-30 13:31 [PATCH] drm/i915/opregion: Remove null check before kfree Himanshu Jha
2017-08-31 6:30 ` Jani Nikula
@ 2017-09-27 12:47 ` Patchwork
2017-09-27 16:39 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-27 12:47 UTC (permalink / raw)
To: Himanshu Jha; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/opregion: Remove null check before kfree
URL : https://patchwork.freedesktop.org/series/30964/
State : success
== Summary ==
Series 30964v1 drm/i915/opregion: Remove null check before kfree
https://patchwork.freedesktop.org/api/1.0/series/30964/revisions/1/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Test pm_rpm:
Subgroup basic-rte:
pass -> DMESG-WARN (fi-cfl-s) fdo#102294
Test drv_module_reload:
Subgroup basic-no-display:
dmesg-warn -> PASS (fi-glk-1) fdo#102777 +1
fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:447s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:475s
fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:419s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:513s
fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:279s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:509s
fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:497s
fi-cfl-s total:289 pass:222 dwarn:35 dfail:0 fail:0 skip:32 time:538s
fi-cnl-y total:289 pass:259 dwarn:0 dfail:0 fail:3 skip:27 time:659s
fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:418s
fi-glk-1 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:566s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:426s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:405s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:438s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:491s
fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:466s
fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:1 skip:24 time:467s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:592s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:543s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:460s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:754s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:494s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:478s
fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:566s
fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:418s
da14aaa14e584a49e94bffd3c7af6e659745bae6 drm-tip: 2017y-09m-27d-09h-50m-55s UTC integration manifest
82a4a92756d4 drm/i915/opregion: Remove null check before kfree
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5832/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/opregion: Remove null check before kfree
2017-08-30 13:31 [PATCH] drm/i915/opregion: Remove null check before kfree Himanshu Jha
2017-08-31 6:30 ` Jani Nikula
2017-09-27 12:47 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-09-27 16:39 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-27 16:39 UTC (permalink / raw)
To: Himanshu Jha; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/opregion: Remove null check before kfree
URL : https://patchwork.freedesktop.org/series/30964/
State : success
== Summary ==
Test perf:
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252 +1
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test kms_flip:
Subgroup flip-vs-modeset-interruptible:
pass -> DMESG-WARN (shard-hsw) fdo#102557
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102557 https://bugs.freedesktop.org/show_bug.cgi?id=102557
shard-hsw total:2478 pass:1365 dwarn:2 dfail:0 fail:11 skip:1100 time:10153s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5832/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-27 16:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 13:31 [PATCH] drm/i915/opregion: Remove null check before kfree Himanshu Jha
2017-08-31 6:30 ` Jani Nikula
2017-08-31 6:30 ` Jani Nikula
2017-09-27 12:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-27 16:39 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.