mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
drm: Miscellaneous checkpatch whitespace cleanups
A couple of whitespace changes required to silent various errors and warnings flagged by checkpatch. checkpatch requires that the opening brace be on the same line as a variable declaration. Furthermore an empty line is required after a block of variable declarations. Trailing whitespace as well as using spaces before tabs is considered an error or warning, respectively. Finally, the closing parenthesis of an if condition and the opening brace of the conditional block should be separated by a space. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
c422f31d56
commit
4dfd909f92
2 changed files with 22 additions and 23 deletions
|
@ -61,8 +61,8 @@ static struct drm_framebuffer *add_framebuffer_internal(struct drm_device *dev,
|
||||||
/*
|
/*
|
||||||
* Global properties
|
* Global properties
|
||||||
*/
|
*/
|
||||||
static const struct drm_prop_enum_list drm_dpms_enum_list[] =
|
static const struct drm_prop_enum_list drm_dpms_enum_list[] = {
|
||||||
{ { DRM_MODE_DPMS_ON, "On" },
|
{ DRM_MODE_DPMS_ON, "On" },
|
||||||
{ DRM_MODE_DPMS_STANDBY, "Standby" },
|
{ DRM_MODE_DPMS_STANDBY, "Standby" },
|
||||||
{ DRM_MODE_DPMS_SUSPEND, "Suspend" },
|
{ DRM_MODE_DPMS_SUSPEND, "Suspend" },
|
||||||
{ DRM_MODE_DPMS_OFF, "Off" }
|
{ DRM_MODE_DPMS_OFF, "Off" }
|
||||||
|
@ -70,8 +70,7 @@ static const struct drm_prop_enum_list drm_dpms_enum_list[] =
|
||||||
|
|
||||||
DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
|
DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_plane_type_enum_list[] =
|
static const struct drm_prop_enum_list drm_plane_type_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_PLANE_TYPE_OVERLAY, "Overlay" },
|
{ DRM_PLANE_TYPE_OVERLAY, "Overlay" },
|
||||||
{ DRM_PLANE_TYPE_PRIMARY, "Primary" },
|
{ DRM_PLANE_TYPE_PRIMARY, "Primary" },
|
||||||
{ DRM_PLANE_TYPE_CURSOR, "Cursor" },
|
{ DRM_PLANE_TYPE_CURSOR, "Cursor" },
|
||||||
|
@ -80,8 +79,7 @@ static const struct drm_prop_enum_list drm_plane_type_enum_list[] =
|
||||||
/*
|
/*
|
||||||
* Optional properties
|
* Optional properties
|
||||||
*/
|
*/
|
||||||
static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] =
|
static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_MODE_SCALE_NONE, "None" },
|
{ DRM_MODE_SCALE_NONE, "None" },
|
||||||
{ DRM_MODE_SCALE_FULLSCREEN, "Full" },
|
{ DRM_MODE_SCALE_FULLSCREEN, "Full" },
|
||||||
{ DRM_MODE_SCALE_CENTER, "Center" },
|
{ DRM_MODE_SCALE_CENTER, "Center" },
|
||||||
|
@ -97,8 +95,7 @@ static const struct drm_prop_enum_list drm_aspect_ratio_enum_list[] = {
|
||||||
/*
|
/*
|
||||||
* Non-global properties, but "required" for certain connectors.
|
* Non-global properties, but "required" for certain connectors.
|
||||||
*/
|
*/
|
||||||
static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] =
|
static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */
|
{ DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */
|
||||||
{ DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */
|
{ DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */
|
||||||
|
@ -106,8 +103,7 @@ static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] =
|
||||||
|
|
||||||
DRM_ENUM_NAME_FN(drm_get_dvi_i_select_name, drm_dvi_i_select_enum_list)
|
DRM_ENUM_NAME_FN(drm_get_dvi_i_select_name, drm_dvi_i_select_enum_list)
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] =
|
static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */
|
{ DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */
|
||||||
{ DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */
|
{ DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */
|
||||||
|
@ -116,8 +112,7 @@ static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] =
|
||||||
DRM_ENUM_NAME_FN(drm_get_dvi_i_subconnector_name,
|
DRM_ENUM_NAME_FN(drm_get_dvi_i_subconnector_name,
|
||||||
drm_dvi_i_subconnector_enum_list)
|
drm_dvi_i_subconnector_enum_list)
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_tv_select_enum_list[] =
|
static const struct drm_prop_enum_list drm_tv_select_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
|
{ DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
|
||||||
|
@ -127,8 +122,7 @@ static const struct drm_prop_enum_list drm_tv_select_enum_list[] =
|
||||||
|
|
||||||
DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list)
|
DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list)
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] =
|
static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] = {
|
||||||
{
|
|
||||||
{ DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
|
{ DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */
|
||||||
{ DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
|
{ DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */
|
||||||
|
@ -154,8 +148,8 @@ struct drm_conn_prop_enum_list {
|
||||||
/*
|
/*
|
||||||
* Connector and encoder types.
|
* Connector and encoder types.
|
||||||
*/
|
*/
|
||||||
static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
|
static struct drm_conn_prop_enum_list drm_connector_enum_list[] = {
|
||||||
{ { DRM_MODE_CONNECTOR_Unknown, "Unknown" },
|
{ DRM_MODE_CONNECTOR_Unknown, "Unknown" },
|
||||||
{ DRM_MODE_CONNECTOR_VGA, "VGA" },
|
{ DRM_MODE_CONNECTOR_VGA, "VGA" },
|
||||||
{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
|
{ DRM_MODE_CONNECTOR_DVII, "DVI-I" },
|
||||||
{ DRM_MODE_CONNECTOR_DVID, "DVI-D" },
|
{ DRM_MODE_CONNECTOR_DVID, "DVI-D" },
|
||||||
|
@ -174,8 +168,8 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
|
||||||
{ DRM_MODE_CONNECTOR_DSI, "DSI" },
|
{ DRM_MODE_CONNECTOR_DSI, "DSI" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_encoder_enum_list[] =
|
static const struct drm_prop_enum_list drm_encoder_enum_list[] = {
|
||||||
{ { DRM_MODE_ENCODER_NONE, "None" },
|
{ DRM_MODE_ENCODER_NONE, "None" },
|
||||||
{ DRM_MODE_ENCODER_DAC, "DAC" },
|
{ DRM_MODE_ENCODER_DAC, "DAC" },
|
||||||
{ DRM_MODE_ENCODER_TMDS, "TMDS" },
|
{ DRM_MODE_ENCODER_TMDS, "TMDS" },
|
||||||
{ DRM_MODE_ENCODER_LVDS, "LVDS" },
|
{ DRM_MODE_ENCODER_LVDS, "LVDS" },
|
||||||
|
@ -185,8 +179,7 @@ static const struct drm_prop_enum_list drm_encoder_enum_list[] =
|
||||||
{ DRM_MODE_ENCODER_DPMST, "DP MST" },
|
{ DRM_MODE_ENCODER_DPMST, "DP MST" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct drm_prop_enum_list drm_subpixel_enum_list[] =
|
static const struct drm_prop_enum_list drm_subpixel_enum_list[] = {
|
||||||
{
|
|
||||||
{ SubPixelUnknown, "Unknown" },
|
{ SubPixelUnknown, "Unknown" },
|
||||||
{ SubPixelHorizontalRGB, "Horizontal RGB" },
|
{ SubPixelHorizontalRGB, "Horizontal RGB" },
|
||||||
{ SubPixelHorizontalBGR, "Horizontal BGR" },
|
{ SubPixelHorizontalBGR, "Horizontal BGR" },
|
||||||
|
@ -1137,6 +1130,7 @@ EXPORT_SYMBOL(drm_encoder_init);
|
||||||
void drm_encoder_cleanup(struct drm_encoder *encoder)
|
void drm_encoder_cleanup(struct drm_encoder *encoder)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = encoder->dev;
|
struct drm_device *dev = encoder->dev;
|
||||||
|
|
||||||
drm_modeset_lock_all(dev);
|
drm_modeset_lock_all(dev);
|
||||||
drm_mode_object_put(dev, &encoder->base);
|
drm_mode_object_put(dev, &encoder->base);
|
||||||
kfree(encoder->name);
|
kfree(encoder->name);
|
||||||
|
@ -2958,6 +2952,7 @@ int drm_mode_cursor2_ioctl(struct drm_device *dev,
|
||||||
void *data, struct drm_file *file_priv)
|
void *data, struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
struct drm_mode_cursor2 *req = data;
|
struct drm_mode_cursor2 *req = data;
|
||||||
|
|
||||||
return drm_mode_cursor_common(dev, req, file_priv);
|
return drm_mode_cursor_common(dev, req, file_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4149,6 +4144,7 @@ static bool drm_property_change_is_valid(struct drm_property *property,
|
||||||
return true;
|
return true;
|
||||||
} else if (drm_property_type_is(property, DRM_MODE_PROP_SIGNED_RANGE)) {
|
} else if (drm_property_type_is(property, DRM_MODE_PROP_SIGNED_RANGE)) {
|
||||||
int64_t svalue = U642I64(value);
|
int64_t svalue = U642I64(value);
|
||||||
|
|
||||||
if (svalue < U642I64(property->values[0]) ||
|
if (svalue < U642I64(property->values[0]) ||
|
||||||
svalue > U642I64(property->values[1]))
|
svalue > U642I64(property->values[1]))
|
||||||
return false;
|
return false;
|
||||||
|
@ -4156,6 +4152,7 @@ static bool drm_property_change_is_valid(struct drm_property *property,
|
||||||
} else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
|
} else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) {
|
||||||
int i;
|
int i;
|
||||||
uint64_t valid_mask = 0;
|
uint64_t valid_mask = 0;
|
||||||
|
|
||||||
for (i = 0; i < property->num_values; i++)
|
for (i = 0; i < property->num_values; i++)
|
||||||
valid_mask |= (1ULL << property->values[i]);
|
valid_mask |= (1ULL << property->values[i]);
|
||||||
return !(value & ~valid_mask);
|
return !(value & ~valid_mask);
|
||||||
|
@ -4164,6 +4161,7 @@ static bool drm_property_change_is_valid(struct drm_property *property,
|
||||||
return true;
|
return true;
|
||||||
} else if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) {
|
} else if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) {
|
||||||
struct drm_mode_object *obj;
|
struct drm_mode_object *obj;
|
||||||
|
|
||||||
/* a zero value for an object property translates to null: */
|
/* a zero value for an object property translates to null: */
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -910,6 +910,7 @@ void drm_send_vblank_event(struct drm_device *dev, int crtc,
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
unsigned int seq;
|
unsigned int seq;
|
||||||
|
|
||||||
if (crtc >= 0) {
|
if (crtc >= 0) {
|
||||||
seq = drm_vblank_count_and_time(dev, crtc, &now);
|
seq = drm_vblank_count_and_time(dev, crtc, &now);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue