summaryrefslogtreecommitdiffstats
path: root/vidix
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-16 00:13:03 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-16 00:13:03 +0000
commit3acba2c82d002736a5917ad412b34ee0416ba2ac (patch)
treeb30a0a98e033894544af0a328f6aff3b6d4f8e36 /vidix
parent7c0eee9bce417dccfce072bce38e50a4321b96a9 (diff)
downloadmpv-3acba2c82d002736a5917ad412b34ee0416ba2ac.tar.bz2
mpv-3acba2c82d002736a5917ad412b34ee0416ba2ac.tar.xz
cosmetics: Remove useless parentheses from return statements.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26785 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix')
-rw-r--r--vidix/cyberblade_vid.c4
-rw-r--r--vidix/ivtv_vid.c34
-rw-r--r--vidix/kernelhelper/dhahelper.c42
-rw-r--r--vidix/kernelhelper/test.c2
-rw-r--r--vidix/mach64_vid.c4
-rw-r--r--vidix/mga_vid.c46
-rw-r--r--vidix/nvidia_vid.c2
-rw-r--r--vidix/pci.c10
-rw-r--r--vidix/radeon_vid.c6
-rw-r--r--vidix/sis_bridge.c2
-rw-r--r--vidix/sis_vid.c10
-rw-r--r--vidix/sysdep/AsmMacros_arm32.h12
-rw-r--r--vidix/sysdep/AsmMacros_powerpc.h6
-rw-r--r--vidix/sysdep/pci_386bsd.c10
-rw-r--r--vidix/sysdep/pci_bsdi.c10
-rw-r--r--vidix/sysdep/pci_freebsd.c10
-rw-r--r--vidix/sysdep/pci_isc.c4
-rw-r--r--vidix/sysdep/pci_linux.c12
-rw-r--r--vidix/sysdep/pci_lynx.c2
-rw-r--r--vidix/sysdep/pci_mach386.c6
-rw-r--r--vidix/sysdep/pci_netbsd.c10
-rw-r--r--vidix/sysdep/pci_openbsd.c6
-rw-r--r--vidix/sysdep/pci_os2.c8
-rw-r--r--vidix/sysdep/pci_sco.c4
-rw-r--r--vidix/sysdep/pci_svr4.c4
-rw-r--r--vidix/sysdep/pci_win32.c6
-rw-r--r--vidix/unichrome_vid.c4
27 files changed, 138 insertions, 138 deletions
diff --git a/vidix/cyberblade_vid.c b/vidix/cyberblade_vid.c
index 6a0c4231e8..5a323dd163 100644
--- a/vidix/cyberblade_vid.c
+++ b/vidix/cyberblade_vid.c
@@ -238,7 +238,7 @@ static vidix_grkey_t cyberblade_grkey;
static int cyberblade_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &cyberblade_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int cyberblade_set_gkeys(const vidix_grkey_t *grkey)
@@ -272,7 +272,7 @@ static int cyberblade_set_gkeys(const vidix_grkey_t *grkey)
SROUTB(0x56, 0x00); /* Colour Key Mask */
}
SROUTB(0x11,protect);
- return(0);
+ return 0;
}
diff --git a/vidix/ivtv_vid.c b/vidix/ivtv_vid.c
index 151f7e9c3f..ca2d4aa046 100644
--- a/vidix/ivtv_vid.c
+++ b/vidix/ivtv_vid.c
@@ -267,7 +267,7 @@ int ivtv_probe(int verbose,int force __attribute__ ((unused)))
if(ivtv_verbose)
printf(IVTV_MSG"Can't find chip\n");
- return(ENXIO);
+ return ENXIO;
card_found:
@@ -283,7 +283,7 @@ card_found:
if(ioctl(fbdev, FBIOGET_VSCREENINFO, &vinfo) < 0) {
printf(IVTV_MSG"Unable to read screen info\n");
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
fb_width = vinfo.xres;
fb_height = vinfo.yres;
@@ -299,7 +299,7 @@ card_found:
}
} else {
printf(IVTV_MSG"Failed to open /dev/fb%u\n", fb_number);
- return(ENXIO);
+ return ENXIO;
}
/* Try to find YUV device */
@@ -318,7 +318,7 @@ card_found:
printf(IVTV_MSG"YUV device not found: /dev/video%u\n", yuv_device);
}
} while(yuv_device-- > yuv_device_number);
- return(ENXIO);
+ return ENXIO;
yuv_found:
if(0 == alpha_disable) {
@@ -327,7 +327,7 @@ yuv_found:
printf(IVTV_MSG"Unable to read fb state\n");
close(yuvdev);
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
if(ivtv_verbose) {
printf(IVTV_MSG"old alpha : %ld\n",fb_state_old.alpha);
@@ -343,7 +343,7 @@ yuv_found:
printf(IVTV_MSG"Unable to read fb state\n");
close(yuvdev);
close(fbdev);
- return(ENXIO);
+ return ENXIO;
} else {
if(ivtv_verbose) {
printf(IVTV_MSG"old alpha : %d\n",format_old.fmt.win.global_alpha);
@@ -354,7 +354,7 @@ yuv_found:
#endif
}
probed = 1;
- return(0);
+ return 0;
}
int ivtv_init(const char *args __attribute__ ((unused)))
@@ -365,15 +365,15 @@ int ivtv_init(const char *args __attribute__ ((unused)))
if (!probed) {
if(ivtv_verbose)
printf(IVTV_MSG"Driver was not probed but is being initialized\n");
- return(EINTR);
+ return EINTR;
}
outbuf = malloc((IVTVMAXHEIGHT * IVTVMAXWIDTH) + (IVTVMAXHEIGHT * IVTVMAXWIDTH / 2));
if(NULL == outbuf) {
if(ivtv_verbose)
printf(IVTV_MSG"Not enough memory availabe!\n");
- return(EINTR);
+ return EINTR;
}
- return(0);
+ return 0;
}
void ivtv_destroy(void)
@@ -395,7 +395,7 @@ int ivtv_get_caps(vidix_capability_t *to)
if(ivtv_verbose)
printf(IVTV_MSG"GetCap\n");
memcpy(to, &ivtv_cap, sizeof(vidix_capability_t));
- return(0);
+ return 0;
}
int ivtv_query_fourcc(vidix_fourcc_t *to)
@@ -415,13 +415,13 @@ int ivtv_query_fourcc(vidix_fourcc_t *to)
if(!supports) {
to->depth = to->flags = 0;
- return(ENOTSUP);
+ return ENOTSUP;
}
to->depth = VID_DEPTH_12BPP |
VID_DEPTH_15BPP | VID_DEPTH_16BPP |
VID_DEPTH_24BPP | VID_DEPTH_32BPP;
to->flags = 0;
- return(0);
+ return 0;
}
int ivtv_config_playback(vidix_playback_t *info)
@@ -452,7 +452,7 @@ int ivtv_config_playback(vidix_playback_t *info)
if(ivtv_verbose)
printf(IVTV_MSG"frame_size: %d, dga_addr: %p\n",
info->frame_size, info->dga_addr);
- return(0);
+ return 0;
}
int ivtv_playback_on(void)
@@ -473,7 +473,7 @@ int ivtv_playback_on(void)
}
#endif
}
- return(0);
+ return 0;
}
int ivtv_playback_off(void)
@@ -494,7 +494,7 @@ int ivtv_playback_off(void)
}
#endif
}
- return(0);
+ return 0;
}
int ivtv_frame_sel(unsigned int frame)
@@ -548,7 +548,7 @@ int ivtv_frame_sel(unsigned int frame)
#endif
printf("Ioctl IVTV_IOC_DMA_FRAME returned failed Error\n");
}
- return(0);
+ return 0;
}
VDXDriver ivtv_drv = {
diff --git a/vidix/kernelhelper/dhahelper.c b/vidix/kernelhelper/dhahelper.c
index f5b6fe825c..5d501e94e6 100644
--- a/vidix/kernelhelper/dhahelper.c
+++ b/vidix/kernelhelper/dhahelper.c
@@ -106,11 +106,11 @@ static int dhahelper_open(struct inode *inode, struct file *file)
printk(KERN_DEBUG "dhahelper: device opened\n");
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
MOD_INC_USE_COUNT;
- return(0);
+ return 0;
}
static int dhahelper_release(struct inode *inode, struct file *file)
@@ -119,11 +119,11 @@ static int dhahelper_release(struct inode *inode, struct file *file)
printk(KERN_DEBUG "dhahelper: device released\n");
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
MOD_DEC_USE_COUNT;
- return(0);
+ return 0;
}
static int dhahelper_ioctl(struct inode *inode, struct file *file,
@@ -134,7 +134,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
cmd, arg);
if (MINOR(inode->i_rdev) != 0)
- return(-ENXIO);
+ return -ENXIO;
switch(cmd)
{
@@ -146,7 +146,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -159,7 +159,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
switch(port.operation)
@@ -181,7 +181,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port read size (%d)\n",
port.size);
- return(-EINVAL);
+ return -EINVAL;
}
break;
}
@@ -202,7 +202,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port write size (%d)\n",
port.size);
- return(-EINVAL);
+ return -EINVAL;
}
break;
}
@@ -210,7 +210,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid port operation (%d)\n",
port.operation);
- return(-EINVAL);
+ return -EINVAL;
}
/* copy back only if read was performed */
@@ -219,7 +219,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -232,7 +232,7 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy from userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
switch(mem.operation)
@@ -254,14 +254,14 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid memory operation (%d)\n",
mem.operation);
- return(-EINVAL);
+ return -EINVAL;
}
if (copy_to_user((dhahelper_memory_t *)arg, &mem, sizeof(dhahelper_memory_t)))
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: failed copy to userspace\n");
- return(-EFAULT);
+ return -EFAULT;
}
break;
@@ -269,10 +269,10 @@ static int dhahelper_ioctl(struct inode *inode, struct file *file,
default:
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: invalid ioctl (%x)\n", cmd);
- return(-EINVAL);
+ return -EINVAL;
}
- return(0);
+ return 0;
}
static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
@@ -281,7 +281,7 @@ static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: mapping not requested before mmap\n");
- return(-EFAULT);
+ return -EFAULT;
}
if (dhahelper_verbosity > 1)
@@ -293,10 +293,10 @@ static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
{
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: error mapping memory\n");
- return(-EFAULT);
+ return -EFAULT;
}
- return(0);
+ return 0;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
@@ -338,10 +338,10 @@ static int __init init_dhahelper(void)
if (dhahelper_verbosity > 0)
printk(KERN_ERR "dhahelper: unable to register character device (major: %d)\n",
dhahelper_major);
- return(-EIO);
+ return -EIO;
}
- return(0);
+ return 0;
}
#if KERNEL_VERSION < KERNEL_VERSION(2,4,0)
diff --git a/vidix/kernelhelper/test.c b/vidix/kernelhelper/test.c
index 3dca94c748..8e795f77df 100644
--- a/vidix/kernelhelper/test.c
+++ b/vidix/kernelhelper/test.c
@@ -56,5 +56,5 @@ int main(int argc, char *argv[])
ioctl(fd, DHAHELPER_MEMORY, &mem);
}
- return(0);
+ return 0;
}
diff --git a/vidix/mach64_vid.c b/vidix/mach64_vid.c
index 162542f313..1c7935a35a 100644
--- a/vidix/mach64_vid.c
+++ b/vidix/mach64_vid.c
@@ -991,7 +991,7 @@ static int mach64_set_eq( const vidix_video_eq_t * eq)
static int mach64_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &mach64_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int mach64_set_gkeys(const vidix_grkey_t *grkey)
@@ -1056,7 +1056,7 @@ static int mach64_set_gkeys(const vidix_grkey_t *grkey)
else
OUTREG(OVERLAY_KEY_CNTL,VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND);
- return(0);
+ return 0;
}
VDXDriver mach64_drv = {
diff --git a/vidix/mga_vid.c b/vidix/mga_vid.c
index a2c02d1a2b..b6504fa5df 100644
--- a/vidix/mga_vid.c
+++ b/vidix/mga_vid.c
@@ -364,7 +364,7 @@ static int mga_frame_select(unsigned int frame)
#endif
}
- return(0);
+ return 0;
}
@@ -665,7 +665,7 @@ static int mga_config_playback(vidix_playback_t *config)
if ((sw < 4) || (sh < 4) || (dw < 4) || (dh < 4))
{
printf("[mga] Invalid src/dest dimensions\n");
- return(EINVAL);
+ return EINVAL;
}
//FIXME check that window is valid and inside desktop
@@ -685,7 +685,7 @@ static int mga_config_playback(vidix_playback_t *config)
break;
default:
printf("[mga] Unsupported pixel format: %x\n", config->fourcc);
- return(ENOTSUP);
+ return ENOTSUP;
}
config->offsets[0] = 0;
@@ -707,7 +707,7 @@ static int mga_config_playback(vidix_playback_t *config)
if (mga_src_base < 0)
{
printf("[mga] not enough memory for frames!\n");
- return(EFAULT);
+ return EFAULT;
}
mga_src_base &= (~0xFFFF); /* 64k boundary */
if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base);
@@ -1043,7 +1043,7 @@ switch(config->fourcc){
#endif /* CRTC2 */
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_playback_on(void)
@@ -1062,7 +1062,7 @@ static int mga_playback_on(void)
#endif
mga_next_frame=0;
- return(0);
+ return 0;
}
static int mga_playback_off(void)
@@ -1078,7 +1078,7 @@ static int mga_playback_off(void)
regs.besglobctl &= ~(1<<6); /* UYVY format selected */
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_probe(int verbose,int force)
@@ -1097,7 +1097,7 @@ static int mga_probe(int verbose,int force)
if (err)
{
printf("[mga] Error occurred during pci scan: %s\n", strerror(err));
- return(err);
+ return err;
}
if (mga_verbose)
@@ -1142,7 +1142,7 @@ static int mga_probe(int verbose,int force)
if (is_g400 == -1)
{
if (verbose) printf("[mga] Can't find chip\n");
- return(ENXIO);
+ return ENXIO;
}
card_found:
@@ -1151,7 +1151,7 @@ card_found:
mga_cap.device_id = pci_info.device; /* set device id in capabilites */
- return(0);
+ return 0;
}
static int mga_init(void)
@@ -1171,7 +1171,7 @@ static int mga_init(void)
if (!probed)
{
printf("[mga] driver was not probed but is being initializing\n");
- return(EINTR);
+ return EINTR;
}
#ifdef MGA_PCICONFIG_MEMDETECT
@@ -1226,7 +1226,7 @@ static int mga_init(void)
if ((mga_ram_size < 4) || (mga_ram_size > 64))
{
printf("[mga] invalid RAMSIZE: %d MB\n", mga_ram_size);
- return(EINVAL);
+ return EINVAL;
}
}
@@ -1264,7 +1264,7 @@ static int mga_init(void)
mga_irq=-1;
#endif
- return(0);
+ return 0;
}
static void mga_destroy(void)
@@ -1304,33 +1304,33 @@ static int mga_query_fourcc(vidix_fourcc_t *to)
break;
default:
to->depth = to->flags = 0;
- return(ENOTSUP);
+ return ENOTSUP;
}
to->depth = VID_DEPTH_12BPP |
VID_DEPTH_15BPP | VID_DEPTH_16BPP |
VID_DEPTH_24BPP | VID_DEPTH_32BPP;
to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY;
- return(0);
+ return 0;
}
static int mga_get_caps(vidix_capability_t *to)
{
memcpy(to, &mga_cap, sizeof(vidix_capability_t));
- return(0);
+ return 0;
}
static int mga_get_gkeys(vidix_grkey_t *grkey)
{
memcpy(grkey, &mga_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int mga_set_gkeys(const vidix_grkey_t *grkey)
{
memcpy(&mga_grkey, grkey, sizeof(vidix_grkey_t));
mga_vid_write_regs(0);
- return(0);
+ return 0;
}
static int mga_set_eq( const vidix_video_eq_t * eq)
@@ -1339,12 +1339,12 @@ static int mga_set_eq( const vidix_video_eq_t * eq)
if (!is_g400)
{
if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
// only brightness&contrast are supported:
if(!(eq->cap & (VEQ_CAP_BRIGHTNESS|VEQ_CAP_CONTRAST)))
- return(ENOTSUP);
+ return ENOTSUP;
//regs.beslumactl = readl(mga_mmio_base + BESLUMACTL);
if (eq->cap & VEQ_CAP_BRIGHTNESS) {
@@ -1357,7 +1357,7 @@ static int mga_set_eq( const vidix_video_eq_t * eq)
}
writel(regs.beslumactl,mga_mmio_base + BESLUMACTL);
- return(0);
+ return 0;
}
static int mga_get_eq( vidix_video_eq_t * eq)
@@ -1366,7 +1366,7 @@ static int mga_get_eq( vidix_video_eq_t * eq)
if (!is_g400)
{
if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
eq->brightness = (signed short int)(regs.beslumactl >> 16) * 1000 / 128;
@@ -1375,7 +1375,7 @@ static int mga_get_eq( vidix_video_eq_t * eq)
printf("MGA GET_EQ: br=%d c=%d \n",eq->brightness,eq->contrast);
- return(0);
+ return 0;
}
#ifndef CRTC2
diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c
index 07d698bd92..a895a084c8 100644
--- a/vidix/nvidia_vid.c
+++ b/vidix/nvidia_vid.c
@@ -458,7 +458,7 @@ static unsigned long rivatv_fbsize_nv03 (struct rivatv_chip *chip){
if (((VID_RD32 (chip->PMC, 0) & 0xF0) == 0x20)
&& ((VID_RD32 (chip->PMC, 0) & 0x0F) >= 0x02)) {
/* SDRAM 128 ZX. */
- return ((1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024);
+ return (1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024;
}
else {
return 1024 * 1024 * 8;
diff --git a/vidix/pci.c b/vidix/pci.c
index 7ccedb9adb..a68eae7e32 100644
--- a/vidix/pci.c
+++ b/vidix/pci.c
@@ -107,7 +107,7 @@ static __inline__ unsigned long
static swapl(unsigned long val)
{
unsigned char *p = (unsigned char *)&val;
- return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0));
+ return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
}
@@ -534,7 +534,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
ret = enable_os_io();
if (ret != 0)
- return(ret);
+ return ret;
if((pcr._configtype = pci_config_type()) == 0xFFFF) return ENODEV;
@@ -713,17 +713,17 @@ int pci_config_read(unsigned char bus, unsigned char dev, unsigned char func,
if (len != 4)
{
fprintf(stderr,"pci_config_read: Reading non-dword not supported!\n");
- return(ENOTSUP);
+ return ENOTSUP;
}
ret = enable_os_io();
if (ret != 0)
- return(ret);
+ return ret;
ret = pci_config_read_long(bus, dev, func, cmd);
disable_os_io();
*val = ret;
- return(0);
+ return 0;
}
int enable_app_io( void )
diff --git a/vidix/radeon_vid.c b/vidix/radeon_vid.c
index affa266285..5bb9f082bb 100644
--- a/vidix/radeon_vid.c
+++ b/vidix/radeon_vid.c
@@ -548,7 +548,7 @@ static inline uint32_t INREG (uint32_t addr) {
static __inline__ uint32_t INPLL(uint32_t addr)
{
OUTREG8(CLOCK_CNTL_INDEX, addr & 0x0000001f);
- return (INREG(CLOCK_CNTL_DATA));
+ return INREG(CLOCK_CNTL_DATA);
}
#define OUTPLL(addr,val) OUTREG8(CLOCK_CNTL_INDEX, (addr & 0x0000001f) | 0x00000080); \
@@ -3407,13 +3407,13 @@ static int set_gr_key( void )
static int radeon_get_gkey(vidix_grkey_t *grkey)
{
memcpy(grkey, &radeon_grkey, sizeof(vidix_grkey_t));
- return(0);
+ return 0;
}
static int radeon_set_gkey(const vidix_grkey_t *grkey)
{
memcpy(&radeon_grkey, grkey, sizeof(vidix_grkey_t));
- return (set_gr_key());
+ return set_gr_key();
}
#ifdef RAGE128
diff --git a/vidix/sis_bridge.c b/vidix/sis_bridge.c
index 6553d105a4..4dd8fe92c3 100644
--- a/vidix/sis_bridge.c
+++ b/vidix/sis_bridge.c
@@ -56,7 +56,7 @@ static int sis_do_sense(int tempbl, int tempbh, int tempcl, int tempch)
inSISIDXREG(SISPART4, 0x03, temp);
temp ^= 0x0e;
temp &= tempch;
- return (temp == tempch);
+ return temp == tempch;
}
diff --git a/vidix/sis_vid.c b/vidix/sis_vid.c
index d13a0f073a..57e934c017 100644
--- a/vidix/sis_vid.c
+++ b/vidix/sis_vid.c
@@ -190,7 +190,7 @@ static uint8_t getvideoreg(uint8_t reg)
{
uint8_t ret;
inSISIDXREG(SISVID, reg, ret);
- return (ret);
+ return ret;
}
static void setvideoreg(uint8_t reg, uint8_t data)
@@ -220,7 +220,7 @@ static void setsrregmask(uint8_t reg, uint8_t data, uint8_t mask)
static uint8_t vblank_active_CRT1(void)
{
/* this may be too simplistic? */
- return (inSISREG(SISINPSTAT) & 0x08);
+ return inSISREG(SISINPSTAT) & 0x08;
}
static uint8_t vblank_active_CRT2(void)
@@ -231,7 +231,7 @@ static uint8_t vblank_active_CRT2(void)
} else {
inSISIDXREG(SISPART1, Index_CRT2_FC_VR, ret);
}
- return ((ret & 0x02) ^ 0x02);
+ return (ret & 0x02) ^ 0x02;
}
static int find_chip(unsigned chip_id)
@@ -344,13 +344,13 @@ static int sis_init(void)
if (!sis_probed) {
printf("[SiS] driver was not probed but is being initialized\n");
- return (EINTR);
+ return EINTR;
}
if (enable_app_io() != 0)
{
printf("[SiS] can't enable register I/O\n");
- return(EINTR);
+ return EINTR;
}
/* JCP: this is WRONG. Need to coordinate w/ sisfb to use correct mem */
diff --git a/vidix/sysdep/AsmMacros_arm32.h b/vidix/sysdep/AsmMacros_arm32.h
index 6fe0b66466..d7973cc48c 100644
--- a/vidix/sysdep/AsmMacros_arm32.h
+++ b/vidix/sysdep/AsmMacros_arm32.h
@@ -84,20 +84,20 @@ static __inline__ void outl(short port,int val)
static __inline__ unsigned int inb(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase);
}
static __inline__ unsigned int inw(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase);
}
static __inline__ unsigned int inl(short port)
{
- if ((unsigned short)port >= 0x400) return((unsigned int)-1);
- return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
+ if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+ return *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase);
}
#define intr_disable()
diff --git a/vidix/sysdep/AsmMacros_powerpc.h b/vidix/sysdep/AsmMacros_powerpc.h
index 71ab4c6617..7120446afe 100644
--- a/vidix/sysdep/AsmMacros_powerpc.h
+++ b/vidix/sysdep/AsmMacros_powerpc.h
@@ -90,21 +90,21 @@ static __inline__ unsigned char inb(short port)
{
unsigned char val;
val = *((unsigned char *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
static __inline__ unsigned short inw(short port)
{
unsigned short val;
val = *((unsigned short *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
static __inline__ unsigned long inl(short port)
{
unsigned long val;
val = *((unsigned long *)(ioBase + port)); eieio();
- return(val);
+ return val;
}
#define intr_disable()
diff --git a/vidix/sysdep/pci_386bsd.c b/vidix/sysdep/pci_386bsd.c
index 76c9fad459..3f7dd0f755 100644
--- a/vidix/sysdep/pci_386bsd.c
+++ b/vidix/sysdep/pci_386bsd.c
@@ -40,13 +40,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, KDENABIO, 0) < 0) {
perror("ioctl(KDENABIO)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, KDDISABIO, 0) < 0) {
perror("ioctl(KDDISABIO)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_bsdi.c b/vidix/sysdep/pci_bsdi.c
index b6b142054d..982f725a9b 100644
--- a/vidix/sysdep/pci_bsdi.c
+++ b/vidix/sysdep/pci_bsdi.c
@@ -18,13 +18,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) {
perror("ioctl(PCCONENABIOPL)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -32,8 +32,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) {
perror("ioctl(PCCONDISABIOPL)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_freebsd.c b/vidix/sysdep/pci_freebsd.c
index 1820da2617..ee3525bc2f 100644
--- a/vidix/sysdep/pci_freebsd.c
+++ b/vidix/sysdep/pci_freebsd.c
@@ -40,13 +40,13 @@ static __inline__ int enable_os_io(void)
io_fd = -1 ;
if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
perror("/dev/console");
- return(errno);
+ return errno;
}
if (ioctl(io_fd, KDENABIO, 0) < 0) {
perror("ioctl(KDENABIO)");
- return(errno);
+ return errno;
}
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@ static __inline__ int disable_os_io(void)
if (ioctl(io_fd, KDDISABIO, 0) < 0) {
perror("ioctl(KDDISABIO)");
close(io_fd);
- return(errno);
+ return errno;
}
close(io_fd);
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_isc.c b/vidix/sysdep/pci_isc.c
index be2ed10556..17fb2b6106 100644
--- a/vidix/sysdep/pci_isc.c
+++ b/vidix/sysdep/pci_isc.c
@@ -41,7 +41,7 @@ static __inline__ int enable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
#endif
- return(0);
+ return 0;
}
static __inline__ int disable_os_io(void)
@@ -51,5 +51,5 @@ static __inline__ int disable_os_io(void)
#else
sysi86(SI86V86, V86SC_IOPL, 0);
#endif
- return(0);
+ return 0;
}
diff --git a/vidix/sysdep/pci_linux.c b/vidix/sysdep/pci_linux.c
index 5e46f89fe9..07d9566563 100644
--- a/vidix/sysdep/pci_linux.c
+++ b/vidix/sysdep/pci_linux.c
@@ -96,7 +96,7 @@ static __inline__ int enable_os_io(void)