Received: by 10.213.65.68 with SMTP id h4csp1743263imn; Sun, 1 Apr 2018 13:47:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49lmD3eEOzDEYxML7Sghi2YvdJMVhK7g5VL4pJ5niYHfFJDJ3xHNdUimPOOZaTZZ+RKQR6C X-Received: by 2002:a17:902:2884:: with SMTP id f4-v6mr7262081plb.153.1522615636822; Sun, 01 Apr 2018 13:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522615636; cv=none; d=google.com; s=arc-20160816; b=ALdqMPM3aTNeZQNnlWeVqq7YCnVxwdpi9MZbqyNttIlsb98CZp29NnaTc8A5yg+Q6t ljzaBi9V7hk0Fsykf6MqvI0D3ahqEnHPqJNQ+3fGKsRvV6cQl7Ijln9bE5I8zEb2C4Zz c+oY4SBCzd8Awmb5z85V3XO84dwhxz+UU53+6wVtEuwRv8M0kqZxKRUU05i7b15ndV6P +A8/lEMaN/FLn76h9fFfDA3DVllBGn0xAynfEhYMdpmNrjfujturMuCLwr1JuF2HdVAR 51kgaaaoUNabi2PfH2PoR3u1Vc3saTQkRPiCNY2BXutrIZQG5SVjN1NdPLiH8euW8Las 43bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :organization:arc-authentication-results; bh=0HknKiOqUp0cGf/z6i8nhP+TBg6FIUbjh80Q7FF5OEE=; b=nZe4HgTSSRtsA0GCorqgVd4JV70nT8j8sZbORMwQSTBANuCaORAp18SlYrAj4KTUWK Rvi+hdytaE+ai4ktus3GTCRotCKBgKjTQ8geHsBJfyjd/LxehwpH8/oqKFMCvpB/QAs1 72U3GyPwGSOGepYo0hC1qmj/RQWZw2TarFOlimjRQu8eO9Adg0W1p0VbWJ351WwL4gU3 UQ7ojdyGrwoxAsZAh7N891719CcSZdHv9DYhPsqcoHmxJNYqD+QNww1ouVGsHWeSi97f pqyIg7ctQI3fxRfwgwYs7hoBP0jM+E4odBaLrIvX5YJpPK2Ch3fprolPuCuKda7yxb+n 52ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si8188152pgs.538.2018.04.01.13.47.03; Sun, 01 Apr 2018 13:47:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754433AbeDAUoJ (ORCPT + 99 others); Sun, 1 Apr 2018 16:44:09 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754042AbeDAUoF (ORCPT ); Sun, 1 Apr 2018 16:44:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C1B9406E97C for ; Sun, 1 Apr 2018 20:44:04 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-59.rdu2.redhat.com [10.10.120.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B3F41120AA5; Sun, 1 Apr 2018 20:44:04 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 38/45] C++: mutex_trylock_recursive_enum() int->enum From: David Howells To: linux-kernel@vger.kernel.org Date: Sun, 01 Apr 2018 21:44:03 +0100 Message-ID: <152261544366.30503.65430592511529554.stgit@warthog.procyon.org.uk> In-Reply-To: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> References: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sun, 01 Apr 2018 20:44:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sun, 01 Apr 2018 20:44:04 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make mutex_trylock_recursive_enum() cast the int it derives to the enum return type. Signed-off-by: David Howells --- include/linux/mutex.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mutex.h b/include/linux/mutex.h index cb3bbed4e633..2bacc5065980 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -224,13 +224,14 @@ enum mutex_trylock_recursive_enum { * - MUTEX_TRYLOCK_SUCCESS - lock acquired, * - MUTEX_TRYLOCK_RECURSIVE - we already owned the lock. */ -static inline /* __deprecated */ __must_check enum mutex_trylock_recursive_enum +static inline /* __deprecated */ __must_check +enum mutex_trylock_recursive_enum mutex_trylock_recursive(struct mutex *lock) { if (unlikely(__mutex_owner(lock) == current)) return MUTEX_TRYLOCK_RECURSIVE; - return mutex_trylock(lock); + return (enum mutex_trylock_recursive_enum)mutex_trylock(lock); } #endif /* __LINUX_MUTEX_H */