* [PATCH libdrm 1/4] tests: remove unused variables
2015-02-23 14:56 [PATCH libdrm 00/04] Silence compiler warnings Emil Velikov
@ 2015-02-23 14:56 ` Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 2/4] exynos_fimg2d_test: " Emil Velikov
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2015-02-23 14:56 UTC (permalink / raw)
To: dri-devel; +Cc: emil.l.velikov
As kindly pointed out by GCC.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/name_from_fd.c | 3 +--
tests/updatedraw.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/name_from_fd.c b/tests/name_from_fd.c
index e3db413..24af6e6 100644
--- a/tests/name_from_fd.c
+++ b/tests/name_from_fd.c
@@ -40,8 +40,7 @@
*/
int main(int argc, char **argv)
{
- int fd, ret;
- drm_set_version_t sv, version;
+ int fd;
const char *name = "/dev/dri/card0";
char *v;
diff --git a/tests/updatedraw.c b/tests/updatedraw.c
index 8e0b94b..d01fa96 100644
--- a/tests/updatedraw.c
+++ b/tests/updatedraw.c
@@ -122,7 +122,7 @@ static int rm_drawable(int fd, int drawable, int fail)
*/
int main(int argc, char **argv)
{
- int fd, ret, d1, d2;
+ int fd, d1, d2;
if (getuid() != 0) {
fprintf(stderr, "updatedraw test requires root, skipping\n");
--
2.3.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH libdrm 2/4] exynos_fimg2d_test: remove unused variables
2015-02-23 14:56 [PATCH libdrm 00/04] Silence compiler warnings Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 1/4] tests: remove unused variables Emil Velikov
@ 2015-02-23 14:56 ` Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 3/4] exynos_fimg2d_test: remove unused function connector_find_plane() Emil Velikov
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2015-02-23 14:56 UTC (permalink / raw)
To: dri-devel; +Cc: Kyungmin Park, emil.l.velikov
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/exynos/exynos_fimg2d_test.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index f141964..17e8e53 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -269,7 +269,6 @@ static int g2d_copy_test(struct exynos_device *dev, struct exynos_bo *src,
{
struct g2d_context *ctx;
struct g2d_image src_img, dst_img;
- unsigned int count;
unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;
unsigned long userptr, size;
int ret;
@@ -353,7 +352,6 @@ static int g2d_copy_with_scale_test(struct exynos_device *dev,
{
struct g2d_context *ctx;
struct g2d_image src_img, dst_img;
- unsigned int count;
unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;
unsigned long userptr, size;
int ret;
@@ -442,7 +440,6 @@ static int g2d_blend_test(struct exynos_device *dev,
{
struct g2d_context *ctx;
struct g2d_image src_img, dst_img;
- unsigned int count;
unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;
unsigned long userptr, size;
int ret;
@@ -557,7 +554,6 @@ int main(int argc, char **argv)
struct exynos_device *dev;
struct exynos_bo *bo, *src;
struct connector con;
- char *modeset = NULL;
unsigned int fb_id;
uint32_t handles[4] = {0}, pitches[4] = {0}, offsets[4] = {0};
drmModeRes *resources;
@@ -573,7 +569,6 @@ int main(int argc, char **argv)
while ((c = getopt(argc, argv, optstr)) != -1) {
switch (c) {
case 's':
- modeset = strdup(optarg);
con.crtc = -1;
if (sscanf(optarg, "%d:0x%64s",
&con.id,
--
2.3.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH libdrm 3/4] exynos_fimg2d_test: remove unused function connector_find_plane()
2015-02-23 14:56 [PATCH libdrm 00/04] Silence compiler warnings Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 1/4] tests: remove unused variables Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 2/4] exynos_fimg2d_test: " Emil Velikov
@ 2015-02-23 14:56 ` Emil Velikov
2015-02-23 14:56 ` [PATCH libdrm 4/4] tests/radeon: set the list* functions as inline Emil Velikov
2015-02-25 17:09 ` [PATCH libdrm 00/04] Silence compiler warnings Jan Vesely
4 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2015-02-23 14:56 UTC (permalink / raw)
To: dri-devel; +Cc: Kyungmin Park, emil.l.velikov
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/exynos/exynos_fimg2d_test.c | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index 17e8e53..dc7c5cb 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -142,37 +142,6 @@ static void connector_find_mode(int fd, struct connector *c,
c->crtc = c->encoder->crtc_id;
}
-static int connector_find_plane(int fd, unsigned int *plane_id)
-{
- drmModePlaneRes *plane_resources;
- drmModePlane *ovr;
- int i;
-
- plane_resources = drmModeGetPlaneResources(fd);
- if (!plane_resources) {
- fprintf(stderr, "drmModeGetPlaneResources failed: %s\n",
- strerror(errno));
- return -1;
- }
-
- for (i = 0; i < plane_resources->count_planes; i++) {
- plane_id[i] = 0;
-
- ovr = drmModeGetPlane(fd, plane_resources->planes[i]);
- if (!ovr) {
- fprintf(stderr, "drmModeGetPlane failed: %s\n",
- strerror(errno));
- continue;
- }
-
- if (ovr->possible_crtcs & (1 << 0))
- plane_id[i] = ovr->plane_id;
- drmModeFreePlane(ovr);
- }
-
- return 0;
-}
-
static int drm_set_crtc(struct exynos_device *dev, struct connector *c,
unsigned int fb_id)
{
--
2.3.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH libdrm 4/4] tests/radeon: set the list* functions as inline
2015-02-23 14:56 [PATCH libdrm 00/04] Silence compiler warnings Emil Velikov
` (2 preceding siblings ...)
2015-02-23 14:56 ` [PATCH libdrm 3/4] exynos_fimg2d_test: remove unused function connector_find_plane() Emil Velikov
@ 2015-02-23 14:56 ` Emil Velikov
2015-02-25 17:09 ` [PATCH libdrm 00/04] Silence compiler warnings Jan Vesely
4 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2015-02-23 14:56 UTC (permalink / raw)
To: dri-devel; +Cc: Jerome Glisse, emil.l.velikov
To silence the chatty compiler.
As a future work we may want to merge these with libdrm_lists.h
Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
tests/radeon/list.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/radeon/list.h b/tests/radeon/list.h
index 305c903..27e0761 100644
--- a/tests/radeon/list.h
+++ b/tests/radeon/list.h
@@ -44,13 +44,13 @@ struct list_head
struct list_head *next;
};
-static void list_inithead(struct list_head *item)
+static inline void list_inithead(struct list_head *item)
{
item->prev = item;
item->next = item;
}
-static void list_add(struct list_head *item, struct list_head *list)
+static inline void list_add(struct list_head *item, struct list_head *list)
{
item->prev = list;
item->next = list->next;
@@ -58,7 +58,7 @@ static void list_add(struct list_head *item, struct list_head *list)
list->next = item;
}
-static void list_addtail(struct list_head *item, struct list_head *list)
+static inline void list_addtail(struct list_head *item, struct list_head *list)
{
item->next = list;
item->prev = list->prev;
@@ -66,7 +66,7 @@ static void list_addtail(struct list_head *item, struct list_head *list)
list->prev = item;
}
-static void list_replace(struct list_head *from, struct list_head *to)
+static inline void list_replace(struct list_head *from, struct list_head *to)
{
to->prev = from->prev;
to->next = from->next;
@@ -74,13 +74,13 @@ static void list_replace(struct list_head *from, struct list_head *to)
from->prev->next = to;
}
-static void list_del(struct list_head *item)
+static inline void list_del(struct list_head *item)
{
item->prev->next = item->next;
item->next->prev = item->prev;
}
-static void list_delinit(struct list_head *item)
+static inline void list_delinit(struct list_head *item)
{
item->prev->next = item->next;
item->next->prev = item->prev;
--
2.3.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH libdrm 00/04] Silence compiler warnings
2015-02-23 14:56 [PATCH libdrm 00/04] Silence compiler warnings Emil Velikov
` (3 preceding siblings ...)
2015-02-23 14:56 ` [PATCH libdrm 4/4] tests/radeon: set the list* functions as inline Emil Velikov
@ 2015-02-25 17:09 ` Jan Vesely
2015-02-25 18:43 ` Emil Velikov
4 siblings, 1 reply; 8+ messages in thread
From: Jan Vesely @ 2015-02-25 17:09 UTC (permalink / raw)
To: Emil Velikov; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 646 bytes --]
Hi,
you can add
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
to 1,2, and 4.
I think 3 needs someone from exynos to say whether the function should
not be used somewhere (just to be on the safe side).
jan
On Mon, 2015-02-23 at 14:56 +0000, Emil Velikov wrote:
> Short follow up to my earlier series "The rocky road to building with
> -Wextra". This gets rid of ~20 warnings, with ~45 remainig.
>
> -Emil
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Jan Vesely <jan.vesely@rutgers.edu>
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH libdrm 00/04] Silence compiler warnings
2015-02-25 17:09 ` [PATCH libdrm 00/04] Silence compiler warnings Jan Vesely
@ 2015-02-25 18:43 ` Emil Velikov
2015-02-27 16:21 ` Emil Velikov
0 siblings, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2015-02-25 18:43 UTC (permalink / raw)
To: Jan Vesely; +Cc: emil.l.velikov, dri-devel
On 25/02/15 17:09, Jan Vesely wrote:
> Hi,
>
> you can add
> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
> to 1,2, and 4.
> I think 3 needs someone from exynos to say whether the function should
> not be used somewhere (just to be on the safe side).
>
Great, thanks.
For anyone interested I will give it a few days, and I'll push both
series (minus patch 3 here).
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH libdrm 00/04] Silence compiler warnings
2015-02-25 18:43 ` Emil Velikov
@ 2015-02-27 16:21 ` Emil Velikov
0 siblings, 0 replies; 8+ messages in thread
From: Emil Velikov @ 2015-02-27 16:21 UTC (permalink / raw)
To: Jan Vesely; +Cc: Emil Velikov, ML dri-devel
On 25 February 2015 at 18:43, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 25/02/15 17:09, Jan Vesely wrote:
>> Hi,
>>
>> you can add
>> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
>> to 1,2, and 4.
>> I think 3 needs someone from exynos to say whether the function should
>> not be used somewhere (just to be on the safe side).
>>
> Great, thanks.
>
> For anyone interested I will give it a few days, and I'll push both
> series (minus patch 3 here).
>
Pushed to master.
We have just gained some 40+ build warnings. Lucky us :-P
-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread