Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2018 15:35:25 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330798 - in head/sys: compat/linux i386/linux
Message-ID:  <201803121535.w2CFZP83047893@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Mar 12 15:35:24 2018
New Revision: 330798
URL: https://svnweb.freebsd.org/changeset/base/330798

Log:
  Linuxulator: apply style(9) to return
  
  Sponsored by:	Turing Robotic Industries Inc.

Modified:
  head/sys/compat/linux/linux_ioctl.c
  head/sys/compat/linux/linux_signal.c
  head/sys/compat/linux/linux_stats.c
  head/sys/compat/linux/linux_util.c
  head/sys/i386/linux/imgact_linux.c
  head/sys/i386/linux/linux_machdep.c

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/compat/linux/linux_ioctl.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -385,7 +385,7 @@ linux_to_bsd_speed(int code, struct speedtab *table)
 	for ( ; table->sp_code != -1; table++)
 		if (table->sp_code == code)
 			return (table->sp_speed);
-	return -1;
+	return (-1);
 }
 
 static int
@@ -394,7 +394,7 @@ bsd_to_linux_speed(int speed, struct speedtab *table)
 	for ( ; table->sp_speed != -1; table++)
 		if (table->sp_speed == speed)
 			return (table->sp_code);
-	return -1;
+	return (-1);
 }
 
 static void
@@ -2668,7 +2668,7 @@ static int
 linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args)
 {
 	args->cmd = SETDIR(args->cmd);
-	return sys_ioctl(td, (struct ioctl_args *)args);
+	return (sys_ioctl(td, (struct ioctl_args *)args));
 }
 
 #ifdef COMPAT_LINUX32
@@ -3275,9 +3275,9 @@ linux_to_bsd_v4l2_format(struct l_v4l2_format *lvf, st
 		 * XXX TODO - needs 32 -> 64 bit conversion:
 		 * (unused by webcams?)
 		 */
-		return EINVAL;
+		return (EINVAL);
 	memcpy(&vf->fmt, &lvf->fmt, sizeof(vf->fmt));
-	return 0;
+	return (0);
 }
 
 static int
@@ -3293,9 +3293,9 @@ bsd_to_linux_v4l2_format(struct v4l2_format *vf, struc
 		 * XXX TODO - needs 32 -> 64 bit conversion:
 		 * (unused by webcams?)
 		 */
-		return EINVAL;
+		return (EINVAL);
 	memcpy(&lvf->fmt, &vf->fmt, sizeof(vf->fmt));
-	return 0;
+	return (0);
 }
 static int
 linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args)
@@ -3315,7 +3315,7 @@ linux_ioctl_v4l2(struct thread *td, struct linux_ioctl
 	case LINUX_VIDIOC_RESERVED:
 	case LINUX_VIDIOC_LOG_STATUS:
 		if ((args->cmd & IOC_DIRMASK) != LINUX_IOC_VOID)
-			return ENOIOCTL;
+			return (ENOIOCTL);
 		args->cmd = (args->cmd & 0xffff) | IOC_VOID;
 		break;
 

Modified: head/sys/compat/linux/linux_signal.c
==============================================================================
--- head/sys/compat/linux/linux_signal.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/compat/linux/linux_signal.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -279,7 +279,7 @@ linux_rt_sigprocmask(struct thread *td, struct linux_r
 #endif
 
 	if (args->sigsetsize != sizeof(l_sigset_t))
-		return EINVAL;
+		return (EINVAL);
 
 	if (args->mask != NULL) {
 		error = copyin(args->mask, &set, sizeof(l_sigset_t));
@@ -377,7 +377,7 @@ linux_rt_sigpending(struct thread *td, struct linux_rt
 	l_sigset_t lset;
 
 	if (args->sigsetsize > sizeof(lset))
-		return EINVAL;
+		return (EINVAL);
 		/* NOT REACHED */
 
 #ifdef DEBUG

Modified: head/sys/compat/linux/linux_stats.c
==============================================================================
--- head/sys/compat/linux/linux_stats.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/compat/linux/linux_stats.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -436,7 +436,7 @@ linux_statfs64(struct thread *td, struct linux_statfs6
 	int error;
 
 	if (args->bufsize != sizeof(struct l_statfs64))
-		return EINVAL;
+		return (EINVAL);
 
 	LCONVPATHEXIST(td, args->path, &path);
 

Modified: head/sys/compat/linux/linux_util.c
==============================================================================
--- head/sys/compat/linux/linux_util.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/compat/linux/linux_util.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -116,7 +116,7 @@ linux_driver_get_name_dev(device_t dev)
 	const char *device_name = device_get_name(dev);
 
 	if (device_name == NULL)
-		return NULL;
+		return (NULL);
 	TAILQ_FOREACH(de, &devices, list) {
 		if (strcmp(device_name, de->entry.bsd_driver_name) == 0)
 			return (de->entry.linux_driver_name);
@@ -133,7 +133,7 @@ linux_driver_get_major_minor(const char *node, int *ma
 	size_t sz;
 
 	if (node == NULL || major == NULL || minor == NULL)
-		return 1;
+		return (1);
 
 	sz = sizeof("pts/") - 1;
 	if (strncmp(node, "pts/", sz) == 0 && node[sz] != '\0') {

Modified: head/sys/i386/linux/imgact_linux.c
==============================================================================
--- head/sys/i386/linux/imgact_linux.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/i386/linux/imgact_linux.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -69,7 +69,7 @@ exec_linux_imgact(struct image_params *imgp)
     int error;
 
     if (((a_out->a_magic >> 16) & 0xff) != 0x64)
-	return -1;
+	return (-1);
 
     /*
      * Set file/virtual offset based on a.out variant.

Modified: head/sys/i386/linux/linux_machdep.c
==============================================================================
--- head/sys/i386/linux/linux_machdep.c	Mon Mar 12 15:26:11 2018	(r330797)
+++ head/sys/i386/linux/linux_machdep.c	Mon Mar 12 15:35:24 2018	(r330798)
@@ -775,7 +775,7 @@ int
 linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_open(td, (struct kmq_open_args *) args);
+	return (sys_kmq_open(td, (struct kmq_open_args *)args));
 #else
 	return (ENOSYS);
 #endif
@@ -785,7 +785,7 @@ int
 linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
+	return (sys_kmq_unlink(td, (struct kmq_unlink_args *)args));
 #else
 	return (ENOSYS);
 #endif
@@ -795,7 +795,7 @@ int
 linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
+	return (sys_kmq_timedsend(td, (struct kmq_timedsend_args *)args));
 #else
 	return (ENOSYS);
 #endif
@@ -805,7 +805,7 @@ int
 linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
+	return (sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *)args));
 #else
 	return (ENOSYS);
 #endif
@@ -815,7 +815,7 @@ int
 linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_notify(td, (struct kmq_notify_args *) args);
+	return (sys_kmq_notify(td, (struct kmq_notify_args *)args));
 #else
 	return (ENOSYS);
 #endif
@@ -825,7 +825,7 @@ int
 linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
 {
 #ifdef P1003_1B_MQUEUE
-	return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
+	return (sys_kmq_setattr(td, (struct kmq_setattr_args *)args));
 #else
 	return (ENOSYS);
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803121535.w2CFZP83047893>