From owner-svn-src-all@freebsd.org Fri May 27 07:33:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9309B4BFA2; Fri, 27 May 2016 07:33:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F862148A; Fri, 27 May 2016 07:33:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4R7XnOe053265; Fri, 27 May 2016 07:33:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4R7XnGM053263; Fri, 27 May 2016 07:33:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201605270733.u4R7XnGM053263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 27 May 2016 07:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300835 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2016 07:33:51 -0000 Author: hselasky Date: Fri May 27 07:33:49 2016 New Revision: 300835 URL: https://svnweb.freebsd.org/changeset/base/300835 Log: The SCHEDULER_STOPPED() macro already contains a predict false statement. Remove superfluous unlikely() wrapper. Suggested by: glebius MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/wait.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/wait.h Fri May 27 07:29:31 2016 (r300834) +++ head/sys/compat/linuxkpi/common/include/linux/wait.h Fri May 27 07:33:49 2016 (r300835) @@ -82,7 +82,7 @@ do { \ void *c = &(q).wchan; \ if (!(cond)) { \ for (;;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ @@ -103,7 +103,7 @@ do { \ _error = 0; \ if (!(cond)) { \ for (; _error == 0;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ @@ -128,7 +128,7 @@ do { \ \ if (!(cond)) { \ for (; __rc == 0;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri May 27 07:29:31 2016 (r300834) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri May 27 07:33:49 2016 (r300835) @@ -1096,7 +1096,7 @@ linux_complete_common(struct completion long linux_wait_for_common(struct completion *c, int flags) { - if (unlikely(SCHEDULER_STOPPED())) + if (SCHEDULER_STOPPED()) return (0); if (flags != 0) @@ -1128,7 +1128,7 @@ linux_wait_for_timeout_common(struct com { long end = jiffies + timeout; - if (unlikely(SCHEDULER_STOPPED())) + if (SCHEDULER_STOPPED()) return (0); if (flags != 0)