Received: by 10.213.65.68 with SMTP id h4csp1598202imn; Sun, 1 Apr 2018 09:44:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/kV3w3ddXuH8/KQmCXhMwwuVKKgOw1hQ1S8bY5tYBQSYaWAn3cnvSirhP/RTq4oVMVRl7N X-Received: by 10.99.120.74 with SMTP id t71mr4395569pgc.310.1522601092633; Sun, 01 Apr 2018 09:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522601092; cv=none; d=google.com; s=arc-20160816; b=YcxPb0vkdSM+U3YrSpVfWkgODVpLurmlx6uiXyEIajXDOslgdGYlnb70ZTR+ekSe+8 rUuUYyw7YnzEfo7b9Mi452pUlvYOcMikjgBXwYEYKTiKznFQJeo1CuOC9Mv5FepY2jyR gnFOIC3n3R89hVLjnP7VuVgqQOrvh8V1ZJ6KTSrFv124l9Dug2g4m+JiR20SFMxCBQZL yqpK3iNaUGsXdqAngKXxyrRKaIj8pD7Tvg+rShhfg+b1+6wAaKD87eNQDOry6Cfqf7gR ut7HpEEvIdAjkI9+g2B7dvpJfWjymGIkz5GzWbPR8Oh80uHtHkrX68bJc2FqN9Wr6WKT mu5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=G0nloQpxOw5qXhlzYhmJAvnIflN01a9aYuajZOWIkVQ=; b=Ebq8U/xYIGQetODhTtTK/I1nRg/Z77CSIBTBTKUeuL8gkT5Wp3oOZavONCnUe76tJH r2VAtjZxdDwr1TQyzW2QDlaaE76KSMey5U6sXGxBvhC+o75aSkzAj1xoRYivFXnGsAVl v66pPVnMUywTrLsrn67X1iZ/umYHGZsICfaP3SFzVreL8jIYtYZeU83PvK+jd4vUOdOK IRl+EtRyzU76dC0Z3NsZp5EET5MoQL5Oo5mMbnVBBtIC9fmYdXnXM35g5GyIV0ZiN7KJ StZbSm3/9cNy+oBQLPn+v5o78cO8dCkYNE4mS1N7y4Zi5kSNtykqiIihQCYsmiHpx3WQ 16iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=m1mq3NC9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u75si9678536pfd.183.2018.04.01.09.44.39; Sun, 01 Apr 2018 09:44:52 -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=@amarulasolutions.com header.s=google header.b=m1mq3NC9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753851AbeDAQnG (ORCPT + 99 others); Sun, 1 Apr 2018 12:43:06 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:40393 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753834AbeDAQnE (ORCPT ); Sun, 1 Apr 2018 12:43:04 -0400 Received: by mail-wm0-f65.google.com with SMTP id x4so23426236wmh.5 for ; Sun, 01 Apr 2018 09:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G0nloQpxOw5qXhlzYhmJAvnIflN01a9aYuajZOWIkVQ=; b=m1mq3NC9MA97RVL+iFwQTVdKrBaUmWrfQxz/1pi+s0tq4O4pA/QWa72ebahy+T+VrO INg2G/Ndtho5/RqkcmiQqzlg/nTnbzktzi6fJFy7cU5D85xzHRS21jhIZ1H8uM0ysq+W FFeEnXgpa2ZnsIfRGBT1Y8PzCRUoS38ap5T8E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G0nloQpxOw5qXhlzYhmJAvnIflN01a9aYuajZOWIkVQ=; b=J7obVWzEolEoghxjVDjD+S49Wu2E+ZMLohUz8GKvm2SvzUNSg2xOh9QoNvUUbaBEsI yVg+AXgbpgs3Y11Acy6SWzo1pMTjb6y6J92hqU6wjJf40BTUCKfHAzqfsg0AdIJpmILv fZ33aYqOz5J2XfThpxP4T0/nzN9AceY81z6FsqpyqryH52dr5xk0l1lP4E2mLD5kwjAg PJYohmA+5Nppn4mf2/FxBKqfHMim2gm2lYJcKO6iiuiL6CmuXol/0WHnHnI4dSKLk7NZ HNU3EARpKNqf37NA3gAzaTpaiM45XzUg9x0vOQegjZXNqC3xxHIOiIKDSazHdChapm1b tA+Q== X-Gm-Message-State: ALQs6tDILP3e72e2AsRFY0BrNV3c3f/Z9asCAY3fJVukXL80KyqfxcWE WT5hJn5fTbvB3DqUFE1Do8FZ9kFh X-Received: by 10.28.112.11 with SMTP id l11mr1480878wmc.31.1522600983177; Sun, 01 Apr 2018 09:43:03 -0700 (PDT) Received: from localhost.localdomain (host187-49-dynamic.250-95-r.retail.telecomitalia.it. [95.250.49.187]) by smtp.gmail.com with ESMTPSA id a205sm2579302wmf.18.2018.04.01.09.43.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 Apr 2018 09:43:02 -0700 (PDT) From: Andrea Parri To: paulmck@linux.vnet.ibm.com, Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Andrea Parri , Will Deacon , Linus Torvalds Subject: [PATCH v3 3/3] locking: Clean up comment and #ifndef for {,queued_}spin_is_locked() Date: Sun, 1 Apr 2018 18:41:52 +0200 Message-Id: <1522600912-6208-4-git-send-email-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522600912-6208-1-git-send-email-andrea.parri@amarulasolutions.com> References: <1522600912-6208-1-git-send-email-andrea.parri@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Removes "#ifndef queued_spin_is_locked" from the generic code: this is unused and it's reasonable to conclude that it won't in a near future. Also removes the comment about spin_is_locked() from mutex_is_locked(): the comment remains valid but not particularly useful. Suggested-by: Will Deacon Signed-off-by: Andrea Parri Acked-by: Will Deacon Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Will Deacon Cc: Linus Torvalds --- include/asm-generic/qspinlock.h | 2 -- include/linux/mutex.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/include/asm-generic/qspinlock.h b/include/asm-generic/qspinlock.h index b37b4ad7eb946..dc4e4ac4937ea 100644 --- a/include/asm-generic/qspinlock.h +++ b/include/asm-generic/qspinlock.h @@ -26,7 +26,6 @@ * @lock: Pointer to queued spinlock structure * Return: 1 if it is locked, 0 otherwise */ -#ifndef queued_spin_is_locked static __always_inline int queued_spin_is_locked(struct qspinlock *lock) { /* @@ -35,7 +34,6 @@ static __always_inline int queued_spin_is_locked(struct qspinlock *lock) */ return atomic_read(&lock->val); } -#endif /** * queued_spin_value_unlocked - is the spinlock structure unlocked? diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 14bc0d5d0ee59..3093dd1624243 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -146,9 +146,6 @@ extern void __mutex_init(struct mutex *lock, const char *name, */ static inline bool mutex_is_locked(struct mutex *lock) { - /* - * XXX think about spin_is_locked - */ return __mutex_owner(lock) != NULL; } -- 2.7.4