This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: media-ctl: Fix media device version printing
Author:  Laurent Pinchart <[email protected]>
Date:    Tue Jun 3 11:54:58 2014 +0200

Extract the version major, minor and patch level version components by
shifting right, not left.

Reported-by: Coverity Scan
Signed-off-by: Laurent Pinchart <[email protected]>

 utils/media-ctl/media-ctl.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=c48a7ddf7146ed853728fdf69e27494c9be5a979

diff --git a/utils/media-ctl/media-ctl.c b/utils/media-ctl/media-ctl.c
index d48969f..2686c47 100644
--- a/utils/media-ctl/media-ctl.c
+++ b/utils/media-ctl/media-ctl.c
@@ -366,9 +366,9 @@ int main(int argc, char **argv)
                const struct media_device_info *info = media_get_info(media);
 
                printf("Media controller API version %u.%u.%u\n\n",
-                      (info->media_version << 16) & 0xff,
-                      (info->media_version << 8) & 0xff,
-                      (info->media_version << 0) & 0xff);
+                      (info->media_version >> 16) & 0xff,
+                      (info->media_version >> 8) & 0xff,
+                      (info->media_version >> 0) & 0xff);
                printf("Media device information\n"
                       "------------------------\n"
                       "driver          %s\n"
@@ -380,9 +380,9 @@ int main(int argc, char **argv)
                       info->driver, info->model,
                       info->serial, info->bus_info,
                       info->hw_revision,
-                      (info->driver_version << 16) & 0xff,
-                      (info->driver_version << 8) & 0xff,
-                      (info->driver_version << 0) & 0xff);
+                      (info->driver_version >> 16) & 0xff,
+                      (info->driver_version >> 8) & 0xff,
+                      (info->driver_version >> 0) & 0xff);
        }
 
        if (media_opts.entity) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to