Skip to contentSkip to conversation

Removal of unused code

PATCH In review Petri Latvala 4 participants 10 messages Mar 8, 2017 – Mar 9, 2017 Library code

lore
Share & tools
lore
#0 lore raw

cover Removal of unused code

These four removals are ones the compiler was yelling at me for the loudest.

Petri Latvala (4):
lib/intel_device_info: Remove unused whitney definition tools/intel_vbt_decode: Remove unused code tests/testdisplay: Remove unused SPRITE_COLOR_KEY assembler/gen8_disasm.c: Remove unused m_mask_ctrl

 assembler/gen8_disasm.c  |  5 -----
 lib/intel_device_info.c  |  6 ------
 tests/testdisplay.c      |  1 -
 tools/intel_vbt_decode.c | 22 ----------------------
 4 files changed, 34 deletions(-)
Signature · 6 lines
2.9.3

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

PATCH 1/4 lib/intel_device_info: Remove unused whitney definition

---
 lib/intel_device_info.c | 6 ------
 1 file changed, 6 deletions(-)
lib/intel_device_info.c +0 -6
index db4f383..41d94b5 100644
@@ -9,12 +9,6 @@ static const struct intel_device_info intel_generic_info = {
 	.gen = 0,
 };
 
-static const struct intel_device_info intel_i81x_info = {
-	.gen = BIT(0),
-	.is_whitney = true,
-	.codename = "solano" /* 815 == "whitney" ? or vice versa? */
-};
-
 static const struct intel_device_info intel_i830_info = {
 	.gen = BIT(1),
 	.is_almador = true,
Signature · 6 lines
2.9.3

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

Re: [PATCH i-g-t 1/4] lib/intel_device_info: Remove unused whitney definition

Quoted 10 lines · Petri Latvala
---
 lib/intel_device_info.c | 6 ------
 1 file changed, 6 deletions(-)
lib/intel_device_info.c +0 -0
index db4f383..41d94b5 100644

lib/intel_device_info.c static const struct intel_device_info intel_generic_info = { · line 16

Quoted 8 lines
lib/intel_device_info.c +0 -5
@@ -9,12 +9,6 @@ static const struct intel_device_info intel_generic_info = {
 	.gen = 0,
 };
 
-static const struct intel_device_info intel_i81x_info = {
-	.gen = BIT(0),
-	.is_whitney = true,
-	.codename = "solano" /* 815 == "whitney" ? or vice versa? */
-};

No!!! Send the patches to enable gen1 in the kernel... :) -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH i-g-t 1/4] lib/intel_device_info: Remove unused whitney definition

Quoted 14 lines · Chris Wilson
Quoted 13 lines · Petri Latvala
---
 lib/intel_device_info.c | 6 ------
 1 file changed, 6 deletions(-)
lib/intel_device_info.c +0 -0
index db4f383..41d94b5 100644
@@ -9,12 +9,6 @@ static const struct intel_device_info intel_generic_info = {
 	.gen = 0,
 };
 
Quoted 7 lines

lib/intel_device_info.c static const struct intel_device_info intel_generic_info = { · line 16

Quoted 5 lines
lib/intel_device_info.c +0 -5
-static const struct intel_device_info intel_i81x_info = {
-	.gen = BIT(0),
-	.is_whitney = true,
-	.codename = "solano" /* 815 == "whitney" ? or vice versa? */
-};

No!!! Send the patches to enable gen1 in the kernel... :)

To be more specific, we could just add the pci-ids to i915_pciids.h and start preparing for the support.
-Chris

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

PATCH 2/4 tools/intel_vbt_decode: Remove unused code

In reply to Petri Latvala

efp_conn() and related have been unused since 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")

---
 tools/intel_vbt_decode.c | 22 ----------------------
 1 file changed, 22 deletions(-)
tools/intel_vbt_decode.c +0 -22
index 301cd1c..2984a11 100644
@@ -372,28 +372,6 @@ static const char *efp_port(uint8_t type)
 	return "unknown";
 }
 
-static const struct {
-	unsigned short type;
-	const char *name;
-} efp_conn_info[] = {
-	{ DEVICE_INFO_NONE, "N/A" },
-	{ DEVICE_INFO_HDMI_CERT, "HDMI certified" },
-	{ DEVICE_INFO_DP, "DisplayPort" },
-	{ DEVICE_INFO_DVI, "DVI" },
-};
-static const int num_efp_conn_info = sizeof(efp_conn_info) / sizeof(efp_conn_info[0]);
-
-static const char *efp_conn(uint8_t type)
-{
-	int i;
-
-	for (i = 0; i < num_efp_conn_info; i++)
-		if (efp_conn_info[i].type == type)
-			return efp_conn_info[i].name;
-
-	return "unknown";
-}
-
 static void dump_child_device(struct context *context,
 			      const struct child_device_config *child)
 {
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH i-g-t 2/4] tools/intel_vbt_decode: Remove unused code

Quoted 5 lines · Petri Latvala

efp_conn() and related have been unused since 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")

Quoted 37 lines
---
 tools/intel_vbt_decode.c | 22 ----------------------
 1 file changed, 22 deletions(-)
tools/intel_vbt_decode.c +0 -22
index 301cd1c..2984a11 100644
@@ -372,28 +372,6 @@ static const char *efp_port(uint8_t type)
 	return "unknown";
 }
 
-static const struct {
-	unsigned short type;
-	const char *name;
-} efp_conn_info[] = {
-	{ DEVICE_INFO_NONE, "N/A" },
-	{ DEVICE_INFO_HDMI_CERT, "HDMI certified" },
-	{ DEVICE_INFO_DP, "DisplayPort" },
-	{ DEVICE_INFO_DVI, "DVI" },
-};
-static const int num_efp_conn_info = sizeof(efp_conn_info) / sizeof(efp_conn_info[0]);
-
-static const char *efp_conn(uint8_t type)
-{
-	int i;
-
-	for (i = 0; i < num_efp_conn_info; i++)
-		if (efp_conn_info[i].type == type)
-			return efp_conn_info[i].name;
-
-	return "unknown";
-}
-
 static void dump_child_device(struct context *context,
 			      const struct child_device_config *child)
 {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH 3/4 tests/testdisplay: Remove unused SPRITE_COLOR_KEY

In reply to Petri Latvala

Unused since 99bdf4f0ff3e ("tests/testdisplay: Use cairo helpers to draw to plane")

---
 tests/testdisplay.c | 1 -
 1 file changed, 1 deletion(-)
tests/testdisplay.c +0 -1
index a974f42..f2a41fa 100644
@@ -96,7 +96,6 @@ unsigned int plane_fb_id;
 unsigned int plane_crtc_id;
 unsigned int plane_id;
 int plane_width, plane_height;
-static const uint32_t SPRITE_COLOR_KEY = 0x00aaaaaa;
 
 /*
  * Mode setting with the kernel interfaces is a bit of a chore.
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 3/4
#7 lore raw

Re: [PATCH i-g-t 3/4] tests/testdisplay: Remove unused SPRITE_COLOR_KEY

Quoted 4 lines · Petri Latvala

Unused since 99bdf4f0ff3e ("tests/testdisplay: Use cairo helpers to draw to plane")

Quoted 13 lines

---
 tests/testdisplay.c | 1 -

 1 file changed, 1 deletion(-)
tests/testdisplay.c +0 -1
index a974f42..f2a41fa 100644
@@ -96,7 +96,6 @@ unsigned int plane_fb_id;
  unsigned int plane_crtc_id;
  unsigned int plane_id;
  int plane_width, plane_height;
-static const uint32_t SPRITE_COLOR_KEY = 0x00aaaaaa;
Quoted 3 lines


 /*
  * Mode setting with the kernel interfaces is a bit of a chore.

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

#8 lore raw

PATCH 4/4 assembler/gen8_disasm.c: Remove unused m_mask_ctrl

In reply to Petri Latvala
---
 assembler/gen8_disasm.c | 5 -----
 1 file changed, 5 deletions(-)
assembler/gen8_disasm.c +0 -5
index 7fc7a65..68bc033 100644
@@ -138,11 +138,6 @@ static const char *const m_dep_ctrl[4] = {
    "NoDDClr,NoDDChk",
 };
 
-static const char *const m_mask_ctrl[4] = {
-   "",
-   "nomask",
-};
-
 static const char *const m_access_mode[2] = { "align1", "align16" };
 
 static const char *const m_reg_type[8] = {
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 4/4
#9 lore raw

Re: [PATCH i-g-t 4/4] assembler/gen8_disasm.c: Remove unused m_mask_ctrl

Quoted 1 line · Petri Latvala
Quoted 17 lines

---
 assembler/gen8_disasm.c | 5 -----

 1 file changed, 5 deletions(-)
assembler/gen8_disasm.c +0 -0
index 7fc7a65..68bc033 100644
@@ -138,11 +138,6 @@ static const char *const m_dep_ctrl[4] = {
     "NoDDClr,NoDDChk",
  };

assembler/gen8_disasm.c +0 -5
-static const char *const m_mask_ctrl[4] = {
-   "",
-   "nomask",
-};
-
Quoted 3 lines

 static const char *const m_access_mode[2] = { "align1", "align16" };
 static const char *const m_reg_type[8] = {

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