Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f48641c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull gcc-plugin prepwork from Kees Cook:
 "Use designated initializers for mtk-vcodec, powerplay, amdgpu, and
  sgi-xp. Use ERR_CAST() to avoid cross-structure cast in ocf2, ntfs,
  and NFS.

  Christoph Hellwig recommended that I send these fixes now, rather than
  waiting for the v4.13 merge window. These are all initializer and cast
  fixes needed for the future randstruct plugin that haven't been picked
  up by the respective maintainers"

* tag 'gcc-plugins-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  mtk-vcodec: Use designated initializers
  drm/amd/powerplay: Use designated initializers
  drm/amdgpu: Use designated initializers
  sgi-xp: Use designated initializers
  ocfs2: Use ERR_CAST() to avoid cross-structure cast
  ntfs: Use ERR_CAST() to avoid cross-structure cast
  NFS: Use ERR_CAST() to avoid cross-structure cast
parents 9ea15a59 243dd05d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -220,9 +220,9 @@ static void amdgpu_vram_mgr_debug(struct ttm_mem_type_manager *man,
}

const struct ttm_mem_type_manager_func amdgpu_vram_mgr_func = {
	amdgpu_vram_mgr_init,
	amdgpu_vram_mgr_fini,
	amdgpu_vram_mgr_new,
	amdgpu_vram_mgr_del,
	amdgpu_vram_mgr_debug
	.init		= amdgpu_vram_mgr_init,
	.takedown	= amdgpu_vram_mgr_fini,
	.get_node	= amdgpu_vram_mgr_new,
	.put_node	= amdgpu_vram_mgr_del,
	.debug		= amdgpu_vram_mgr_debug
};
+10 −10
Original line number Diff line number Diff line
@@ -709,17 +709,17 @@ static int tf_vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr,

static struct phm_master_table_item
vega10_thermal_start_thermal_controller_master_list[] = {
	{NULL, tf_vega10_thermal_initialize},
	{NULL, tf_vega10_thermal_set_temperature_range},
	{NULL, tf_vega10_thermal_enable_alert},
	{ .tableFunction = tf_vega10_thermal_initialize },
	{ .tableFunction = tf_vega10_thermal_set_temperature_range },
	{ .tableFunction = tf_vega10_thermal_enable_alert },
/* We should restrict performance levels to low before we halt the SMC.
 * On the other hand we are still in boot state when we do this
 * so it would be pointless.
 * If this assumption changes we have to revisit this table.
 */
	{NULL, tf_vega10_thermal_setup_fan_table},
	{NULL, tf_vega10_thermal_start_smc_fan_control},
	{NULL, NULL}
	{ .tableFunction = tf_vega10_thermal_setup_fan_table },
	{ .tableFunction = tf_vega10_thermal_start_smc_fan_control },
	{ }
};

static struct phm_master_table_header
@@ -731,10 +731,10 @@ vega10_thermal_start_thermal_controller_master = {

static struct phm_master_table_item
vega10_thermal_set_temperature_range_master_list[] = {
	{NULL, tf_vega10_thermal_disable_alert},
	{NULL, tf_vega10_thermal_set_temperature_range},
	{NULL, tf_vega10_thermal_enable_alert},
	{NULL, NULL}
	{ .tableFunction = tf_vega10_thermal_disable_alert },
	{ .tableFunction = tf_vega10_thermal_set_temperature_range },
	{ .tableFunction = tf_vega10_thermal_enable_alert },
	{ }
};

struct phm_master_table_header
+4 −4
Original line number Diff line number Diff line
@@ -493,10 +493,10 @@ static int vdec_h264_get_param(unsigned long h_vdec,
}

static struct vdec_common_if vdec_h264_if = {
	vdec_h264_init,
	vdec_h264_decode,
	vdec_h264_get_param,
	vdec_h264_deinit,
	.init		= vdec_h264_init,
	.decode		= vdec_h264_decode,
	.get_param	= vdec_h264_get_param,
	.deinit		= vdec_h264_deinit,
};

struct vdec_common_if *get_h264_dec_comm_if(void);
+4 −4
Original line number Diff line number Diff line
@@ -620,10 +620,10 @@ static void vdec_vp8_deinit(unsigned long h_vdec)
}

static struct vdec_common_if vdec_vp8_if = {
	vdec_vp8_init,
	vdec_vp8_decode,
	vdec_vp8_get_param,
	vdec_vp8_deinit,
	.init		= vdec_vp8_init,
	.decode		= vdec_vp8_decode,
	.get_param	= vdec_vp8_get_param,
	.deinit		= vdec_vp8_deinit,
};

struct vdec_common_if *get_vp8_dec_comm_if(void);
+4 −4
Original line number Diff line number Diff line
@@ -979,10 +979,10 @@ static int vdec_vp9_get_param(unsigned long h_vdec,
}

static struct vdec_common_if vdec_vp9_if = {
	vdec_vp9_init,
	vdec_vp9_decode,
	vdec_vp9_get_param,
	vdec_vp9_deinit,
	.init		= vdec_vp9_init,
	.decode		= vdec_vp9_decode,
	.get_param	= vdec_vp9_get_param,
	.deinit		= vdec_vp9_deinit,
};

struct vdec_common_if *get_vp9_dec_comm_if(void);
Loading