mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
drm/i915/dmc: simplify stepping info initialization
Having intel_get_stepping_info() return the pointer that was passed in isn't necessary. Just use a pointer to the local variable instead. The initialization to ** didn't make a difference, because it was always overridden. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patch.msgid.link/c9affb82fd3e9fb464778013bb7c8fab06232bfd.1773663208.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
1cabff0d18
commit
902d174c6f
|
|
@ -418,15 +418,12 @@ bool intel_dmc_has_payload(struct intel_display *display)
|
|||
return has_dmc_id_fw(display, DMC_FW_MAIN);
|
||||
}
|
||||
|
||||
static const struct stepping_info *
|
||||
intel_get_stepping_info(struct intel_display *display,
|
||||
struct stepping_info *si)
|
||||
static void initialize_stepping_info(struct intel_display *display, struct stepping_info *si)
|
||||
{
|
||||
const char *step_name = intel_step_name(INTEL_DISPLAY_STEP(display));
|
||||
|
||||
si->stepping = step_name[0];
|
||||
si->substepping = step_name[1];
|
||||
return si;
|
||||
}
|
||||
|
||||
static void gen9_set_dc_state_debugmask(struct intel_display *display)
|
||||
|
|
@ -1274,8 +1271,7 @@ static int parse_dmc_fw(struct intel_dmc *dmc, const struct firmware *fw)
|
|||
struct intel_css_header *css_header;
|
||||
struct intel_package_header *package_header;
|
||||
struct intel_dmc_header_base *dmc_header;
|
||||
struct stepping_info display_info = { '*', '*'};
|
||||
const struct stepping_info *si = intel_get_stepping_info(display, &display_info);
|
||||
struct stepping_info si = {};
|
||||
enum intel_dmc_id dmc_id;
|
||||
u32 readcount = 0;
|
||||
u32 r, offset;
|
||||
|
|
@ -1283,6 +1279,8 @@ static int parse_dmc_fw(struct intel_dmc *dmc, const struct firmware *fw)
|
|||
if (!fw)
|
||||
return -EINVAL;
|
||||
|
||||
initialize_stepping_info(display, &si);
|
||||
|
||||
/* Extract CSS Header information */
|
||||
css_header = (struct intel_css_header *)fw->data;
|
||||
r = parse_dmc_fw_css(dmc, css_header, fw->size);
|
||||
|
|
@ -1293,7 +1291,7 @@ static int parse_dmc_fw(struct intel_dmc *dmc, const struct firmware *fw)
|
|||
|
||||
/* Extract Package Header information */
|
||||
package_header = (struct intel_package_header *)&fw->data[readcount];
|
||||
r = parse_dmc_fw_package(dmc, package_header, si, fw->size - readcount);
|
||||
r = parse_dmc_fw_package(dmc, package_header, &si, fw->size - readcount);
|
||||
if (!r)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user