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/d34b03a4314a
branches:  trunk
changeset: 379700:d34b03a4314a
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 b19ca7549e9a -r d34b03a4314a 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 @@ amidisplaycc_match(device_t parent, cfda
        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 @@ amidisplaycc_mapchar(void *screen, int c
 {
        if (ch > 0 && ch < 256) {
                *chp = ch;
-               return (5);
+               return 5;
        }
        *chp = ' ';
-       return (0);
+       return 0;
 }
 
 /*
@@ -1001,7 +1001,7 @@ amidisplaycc_allocattr(void *screen, int
 #endif
        *attrp = MAKEATTR(newfg, newbg, flags);
 
-       return (0);
+       return 0;
 }
 
 int
@@ -1014,7 +1014,7 @@ amidisplaycc_ioctl(void *dp, void *vs, u
 
        if (adp == NULL) {
                printf("amidisplaycc_ioctl: adp==NULL\n");
-               return (EINVAL);
+               return EINVAL;
        }
 
 #define UINTDATA (*(u_int*)data)
@@ -1025,20 +1025,20 @@ amidisplaycc_ioctl(void *dp, void *vs, u
        {
        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 @@ amidisplaycc_ioctl(void *dp, void *vs, u
                case WSDISPLAYIO_MODE_DUMBFB:
                        return amidisplaycc_setgfxview(adp, 1);
                default:
-                       return (EINVAL);
+                       return EINVAL;
                }
 
        case WSDISPLAYIO_GINFO:
@@ -1056,19 +1056,18 @@ amidisplaycc_ioctl(void *dp, void *vs, u
                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 @@ amidisplaycc_getfbinfo(struct amidisplay
        fbinfo->fbi_flags = 0;
        fbinfo->fbi_subtype.fbi_cmapinfo.cmap_entries = 1 << adp->gfxdepth;
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1137,7 +1136,7 @@ amidisplaycc_setgfxview(struct amidispla
 
        /* Current mode same as requested mode? */
        if ( (on > 0) == (adp->gfxon > 0) )
-               return (0);
+               return 0;
 
        if (!on) {
                /*
@@ -1151,7 +1150,7 @@ amidisplaycc_setgfxview(struct amidispla
                else if (adp->gfxview)
                        grf_remove_view(adp->gfxview);
 
-               return (0);
+               return 0;
        }
 
        /* switch to mapped mode then */
@@ -1163,9 +1162,9 @@ amidisplaycc_setgfxview(struct amidispla
                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 @@ amidisplaycc_alloc_screen(void *dp, cons
 
        /* 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 @@ amidisplaycc_alloc_screen(void *dp, cons
 
        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 @@ amidisplaycc_alloc_screen(void *dp, cons
                        scr->wsfont->name);
        }
 
-       return (0);
+       return 0;
 }
 
 
@@ -1439,11 +1438,11 @@ amidisplaycc_show_screen(void *dp, void 
 
        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 @@ amidisplaycc_show_screen(void *dp, void 
 
        grf_display_view(scr->view);
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1482,7 +1481,7 @@ amidisplaycc_load_font(void *dp, void *c
        if (font->data)
        {
                /* request to load the font, not supported */
-               return (EINVAL);
+               return EINVAL;
        }
        else
        {
@@ -1501,11 +1500,11 @@ amidisplaycc_setvideo(struct amidisplayc
 
        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 @@ amidisplaycc_setvideo(struct amidisplayc
                adp->ison = 0;
        }
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1552,10 +1551,10 @@ amidisplaycc_cmapioctl(view_t *view, u_l
        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 @@ amidisplaycc_cmapioctl(view_t *view, u_l
 
                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 @@ amidisplaycc_cmapioctl(view_t *view, u_l
 
                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