Commit fbe7c6c7 authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman
Browse files

staging: lustre: remove parentheses from return arguments

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/

)

// <smpl>
@@
identifier i;
constant c;
@@

return
- (
    \(i\|-i\|i(...)\|c\)
- )
  ;
// </smpl>

Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d8cb70c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1487,7 +1487,7 @@ kiblnd_send (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
	switch (type) {
	default:
		LBUG();
		return (-EIO);
		return -EIO;

	case LNET_MSG_ACK:
		LASSERT (payload_nob == 0);
+2 −2
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ lnet_freelist_init (lnet_freelist_t *fl, int n, int size)

	LIBCFS_ALLOC(space, n * size);
	if (space == NULL)
		return (-ENOMEM);
		return -ENOMEM;

	INIT_LIST_HEAD (&fl->fl_list);
	fl->fl_objs = space;
@@ -390,7 +390,7 @@ lnet_freelist_init (lnet_freelist_t *fl, int n, int size)
		space += size;
	} while (--n != 0);

	return (0);
	return 0;
}

void
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway,
	    LNET_NETTYP(net) == LOLND ||
	    LNET_NIDNET(gateway) == net ||
	    hops < 1 || hops > 255)
		return (-EINVAL);
		return -EINVAL;

	if (lnet_islocalnet(net))	       /* it's a local network */
		return 0;		       /* ignore the route entry */
+3 −3
Original line number Diff line number Diff line
@@ -640,18 +640,18 @@ int target_send_reply_msg(struct ptlrpc_request *req, int rc, int fail_id)
{
	if (OBD_FAIL_CHECK_ORSET(fail_id & ~OBD_FAIL_ONCE, OBD_FAIL_ONCE)) {
		DEBUG_REQ(D_ERROR, req, "dropping reply");
		return (-ECOMM);
		return -ECOMM;
	}

	if (unlikely(rc)) {
		DEBUG_REQ(D_NET, req, "processing error (%d)", rc);
		req->rq_status = rc;
		return (ptlrpc_send_error(req, 1));
		return ptlrpc_send_error(req, 1);
	} else {
		DEBUG_REQ(D_NET, req, "sending reply");
	}

	return (ptlrpc_send_reply(req, PTLRPC_REPLY_MAYBE_DIFFICULT));
	return ptlrpc_send_reply(req, PTLRPC_REPLY_MAYBE_DIFFICULT);
}

void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
+5 −5
Original line number Diff line number Diff line
@@ -105,12 +105,12 @@ libcfs_psdev_open(struct inode *inode, struct file *file)
	int    rc = 0;

	if (!inode)
		return (-EINVAL);
		return -EINVAL;
	pdu = (struct libcfs_device_userstate **)&file->private_data;
	if (libcfs_psdev_ops.p_open != NULL)
		rc = libcfs_psdev_ops.p_open(0, (void *)pdu);
	else
		return (-EPERM);
		return -EPERM;
	return rc;
}

@@ -122,7 +122,7 @@ libcfs_psdev_release(struct inode *inode, struct file *file)
	int    rc = 0;

	if (!inode)
		return (-EINVAL);
		return -EINVAL;
	pdu = file->private_data;
	if (libcfs_psdev_ops.p_close != NULL)
		rc = libcfs_psdev_ops.p_close(0, (void *)pdu);
@@ -145,14 +145,14 @@ static long libcfs_ioctl(struct file *file,
	     _IOC_NR(cmd) > IOC_LIBCFS_MAX_NR) {
		CDEBUG(D_IOCTL, "invalid ioctl ( type %d, nr %d, size %d )\n",
		       _IOC_TYPE(cmd), _IOC_NR(cmd), _IOC_SIZE(cmd));
		return (-EINVAL);
		return -EINVAL;
	}

	/* Handle platform-dependent IOC requests */
	switch (cmd) {
	case IOC_LIBCFS_PANIC:
		if (!capable(CFS_CAP_SYS_BOOT))
			return (-EPERM);
			return -EPERM;
		panic("debugctl-invoked panic");
		return 0;
	case IOC_LIBCFS_MEMHOG:
Loading