Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm Pull up f...



details:   https://anonhg.NetBSD.org/src/rev/92f5042b2bc9
branches:  netbsd-7
changeset: 798888:92f5042b2bc9
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 23 16:29:36 2015 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #446):
        sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c: revision 1.15
More count vs ret confusion. Need to send notification if count != 0.

diffstat:

 sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 737257d1e630 -r 92f5042b2bc9 sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
--- a/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c       Fri Jan 23 10:11:10 2015 +0000
+++ b/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c       Fri Jan 23 16:29:36 2015 +0000
@@ -718,6 +718,7 @@
 
        case VCHIQ_IOC_AWAIT_COMPLETION: {
                VCHIQ_AWAIT_COMPLETION_T *pargs = arg;
+               int count = 0;
 
                DEBUG_TRACE(AWAIT_COMPLETION_LINE);
                if (!instance->connected) {
@@ -752,9 +753,8 @@
 
                if (ret == 0) {
                        int msgbufcount = pargs->msgbufcount;
-                       int count;
-
-                       for (count = 0; count < pargs->count; count++) {
+
+                       for (; count < pargs->count; count++) {
                                VCHIQ_COMPLETION_DATA_T *completion;
                                VCHIQ_SERVICE_T *service1;
                                USER_SERVICE_T *user_service;
@@ -847,7 +847,7 @@
                        pargs->count = count;
                }
 
-               if (ret != 0)
+               if (count != 0)
                        up(&instance->remove_event);
                lmutex_unlock(&instance->completion_mutex);
                DEBUG_TRACE(AWAIT_COMPLETION_LINE);



Home | Main Index | Thread Index | Old Index