Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4088196ybh; Tue, 6 Aug 2019 06:09:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDZK9zCamMhFebbruqLLqP9bCGMfGc9QGg9pnkfEzDDUbOztrxi7N+vaZQra+qe27BP2iA X-Received: by 2002:aa7:8007:: with SMTP id j7mr3589371pfi.154.1565096998493; Tue, 06 Aug 2019 06:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565096998; cv=none; d=google.com; s=arc-20160816; b=PAecFkbVsFaxvjQz4P9MPrClJkcZXBwEMdjtfNLlmBx2jG99gQgozh/FuDEJuNGcKF tiMATkxPu/jO3T0fcV0Xu6vWuxi4XagyJ2FrQVNSVWMu5JaiJCqjAA2QEW61Vmv5JkO5 0T1N9G879gIQCEYpNU++p+dlIfNEcOiamQ4G3O4JsJc+i+ji51sIEoFVAgNkWHeMvJfO d6YGAubRr/EQBvH4u9WNlvAfcozNW/8I+gPYlQzcyVa1SiqC4DI3zSbXaNxREPslZpSn TczIJXiro5mdcZi6x3s8H29LWA4gebwUgAN1fVyXNhVSS6I6xUoKcS3sPtAzVNC/VRVZ l27A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=nFkwO3MPmvQPUIRJfnPMzdxaHARS7dPdvCVPr6Ef8Y4=; b=PwdFHWzubqxrw5W9CaLojmwjunCCEc6b74+TdYEH0fOvUym63OY/gexaAQ+Pxj0p1D 2shkwevAgPuFZFpNsv+D1tp6PCEmJ8cdpqqafu1Uyh9PG+ApUNNOAHaiNGvahUFrqHMP Af2XeoYHu+aeGY9ANWumZoX8hQeovymlwejBGoP6LGPkFY9KBqT8BNoEsfqD6oICV7gI Xy74xjJsRzWU2og45EYQ1iRxpqqqIh1FwiGEHz5LFh2aqatJKmaOZKmyVyw6CGb269qP IXP44fccc5a7m2WUa83pYs3ntkY6+CWcobZWicyITVj1PepMd7u4IoW4v9aXVLYzS6jJ juMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=eHBTuM6B; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l71si47747690pgd.314.2019.08.06.06.09.42; Tue, 06 Aug 2019 06:09:58 -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; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=eHBTuM6B; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731381AbfHFNH0 (ORCPT + 99 others); Tue, 6 Aug 2019 09:07:26 -0400 Received: from terminus.zytor.com ([198.137.202.136]:37229 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfHFNH0 (ORCPT ); Tue, 6 Aug 2019 09:07:26 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x76D7Gco2187833 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 6 Aug 2019 06:07:16 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x76D7Gco2187833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1565096836; bh=nFkwO3MPmvQPUIRJfnPMzdxaHARS7dPdvCVPr6Ef8Y4=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=eHBTuM6BB2rgr7xx9hNrDERRlcvl1L7A3h1ZTceJPc5O4lb+hw00Ypb101NmvMmfd JoME26TadCt4Zkwu99YsYmMQPLCVOVFtwaowUJDVTeEU2C16zL2gzcHyDzYvrm6v3Z BmOWblODjVnTHe0fbslxJgSfg3mnC1ZHDbnvj1YtAcrfQ3C5gTpjhBFyT5SD5WbEp6 LOQpW8ml5M26T6sNYk91APQ9RILPk0xDp1U7pyyBJBcNsW8LvaaKPQsrA5mrxB1IPX LFORKaBeOTPqEVjU0l75JijdUXJLX5Hm0Wfe0HE0EDZFXhA4v1ZKrfGjGiiXIotfJX S0XX9ceR8S51A== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x76D7FVW2187830; Tue, 6 Aug 2019 06:07:15 -0700 Date: Tue, 6 Aug 2019 06:07:15 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Mukesh Ojha Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, mojha@codeaurora.org, hpa@zytor.com Reply-To: peterz@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, mojha@codeaurora.org In-Reply-To: <1564585504-3543-2-git-send-email-mojha@codeaurora.org> References: <1564585504-3543-2-git-send-email-mojha@codeaurora.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/mutex: Use mutex flags macro instead of hard code Git-Commit-ID: a037d269221c0ae15f47046757afcbd1a7177bbf X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a037d269221c0ae15f47046757afcbd1a7177bbf Gitweb: https://git.kernel.org/tip/a037d269221c0ae15f47046757afcbd1a7177bbf Author: Mukesh Ojha AuthorDate: Wed, 31 Jul 2019 20:35:04 +0530 Committer: Peter Zijlstra CommitDate: Tue, 6 Aug 2019 12:49:16 +0200 locking/mutex: Use mutex flags macro instead of hard code Use the mutex flag macro instead of hard code value inside __mutex_owner(). Signed-off-by: Mukesh Ojha Signed-off-by: Peter Zijlstra (Intel) Cc: mingo@redhat.com Cc: will@kernel.org Link: https://lkml.kernel.org/r/1564585504-3543-2-git-send-email-mojha@codeaurora.org --- kernel/locking/mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index ac4929f1e085..b4bcb0236d7a 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -85,7 +85,7 @@ EXPORT_SYMBOL(__mutex_init); */ static inline struct task_struct *__mutex_owner(struct mutex *lock) { - return (struct task_struct *)(atomic_long_read(&lock->owner) & ~0x07); + return (struct task_struct *)(atomic_long_read(&lock->owner) & ~MUTEX_FLAGS); } static inline struct task_struct *__owner_task(unsigned long owner)