[Intel-gfx] [PATCH 4/6] drm/i915/sdvo: Shrink sdvo_cmd_names[] strings
Chris Wilson
chris at chris-wilson.co.uk
Wed Jun 19 18:13:02 UTC 2019
Quoting Ville Syrjala (2019-06-19 19:03:10)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Drop the redundant "SDVO_CMD_" prefix from the command name
> strings in sdvo_cmd_names[].
>
> While at it throw away the unused struct name, and undef
> SDVO_CMD_NAME_ENTRY() when we're done.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_sdvo.c | 219 +++++++++++-----------
> 1 file changed, 111 insertions(+), 108 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index 2de7948b7278..d1fd2bc01d82 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -274,124 +274,127 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
> return false;
> }
>
> -#define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd}
> +#define SDVO_CMD_NAME_ENTRY(cmd_) { .cmd = SDVO_CMD_ ## cmd_, .name = #cmd_ }
Shorter pretty name as well, but that will obvious from context.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list