Source-Changes-HG archive

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

[src/trunk]: src/sys Remove dead returns:



details:   https://anonhg.NetBSD.org/src/rev/6f0cb9bf44d0
branches:  trunk
changeset: 331710:6f0cb9bf44d0
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Aug 21 06:40:35 2014 +0000

description:
Remove dead returns:

        return VAR/func(XX);
        return VAR;

The latter is never reached. Sent on tech-kern@, no disagreement.

diffstat:

 sys/arch/arm/s3c2xx0/s3c24x0_lcd.c       |  5 ++---
 sys/compat/netbsd32/netbsd32_compat_50.c |  7 ++-----
 sys/compat/netbsd32/netbsd32_compat_60.c |  5 ++---
 sys/compat/osf1/osf1_mount.c             |  6 ++----
 sys/fs/ptyfs/ptyfs_vnops.c               |  6 ++----
 5 files changed, 10 insertions(+), 19 deletions(-)

diffs (144 lines):

diff -r 3df4b979435a -r 6f0cb9bf44d0 sys/arch/arm/s3c2xx0/s3c24x0_lcd.c
--- a/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c        Wed Aug 20 22:02:20 2014 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c        Thu Aug 21 06:40:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s3c24x0_lcd.c,v 1.11 2014/03/10 04:25:51 htodd Exp $ */
+/* $NetBSD: s3c24x0_lcd.c,v 1.12 2014/08/21 06:40:35 maxv Exp $ */
 
 /*
  * Copyright (c) 2004  Genetec Corporation.  All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.11 2014/03/10 04:25:51 htodd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.12 2014/08/21 06:40:35 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -735,7 +735,6 @@
            offset, prot, BUS_DMA_WAITOK|BUS_DMA_COHERENT);
        /*      printf("s3c24x0_lcd_mmap: ret: %lx\n", ret);*/
        return ret;
-       return -1;
 }
 
 
diff -r 3df4b979435a -r 6f0cb9bf44d0 sys/compat/netbsd32/netbsd32_compat_50.c
--- a/sys/compat/netbsd32/netbsd32_compat_50.c  Wed Aug 20 22:02:20 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_50.c  Thu Aug 21 06:40:35 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_50.c,v 1.24 2014/06/24 14:33:57 maxv Exp $     */
+/*     $NetBSD: netbsd32_compat_50.c,v 1.25 2014/08/21 06:40:35 maxv Exp $     */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.24 2014/06/24 14:33:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.25 2014/08/21 06:40:35 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
@@ -139,7 +139,6 @@
 
        return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
            SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, NULL);
-       return 0;
 }
 
 int
@@ -563,7 +562,6 @@
 
        return lwp_park(CLOCK_REALTIME, TIMER_ABSTIME, tsp,
            SCARG_P32(uap, hint));
-       return 0;
 }
 
 static int
@@ -681,7 +679,6 @@
 
        return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
            SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, mask);
-       return 0;
 }
 
 int
diff -r 3df4b979435a -r 6f0cb9bf44d0 sys/compat/netbsd32/netbsd32_compat_60.c
--- a/sys/compat/netbsd32/netbsd32_compat_60.c  Wed Aug 20 22:02:20 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_60.c  Thu Aug 21 06:40:35 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $  */
+/*     $NetBSD: netbsd32_compat_60.c,v 1.2 2014/08/21 06:40:35 maxv Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.2 2014/08/21 06:40:35 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -83,5 +83,4 @@
 
        return lwp_park(CLOCK_REALTIME, TIMER_ABSTIME, tsp,
            SCARG_P32(uap, hint));
-       return 0;
 }
diff -r 3df4b979435a -r 6f0cb9bf44d0 sys/compat/osf1/osf1_mount.c
--- a/sys/compat/osf1/osf1_mount.c      Wed Aug 20 22:02:20 2014 +0000
+++ b/sys/compat/osf1/osf1_mount.c      Thu Aug 21 06:40:35 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: osf1_mount.c,v 1.50 2013/11/27 17:24:44 christos Exp $ */
+/*     $NetBSD: osf1_mount.c,v 1.51 2014/08/21 06:40:35 maxv Exp $     */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.50 2013/11/27 17:24:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.51 2014/08/21 06:40:35 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -314,6 +314,4 @@
 
        return do_sys_mount(l, vfs_getopsbyname("nfs"), NULL, SCARG(uap, path),
            SCARG(uap, flags), &bsd_na, UIO_SYSSPACE, sizeof bsd_na, &dummy);
-
-       return 0;
 }
diff -r 3df4b979435a -r 6f0cb9bf44d0 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c        Wed Aug 20 22:02:20 2014 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c        Thu Aug 21 06:40:35 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_vnops.c,v 1.49 2014/08/15 13:40:39 hannken Exp $ */
+/*     $NetBSD: ptyfs_vnops.c,v 1.50 2014/08/21 06:40:35 maxv Exp $    */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.49 2014/08/15 13:40:39 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.50 2014/08/21 06:40:35 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -579,8 +579,6 @@
            KAUTH_ACCESS_ACTION(ap->a_mode, ap->a_vp->v_type, va.va_mode),
            ap->a_vp, NULL, genfs_can_access(va.va_type, va.va_mode, va.va_uid,
            va.va_gid, ap->a_mode, ap->a_cred));
-
-       return error;
 }
 
 /*



Home | Main Index | Thread Index | Old Index