[PATCH v3 xf86-video-modesetting 1/2] Staticise and constify output names

Aaron Plattner aplattner at nvidia.com
Tue Nov 26 12:27:52 PST 2013


Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

On 11/26/13 08:08, Thierry Reding wrote:
> This array isn't used anywhere outside this file, so it can be made
> static. While at it, make the array const as well.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
> Changes in v3:
> - update commit message to reflect prior change
>
> Changes in v2:
> - make output_names array static const char * const
>
>   src/drmmode_display.c | 32 ++++++++++++++++----------------
>   1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 773ec4c1c441..a343778432d5 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -961,22 +961,22 @@ static int subpixel_conv_table[7] = { 0, SubPixelUnknown,
>   				      SubPixelVerticalBGR,
>   				      SubPixelNone };
>
> -const char *output_names[] = { "None",
> -			       "VGA",
> -			       "DVI",
> -			       "DVI",
> -			       "DVI",
> -			       "Composite",
> -			       "S-video",
> -			       "LVDS",
> -			       "CTV",
> -			       "DIN",
> -			       "DisplayPort",
> -			       "HDMI",
> -			       "HDMI",
> -			       "TV",
> -			       "eDP",
> -			       "Virtual"
> +static const char * const output_names[] = { "None",
> +					     "VGA",
> +					     "DVI",
> +					     "DVI",
> +					     "DVI",
> +					     "Composite",
> +					     "S-video",
> +					     "LVDS",
> +					     "CTV",
> +					     "DIN",
> +					     "DisplayPort",
> +					     "HDMI",
> +					     "HDMI",
> +					     "TV",
> +					     "eDP",
> +					     "Virtual",
>   };
>
>   static void
>


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the xorg-devel mailing list