am 1ef2354f: Merge "[MIPS] Expand TABS and remove redundant return parenthesis."

* commit '1ef2354fa780df42c8d42af4300f63d81ae7b52d':
  [MIPS] Expand TABS and remove redundant return parenthesis.
This commit is contained in:
Andrew Hsieh
2013-02-21 14:20:57 -08:00
committed by Android Git Automerger
7 changed files with 80 additions and 81 deletions

View File

@@ -92,5 +92,5 @@ int clone_portable(int (*fn)(void *), void *child_stack, int port_flags, void *a
new_tls, child_tidptr); new_tls, child_tidptr);
ALOGV("%s: return(ret:%d); }", __func__, ret); ALOGV("%s: return(ret:%d); }", __func__, ret);
return(ret); return ret;
} }

View File

@@ -58,7 +58,7 @@ static char *map_portable_cmd_to_name(int cmd)
case F_DUPFD_CLOEXEC_PORTABLE: name = "F_DUPFD_CLOEXEC_PORTABLE"; break; /* 1030 */ case F_DUPFD_CLOEXEC_PORTABLE: name = "F_DUPFD_CLOEXEC_PORTABLE"; break; /* 1030 */
default: name = "<UNKNOWN>"; break; default: name = "<UNKNOWN>"; break;
} }
return(name); return name;
} }
static int mips_change_cmd(int cmd) static int mips_change_cmd(int cmd)
@@ -102,15 +102,15 @@ static int mips_change_cmd(int cmd)
return F_NOTIFY; return F_NOTIFY;
case F_CANCELLK_PORTABLE: /* 1029 --> void */ case F_CANCELLK_PORTABLE: /* 1029 --> void */
ALOGE("%s: case F_CANCELLK_PORTABLE: Not likely supported by MIPS.", __func__); ALOGE("%s: case F_CANCELLK_PORTABLE: Not likely supported by MIPS.", __func__);
return(cmd); return cmd;
case F_DUPFD_CLOEXEC_PORTABLE: /* 1030 --> VOID */ case F_DUPFD_CLOEXEC_PORTABLE: /* 1030 --> VOID */
ALOGE("%s: case F_DUPFD_CLOEXEC_PORTABLE: Not likely supported by MIPS.", __func__); ALOGE("%s: case F_DUPFD_CLOEXEC_PORTABLE: Not likely supported by MIPS.", __func__);
return(cmd); return cmd;
default: default:
ALOGE("%s: cmd:%d Not Supported", __func__, cmd); ALOGE("%s: cmd:%d Not Supported", __func__, cmd);
/* Fall thru and default to the command being the same */ /* Fall thru and default to the command being the same */
} }
return(cmd); return cmd;
} }
static int mips_change_flags(int flags) static int mips_change_flags(int flags)
@@ -341,6 +341,6 @@ int fcntl_portable(int fd, int portable_cmd, ...)
done: done:
ALOGV("%s: return(result:%d); }", __func__, result); ALOGV("%s: return(result:%d); }", __func__, result);
return(result); return result;
} }

View File

@@ -173,7 +173,7 @@ __hidden int map_portable_signum_to_mips(int portable_signum)
case SIGSTKFLT_PORTABLE: /* 16 --> VOID:0 */ case SIGSTKFLT_PORTABLE: /* 16 --> VOID:0 */
/* No MIPS SIGSTKFLT Exits; try mapping it to zero */ /* No MIPS SIGSTKFLT Exits; try mapping it to zero */
return(0); return 0;
case SIGCHLD_PORTABLE: /* 17 --> 18 */ case SIGCHLD_PORTABLE: /* 17 --> 18 */
return SIGCHLD; return SIGCHLD;
@@ -304,7 +304,7 @@ __hidden int map_mips_signum_to_portable(int mips_signum)
#if defined(SIGSTKFLT) #if defined(SIGSTKFLT)
case SIGSTKFLT: /* 16 <--- VOID; NOT SUPPORTED */ case SIGSTKFLT: /* 16 <--- VOID; NOT SUPPORTED */
ASSERT(mips_signum != SIGSTKFLT_PORTABLE); ASSERT(mips_signum != SIGSTKFLT_PORTABLE);
return(-1); return -1;
#endif #endif
case SIGCHLD: /* 17 <-- 18 */ case SIGCHLD: /* 17 <-- 18 */
@@ -360,7 +360,7 @@ __hidden int map_mips_signum_to_portable(int mips_signum)
#if 0 #if 0
LOG_FATAL("%s: mips_signum:%d is not portable;", __func__, mips_signum); LOG_FATAL("%s: mips_signum:%d is not portable;", __func__, mips_signum);
#endif #endif
return(0); return 0;
} }
return portable_ssignum; return portable_ssignum;
} }
@@ -466,7 +466,7 @@ static sighandler_t map_portable_sighandler_to_mips(sighandler_portable_t portab
} }
ALOGV("%s: return(mips_handler:%p); }", __func__, mips_handler); ALOGV("%s: return(mips_handler:%p); }", __func__, mips_handler);
return(mips_handler); return mips_handler;
} }
@@ -524,7 +524,7 @@ static sighandler_portable_t _signal_portable(int portable_signum, sighandler_po
} }
} }
ALOGV("%s: return(ret:%p); }", __func__, ret); ALOGV("%s: return(ret:%p); }", __func__, ret);
return(ret); return ret;
} }
/* /*
@@ -544,7 +544,7 @@ sighandler_portable_t signal_portable(int portable_signum, sighandler_portable_t
ret = _signal_portable(portable_signum, handler, bsd_signal, "bsd_signal"); ret = _signal_portable(portable_signum, handler, bsd_signal, "bsd_signal");
ALOGV("%s: return(ret:%p); }", __func__, ret); ALOGV("%s: return(ret:%p); }", __func__, ret);
return(ret); return ret;
} }
sighandler_portable_t sysv_signal_portable(int portable_signum, sighandler_portable_t handler) sighandler_portable_t sysv_signal_portable(int portable_signum, sighandler_portable_t handler)
@@ -559,7 +559,7 @@ sighandler_portable_t sysv_signal_portable(int portable_signum, sighandler_porta
ret = _signal_portable(portable_signum, handler, sysv_signal, "sysv_signal"); ret = _signal_portable(portable_signum, handler, sysv_signal, "sysv_signal");
ALOGV("%s: return(ret:%p); }", __func__, ret); ALOGV("%s: return(ret:%p); }", __func__, ret);
return(ret); return ret;
} }
sighandler_portable_t bsd_signal_portable(int portable_signum, sighandler_portable_t handler) sighandler_portable_t bsd_signal_portable(int portable_signum, sighandler_portable_t handler)
@@ -574,7 +574,7 @@ sighandler_portable_t bsd_signal_portable(int portable_signum, sighandler_portab
ret = _signal_portable(portable_signum, handler, bsd_signal, "bsd_signal"); ret = _signal_portable(portable_signum, handler, bsd_signal, "bsd_signal");
ALOGV("%s: return(ret:%p); }", __func__, ret); ALOGV("%s: return(ret:%p); }", __func__, ret);
return(ret); return ret;
} }
static int kill_helper(int id, int portable_signum, int (*fn)(int, int), const char *name) static int kill_helper(int id, int portable_signum, int (*fn)(int, int), const char *name)
@@ -647,7 +647,7 @@ int raise_portable(int portable_signum)
rv = raise(mips_signum); rv = raise(mips_signum);
ALOGV("%s: return(rv:%d); }", __func__, rv); ALOGV("%s: return(rv:%d); }", __func__, rv);
return(rv); return rv;
} }
@@ -763,7 +763,7 @@ static int map_portable_sigaction_flags_to_mips(int portable_flags)
ALOGV("%s(portable_flags:0x%x) return(mips_flags:0x%x);", __func__, ALOGV("%s(portable_flags:0x%x) return(mips_flags:0x%x);", __func__,
portable_flags, mips_flags); portable_flags, mips_flags);
return(mips_flags); return mips_flags;
} }
int map_mips_sigaction_flags_to_portable(int mips_flags) int map_mips_sigaction_flags_to_portable(int mips_flags)
@@ -785,7 +785,7 @@ int map_mips_sigaction_flags_to_portable(int mips_flags)
ALOGV("%s(mips_flags:0x%x) return(portable_flags:0x%x);", __func__, ALOGV("%s(mips_flags:0x%x) return(portable_flags:0x%x);", __func__,
mips_flags, portable_flags); mips_flags, portable_flags);
return(portable_flags); return portable_flags;
} }
/* /*
@@ -909,7 +909,7 @@ int sigaction_portable(int portable_signum, const struct sigaction_portable *act
done: done:
ALOGV("%s: return(rv:%d); }", __func__, rv); ALOGV("%s: return(rv:%d); }", __func__, rv);
return(rv); return rv;
} }
@@ -945,7 +945,7 @@ int sigsuspend_portable(const sigset_portable_t *portable_sigmask)
} }
ALOGV("%s: return(rv:%d);", __func__, rv); ALOGV("%s: return(rv:%d);", __func__, rv);
return(rv); return rv;
} }
@@ -966,7 +966,7 @@ int sigpending_portable(sigset_portable_t *portable_sigset)
} }
ALOGV("%s: return(rv:%d);", __func__, rv); ALOGV("%s: return(rv:%d);", __func__, rv);
return(rv); return rv;
} }
@@ -992,7 +992,7 @@ int sigwait_portable(const sigset_portable_t *portable_sigset, int *ptr_to_porta
*ptr_to_portable_sig = portable_sig; *ptr_to_portable_sig = portable_sig;
} }
ALOGV("%s: return(rv:%d);", __func__, rv); ALOGV("%s: return(rv:%d);", __func__, rv);
return(rv); return rv;
} }
@@ -1015,7 +1015,7 @@ int siginterrupt_portable(int portable_signum, int flag)
rv = siginterrupt(mips_signum, flag); rv = siginterrupt(mips_signum, flag);
} }
ALOGV("%s: return(rv:%d);", __func__, rv); ALOGV("%s: return(rv:%d);", __func__, rv);
return(rv); return rv;
} }
__hidden int sigmask_helper(int portable_how, const sigset_portable_t *portable_sigset, sigset_portable_t *portable_oldset, sigmask_fn fn, char *fname) __hidden int sigmask_helper(int portable_how, const sigset_portable_t *portable_sigset, sigset_portable_t *portable_oldset, sigmask_fn fn, char *fname)
@@ -1066,7 +1066,7 @@ __hidden int sigmask_helper(int portable_how, const sigset_portable_t *portable_
} }
ALOGV("%s: return(rv:%d); }", __func__, rv); ALOGV("%s: return(rv:%d); }", __func__, rv);
return(rv); return rv;
} }
int sigprocmask_portable(int portable_how, int sigprocmask_portable(int portable_how,
@@ -1134,7 +1134,7 @@ int sigaltstack_portable(const portable_stack_t *ss, portable_stack_t *oss)
} }
ALOGV("%s: return(rv:%d); }", __func__, rv); ALOGV("%s: return(rv:%d); }", __func__, rv);
return(rv); return rv;
} }

View File

@@ -52,14 +52,15 @@ int syscall_portable(int portable_number, ...)
case __NR_add_key_portable: native_number = __NR_add_key; break; case __NR_add_key_portable: native_number = __NR_add_key; break;
#endif #endif
#ifdef __NR_cacheflush_portable #ifdef __NR_cacheflush_portable
case __NR_cacheflush_portable: case __NR_cacheflush_portable: {
{
long start, end, flags; long start, end, flags;
va_start(ap, portable_number); va_start(ap, portable_number);
start = va_arg(ap, long); start = va_arg(ap, long);
end = va_arg(ap, long); end = va_arg(ap, long);
flags = va_arg(ap, long); flags = va_arg(ap, long);
va_end(ap); va_end(ap);
return cacheflush(start, end, flags); return cacheflush(start, end, flags);
} }
#endif #endif
@@ -175,8 +176,7 @@ int syscall_portable(int portable_number, ...)
case __NR_syslog_portable: native_number = __NR_syslog; break; case __NR_syslog_portable: native_number = __NR_syslog; break;
#endif #endif
#ifdef __NR_timer_create_portable #ifdef __NR_timer_create_portable
case __NR_timer_create_portable: case __NR_timer_create_portable: {
{
extern int timer_create_portable(clockid_t, struct sigevent *, timer_t *); extern int timer_create_portable(clockid_t, struct sigevent *, timer_t *);
clockid_t clockid; clockid_t clockid;
struct sigevent *evp; struct sigevent *evp;
@@ -201,8 +201,7 @@ int syscall_portable(int portable_number, ...)
case __NR_timer_gettime_portable: native_number = __NR_timer_gettime; break; case __NR_timer_gettime_portable: native_number = __NR_timer_gettime; break;
#endif #endif
#ifdef __NR_tkill_portable #ifdef __NR_tkill_portable
case __NR_tkill_portable: case __NR_tkill_portable: {
{
extern int tkill_portable(int, int); extern int tkill_portable(int, int);
int tid, sig; int tid, sig;

View File

@@ -59,7 +59,7 @@ static inline char *portable_tag() {
strncat(&my_portable_tag[0], ".", MAX_TAG_LEN - strlen(my_portable_tag)); strncat(&my_portable_tag[0], ".", MAX_TAG_LEN - strlen(my_portable_tag));
strncat(&my_portable_tag[0], PORTABLE_TAG, MAX_TAG_LEN - strlen(my_portable_tag)); strncat(&my_portable_tag[0], PORTABLE_TAG, MAX_TAG_LEN - strlen(my_portable_tag));
} }
return(my_portable_tag); return my_portable_tag;
} }
#define LOG_TAG portable_tag() #define LOG_TAG portable_tag()
#else /* !EXTENDED_LOGGING */ #else /* !EXTENDED_LOGGING */