[Mesa-dev] [PATCH 01/10] i965: Silence unused parameter warning
Ian Romanick
idr at freedesktop.org
Thu Mar 10 18:25:10 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
Remove the parameter. Also, reformat the function definition to match
Mesa coding style.
brw_state_dump.c: In function ‘q_to_float’:
brw_state_dump.c:266:44: warning: unused parameter ‘integer_end’ [-Wunused-parameter]
static float q_to_float(uint32_t data, int integer_end, int integer_start,
^
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/brw_state_dump.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index 4666788..6450f9b 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -263,8 +263,9 @@ static void dump_gen7_surface_state(struct brw_context *brw, uint32_t offset)
batch_out(brw, name, offset, 7, "\n");
}
-static float q_to_float(uint32_t data, int integer_end, int integer_start,
- int fractional_end, int fractional_start)
+static float
+q_to_float(uint32_t data, int integer_start,
+ int fractional_end, int fractional_start)
{
/* Convert the number to floating point. */
float n = GET_BITS(data, integer_start, fractional_end);
@@ -305,7 +306,7 @@ dump_gen8_surface_state(struct brw_context *brw, uint32_t offset, int index)
surface_tiling[GET_BITS(surf[0], 13, 12)]);
batch_out(brw, name, offset, 1, "MOCS: 0x%x Base MIP: %.1f (%u mips) Surface QPitch: %d\n",
GET_FIELD(surf[1], GEN8_SURFACE_MOCS),
- q_to_float(surf[1], 23, 20, 19, 19),
+ q_to_float(surf[1], 20, 19, 19),
surf[5] & INTEL_MASK(3, 0),
GET_FIELD(surf[1], GEN8_SURFACE_QPITCH) << 2);
batch_out(brw, name, offset, 2, "%dx%d [%s]\n",
--
2.5.0
More information about the mesa-dev
mailing list