Skip to content

Commit

Permalink
drm/i915: Replace a memset() with zero initialization
Browse files Browse the repository at this point in the history
commit 92b47c3 upstream.

Declaring a struct and immediately zeroing it with memset()
seems a bit silly to me. Just zero initialize the struct
when declaring it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231124082735.25470-2-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
vsyrjala authored and gregkh committed Apr 3, 2024
1 parent 6c12226 commit 26fec3e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/i915/display/intel_dpll_mgr.c
Expand Up @@ -4465,12 +4465,10 @@ verify_single_dpll_state(struct drm_i915_private *i915,
struct intel_crtc *crtc,
const struct intel_crtc_state *new_crtc_state)
{
struct intel_dpll_hw_state dpll_hw_state;
struct intel_dpll_hw_state dpll_hw_state = {};
u8 pipe_mask;
bool active;

memset(&dpll_hw_state, 0, sizeof(dpll_hw_state));

drm_dbg_kms(&i915->drm, "%s\n", pll->info->name);

active = intel_dpll_get_hw_state(i915, pll, &dpll_hw_state);
Expand Down

0 comments on commit 26fec3e

Please sign in to comment.