diff mbox

[3/3] modeprint: cleanup, remove compile warnings

Message ID 1438933078-23480-3-git-send-email-tapani.palli@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tapani Pälli Aug. 7, 2015, 7:37 a.m. UTC
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
---
 tests/modeprint/modeprint.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Thierry Reding Aug. 7, 2015, 12:04 p.m. UTC | #1
On Fri, Aug 07, 2015 at 10:37:58AM +0300, Tapani Pälli wrote:
> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
> ---
>  tests/modeprint/modeprint.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

I've had this exact same commit locally for a while now but never got
around to posting it.

Reviewed-by: Thierry Reding <treding@nvidia.com>
Emil Velikov Aug. 7, 2015, 3:05 p.m. UTC | #2
On 7 August 2015 at 08:37, Tapani Pälli <tapani.palli@intel.com> wrote:
> Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
> ---
>  tests/modeprint/modeprint.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/modeprint/modeprint.c b/tests/modeprint/modeprint.c
> index e6c6553..5e953f7 100644
> --- a/tests/modeprint/modeprint.c
> +++ b/tests/modeprint/modeprint.c
> @@ -61,6 +61,7 @@ static const char* getConnectionText(drmModeConnection conn)
>                 return "connected";
>         case DRM_MODE_DISCONNECTED:
>                 return "disconnected";
> +       case DRM_MODE_UNKNOWNCONNECTION:
>         default:
>                 return "unknown";
>         }
> @@ -124,9 +125,6 @@ static int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, ui
>                 }
>
>         } else {
> -               if (!strncmp(props->name, "DPMS", 4))
> -                       ;
> -
I've never bothered checking if this hunk was useful at some point. If
you had can you add a line in the commit log.

Regardless, the series is
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

Thanks for sticking with my suggestion and killing off the c_plusplus fossil.
-Emil
diff mbox

Patch

diff --git a/tests/modeprint/modeprint.c b/tests/modeprint/modeprint.c
index e6c6553..5e953f7 100644
--- a/tests/modeprint/modeprint.c
+++ b/tests/modeprint/modeprint.c
@@ -61,6 +61,7 @@  static const char* getConnectionText(drmModeConnection conn)
 		return "connected";
 	case DRM_MODE_DISCONNECTED:
 		return "disconnected";
+	case DRM_MODE_UNKNOWNCONNECTION:
 	default:
 		return "unknown";
 	}
@@ -124,9 +125,6 @@  static int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, ui
 		}
 
 	} else {
-		if (!strncmp(props->name, "DPMS", 4))
-			;
-
 		for (j = 0; j < props->count_enums; j++) {
 			printf("\t\t%lld = %s\n", props->enums[j].value, props->enums[j].name);
 			if (props->enums[j].value == value)