Commit 837fea29 authored by Ville Syrjälä's avatar Ville Syrjälä

lib/kms: Constify some string arrays

Make a bunch of string arrays const.
Signed-off-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch> #irc
parent ddc4ffb0
......@@ -158,7 +158,7 @@ const unsigned char* igt_kms_get_base_edid(void)
#define EDID_NAME alt_edid
#include "igt_edid_template.h"
const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
"SRC_X",
"SRC_Y",
"SRC_W",
......@@ -175,7 +175,7 @@ const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
"IN_FORMATS",
};
const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
"background_color",
"CTM",
"GAMMA_LUT",
......@@ -187,7 +187,7 @@ const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
"OUT_FENCE_PTR"
};
const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
"scaling mode",
"CRTC_ID",
"DPMS",
......@@ -200,7 +200,7 @@ const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
*/
static void
igt_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
int num_props, const char **prop_names)
int num_props, const char * const prop_names[])
{
drmModeObjectPropertiesPtr props;
int i, j, fd;
......@@ -234,7 +234,7 @@ igt_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
*/
static void
igt_atomic_fill_connector_props(igt_display_t *display, igt_output_t *output,
int num_connector_props, const char **conn_prop_names)
int num_connector_props, const char * const conn_prop_names[])
{
drmModeObjectPropertiesPtr props;
int i, j, fd;
......@@ -264,7 +264,7 @@ igt_atomic_fill_connector_props(igt_display_t *display, igt_output_t *output,
static void
igt_fill_pipe_props(igt_display_t *display, igt_pipe_t *pipe,
int num_crtc_props, const char **crtc_prop_names)
int num_crtc_props, const char * const crtc_prop_names[])
{
drmModeObjectPropertiesPtr props;
int i, j, fd;
......@@ -324,7 +324,9 @@ const unsigned char* igt_kms_get_alt_edid(void)
*/
const char *kmstest_pipe_name(enum pipe pipe)
{
const char *str[] = { "A", "B", "C", "D", "E", "F"};
static const char * const str[] = {
"A", "B", "C", "D", "E", "F",
};
if (pipe == PIPE_NONE)
return "None";
......@@ -367,7 +369,7 @@ int kmstest_pipe_to_index(char pipe)
*/
const char *kmstest_plane_type_name(int plane_type)
{
static const char *names[] = {
static const char * const names[] = {
[DRM_PLANE_TYPE_OVERLAY] = "overlay",
[DRM_PLANE_TYPE_PRIMARY] = "primary",
[DRM_PLANE_TYPE_CURSOR] = "cursor",
......
......@@ -113,7 +113,7 @@ enum igt_atomic_crtc_properties {
* igt_crtc_prop_names contains a list of crtc property names,
* as indexed by the igt_atomic_crtc_properties enum.
*/
extern const char *igt_crtc_prop_names[];
extern const char * const igt_crtc_prop_names[];
enum igt_atomic_connector_properties {
IGT_CONNECTOR_SCALING_MODE = 0,
......@@ -129,7 +129,7 @@ enum igt_atomic_connector_properties {
* igt_connector_prop_names contains a list of crtc property names,
* as indexed by the igt_atomic_connector_properties enum.
*/
extern const char *igt_connector_prop_names[];
extern const char * const igt_connector_prop_names[];
struct kmstest_connector_config {
drmModeCrtc *crtc;
......@@ -272,7 +272,7 @@ enum igt_atomic_plane_properties {
* igt_plane_prop_names contains a list of crtc property names,
* as indexed by the igt_atomic_plane_properties enum.
*/
extern const char *igt_plane_prop_names[];
extern const char * const igt_plane_prop_names[];
typedef struct igt_display igt_display_t;
typedef struct igt_pipe igt_pipe_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment