net: Drop unlikely before IS_ERR(_OR_NULL)
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 12 Aug 2015 10:29:47 +0000 (15:59 +0530)
committerJiri Kosina <jkosina@suse.cz>
Tue, 29 Sep 2015 13:15:40 +0000 (15:15 +0200)
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
net/openvswitch/datapath.c
net/sctp/socket.c
net/socket.c

index ff8c4a4c160986bf206f4751860f9767e71246bf..01d69680ba5d0f478a6d0aeea9489d859b43ca2e 100644 (file)
@@ -1143,7 +1143,7 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info)
                                                info, OVS_FLOW_CMD_NEW, false,
                                                ufid_flags);
 
-               if (unlikely(IS_ERR(reply))) {
+               if (IS_ERR(reply)) {
                        error = PTR_ERR(reply);
                        goto err_unlock_ovs;
                }
index 17bef01b9aa3e7f75328d39fc976f9e80d641e92..897c01c029cab3d5805cc56b0964c70e06f4143a 100644 (file)
@@ -4475,7 +4475,7 @@ static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval
        }
 
        newfile = sock_alloc_file(newsock, 0, NULL);
-       if (unlikely(IS_ERR(newfile))) {
+       if (IS_ERR(newfile)) {
                put_unused_fd(retval);
                sock_release(newsock);
                return PTR_ERR(newfile);
index 9963a0b53a642f4ce600018606d1b8cb9982df9e..dd2c247c99e30a7950323c85e1ea9cb604eac218 100644 (file)
@@ -373,7 +373,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
 
        file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
                  &socket_file_ops);
-       if (unlikely(IS_ERR(file))) {
+       if (IS_ERR(file)) {
                /* drop dentry, keep inode */
                ihold(d_inode(path.dentry));
                path_put(&path);
@@ -1303,7 +1303,7 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol,
        }
 
        newfile1 = sock_alloc_file(sock1, flags, NULL);
-       if (unlikely(IS_ERR(newfile1))) {
+       if (IS_ERR(newfile1)) {
                err = PTR_ERR(newfile1);
                goto out_put_unused_both;
        }
@@ -1467,7 +1467,7 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
                goto out_put;
        }
        newfile = sock_alloc_file(newsock, flags, sock->sk->sk_prot_creator->name);
-       if (unlikely(IS_ERR(newfile))) {
+       if (IS_ERR(newfile)) {
                err = PTR_ERR(newfile);
                put_unused_fd(newfd);
                sock_release(newsock);