Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/dev Remove parentheses from return. No functi...



details:   https://anonhg.NetBSD.org/src/rev/4a895c4c1d72
branches:  trunk
changeset: 983950:4a895c4c1d72
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Jun 15 09:00:33 2021 +0000

description:
Remove parentheses from return. No functional changes.

diffstat:

 sys/arch/amiga/dev/amidisplaycc.c |  129 ++++++++++++++++++-------------------
 1 files changed, 64 insertions(+), 65 deletions(-)

diffs (truncated from 462 to 300 lines):

diff -r 923e88616b8e -r 4a895c4c1d72 sys/arch/amiga/dev/amidisplaycc.c
--- a/sys/arch/amiga/dev/amidisplaycc.c Tue Jun 15 08:53:47 2021 +0000
+++ b/sys/arch/amiga/dev/amidisplaycc.c Tue Jun 15 09:00:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amidisplaycc.c,v 1.35 2021/06/15 08:53:47 rin Exp $ */
+/*     $NetBSD: amidisplaycc.c,v 1.36 2021/06/15 09:00:33 rin Exp $ */
 
 /*-
  * Copyright (c) 2000 Jukka Andberg.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.35 2021/06/15 08:53:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.36 2021/06/15 09:00:33 rin Exp $");
 
 /*
  * wscons interface to amiga custom chips. Contains the necessary functions
@@ -403,11 +403,11 @@
        char *name = aux;
 
        if (matchname("amidisplaycc", name) == 0)
-               return (0);
+               return 0;
 
        /* Allow only one of us. */
        if (amidisplaycc_attached)
-               return (0);
+               return 0;
 
        return 1;
 }
@@ -542,10 +542,10 @@
 {
        if (ch > 0 && ch < 256) {
                *chp = ch;
-               return (5);
+               return 5;
        }
        *chp = ' ';
-       return (0);
+       return 0;
 }
 
 /*
@@ -1001,7 +1001,7 @@
 #endif
        *attrp = MAKEATTR(newfg, newbg, flags);
 
-       return (0);
+       return 0;
 }
 
 int
@@ -1014,7 +1014,7 @@
 
        if (adp == NULL) {
                printf("amidisplaycc_ioctl: adp==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
 
 #define UINTDATA (*(u_int*)data)
@@ -1025,20 +1025,20 @@
        {
        case WSDISPLAYIO_GTYPE:
                UINTDATA = WSDISPLAY_TYPE_AMIGACC;
-               return (0);
+               return 0;
 
        case WSDISPLAYIO_SVIDEO:
                dprintf("amidisplaycc: WSDISPLAYIO_SVIDEO %s\n",
                        UINTDATA ? "On" : "Off");
 
-               return (amidisplaycc_setvideo(adp, UINTDATA));
+               return amidisplaycc_setvideo(adp, UINTDATA);
 
        case WSDISPLAYIO_GVIDEO:
                dprintf("amidisplaycc: WSDISPLAYIO_GVIDEO\n");
                UINTDATA = adp->ison ?
                    WSDISPLAYIO_VIDEO_ON : WSDISPLAYIO_VIDEO_OFF;
 
-               return (0);
+               return 0;
 
        case WSDISPLAYIO_SMODE:
                switch (INTDATA) {
@@ -1048,7 +1048,7 @@
                case WSDISPLAYIO_MODE_DUMBFB:
                        return amidisplaycc_setgfxview(adp, 1);
                default:
-                       return (EINVAL);
+                       return EINVAL;
                }
 
        case WSDISPLAYIO_GINFO:
@@ -1056,19 +1056,18 @@
                FBINFO.height = adp->gfxheight;
                FBINFO.depth  = adp->gfxdepth;
                FBINFO.cmsize = 1 << FBINFO.depth;
-               return (0);
+               return 0;
 
        case WSDISPLAYIO_PUTCMAP:
        case WSDISPLAYIO_GETCMAP:
-               return (amidisplaycc_cmapioctl(adp->gfxview,
-                                              cmd,
-                                              (struct wsdisplay_cmap*)data));
+               return amidisplaycc_cmapioctl(adp->gfxview, cmd,
+                                              (struct wsdisplay_cmap*)data);
        case WSDISPLAYIO_GET_FBINFO:
                amidisplaycc_initgfxview(adp);
                return amidisplaycc_getfbinfo(adp, data);
        }
 
-       return (EPASSTHROUGH);
+       return EPASSTHROUGH;
 
 #undef UINTDATA
 #undef INTDATA
@@ -1101,7 +1100,7 @@
        fbinfo->fbi_flags = 0;
        fbinfo->fbi_subtype.fbi_cmapinfo.cmap_entries = 1 << adp->gfxdepth;
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1137,7 +1136,7 @@
 
        /* Current mode same as requested mode? */
        if ( (on > 0) == (adp->gfxon > 0) )
-               return (0);
+               return 0;
 
        if (!on) {
                /*
@@ -1151,7 +1150,7 @@
                else if (adp->gfxview)
                        grf_remove_view(adp->gfxview);
 
-               return (0);
+               return 0;
        }
 
        /* switch to mapped mode then */
@@ -1163,9 +1162,9 @@
                grf_display_view(adp->gfxview);
        } else {
                printf("amidisplaycc: failed to make mapped screen\n");
-               return (ENOMEM);
+               return ENOMEM;
        }
-       return (0);
+       return 0;
 }
 
 /*
@@ -1247,9 +1246,9 @@
 
        /* Sanity checks because of fixed buffers */
        if (depth > MAXDEPTH || maxcolor >= MAXCOLORS)
-               return (ENOMEM);
+               return ENOMEM;
        if (screenp->nrows > MAXROWS)
-               return (ENOMEM);
+               return ENOMEM;
 
        fontwidth = screenp->fontwidth;
        fontheight = screenp->fontheight;
@@ -1264,7 +1263,7 @@
 
        view = grf_alloc_view(NULL, &dimension, depth);
        if (view == NULL)
-               return (ENOMEM);
+               return ENOMEM;
 
        /*
         * First screen gets the statically allocated console screen.
@@ -1383,7 +1382,7 @@
                        scr->wsfont->name);
        }
 
-       return (0);
+       return 0;
 }
 
 
@@ -1439,11 +1438,11 @@
 
        if (adp == NULL) {
                dprintf("amidisplaycc_show_screen: adp==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
        if (scr == NULL) {
                dprintf("amidisplaycc_show_screen: scr==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
 
        if (adp->gfxon) {
@@ -1456,7 +1455,7 @@
 
        grf_display_view(scr->view);
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1482,7 +1481,7 @@
        if (font->data)
        {
                /* request to load the font, not supported */
-               return (EINVAL);
+               return EINVAL;
        }
        else
        {
@@ -1501,11 +1500,11 @@
 
        if (adp == NULL) {
                dprintf("amidisplaycc_setvideo: adp==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
        if (adp->currentscreen == NULL) {
                dprintf("amidisplaycc_setvideo: adp->currentscreen==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
 
        /* select graphics or emulation screen */
@@ -1529,7 +1528,7 @@
                adp->ison = 0;
        }
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1552,10 +1551,10 @@
        if (cmap->index >= MAXCOLORS ||
            cmap->count > MAXCOLORS ||
            cmap->index + cmap->count > MAXCOLORS)
-               return (EINVAL);
+               return EINVAL;
 
        if (cmap->count == 0)
-               return (0);
+               return 0;
 
        tmpcmap.index = cmap->index;
        tmpcmap.count = cmap->count;
@@ -1568,15 +1567,15 @@
 
                err = copyin(cmap->red, cmred, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 
                err = copyin(cmap->green, cmgrn, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 
                err = copyin(cmap->blue, cmblu, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 
                return amidisplaycc_setcmap(view, &tmpcmap);
 
@@ -1584,26 +1583,26 @@
 
                err = amidisplaycc_getcmap(view, &tmpcmap);
                if (err)
-                       return (err);
+                       return err;
 
                /* copy data to user space */
 
                err = copyout(cmred, cmap->red, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 
                err = copyout(cmgrn, cmap->green, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 
                err = copyout(cmblu, cmap->blue, cmap->count);
                if (err)
-                       return (err);
+                       return err;
 



Home | Main Index | Thread Index | Old Index