[Intel-gfx] [PATCH 02/22] drm/i915: Shrink sdvo_cmd_names
Daniel Vetter
daniel at ffwll.ch
Thu Oct 13 14:03:42 UTC 2016
On Wed, Oct 05, 2016 at 01:33:29PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Pack the struct _sdvo_cmd_name to save 736 bytes of .rodata.
>
> This is fine since the name pointers are used only for debug.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_sdvo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index a061b0029797..9f352aac9526 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -307,7 +307,7 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
> static const struct _sdvo_cmd_name {
> u8 cmd;
> const char *name;
> -} sdvo_cmd_names[] = {
> +} __attribute__ ((packed)) sdvo_cmd_names[] = {
> SDVO_CMD_NAME_ENTRY(SDVO_CMD_RESET),
> SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_DEVICE_CAPS),
> SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_FIRMWARE_REV),
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list