Received: by 10.213.65.68 with SMTP id h4csp295205imn; Wed, 28 Mar 2018 03:51:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+fIrCsPnzXipsbnoI1WpDlo3AoO8m0pXwuPdM9lcFu7thgO1JNDv8E+jDcpj6LIOZdfv/x X-Received: by 10.101.98.145 with SMTP id f17mr2144865pgv.398.1522234315824; Wed, 28 Mar 2018 03:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522234315; cv=none; d=google.com; s=arc-20160816; b=tvDQgeGNN6arWUrVV27pDcrkf4Z/476dycSWdpoEApctAL/jdLccWGBkfi0d1Bwdp8 sXqA7KQ0oh3vp4ffcozsCB37mS+tkHUrnZxFWjYICwPOKD2gWpjutZMbsPaFwODd/A/k PHbYAvRDJG8LiSFQ7AoipqzrUzysC7fJOJNRlCSkho9cQDum7FIwKsQO4Ffs7wmPI+WJ kE1QwzHofINxkqnIEAjQP+v7AsMuOAz4z0PULLrT0DfHYwDTdrpVCUzf/zrW6g0HL4cl FMQ4Nj2/1GDy9DPBUhr58nNB/tnEO2WaK5MvCmfHezIA2lYfHFm5np5KYOQjJ/Tvy7ZO 79FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Xl2FtV83bQbnWP3+isYZpRD72zzWELf6Xs60zR6mnW4=; b=JFDyW1XhakhOdniGywVpd87/UbA8UZBLKzY7J4agRx1OPshb83L6hXyIdPg5zgc2NB UarquMibsgs8t6kEFhxYm3DuQ5hHi2Hi1wRh9JB9bwyC47N4S74A4PwbTUhm30FR1N/M t/Vzj0AYQ8zZjesuSEbgeLiGD/dDdCYozGzXx83OEWmakXgKJZLjuhL6li+q2lJkowv9 UlS9ZwCCmqvEBnCpdau34dMVT5jAPGXI2phE/mVRzTBEr+EPitqi02I0qqAFRe1m2/Is lqvpTvkFp6D8f4y6aEt92/EtfAfv2FtfxuTohZe9fTp6Iyvc+HJFQ6z8wP63CQU76t/Z Fqdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3A5wsCd; 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 a9si2306983pgu.454.2018.03.28.03.51.41; Wed, 28 Mar 2018 03:51:55 -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=E3A5wsCd; 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 S1752486AbeC1Js6 (ORCPT + 99 others); Wed, 28 Mar 2018 05:48:58 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53614 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbeC1Js5 (ORCPT ); Wed, 28 Mar 2018 05:48:57 -0400 Received: by mail-wm0-f67.google.com with SMTP id p9so3704879wmc.3 for ; Wed, 28 Mar 2018 02:48:56 -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; bh=Xl2FtV83bQbnWP3+isYZpRD72zzWELf6Xs60zR6mnW4=; b=E3A5wsCdeFqEgtJaMWQNby6NQp0W36mET83YgX7Tx6dH7WMPzZdaWKlnC5l2OSn/GR 6GmoSjVjfvgtcWvZxrV4zlwGRYYx8owAryRqVpXPN0iUtlhgCnSj4JkQq/OLOHFr4zpH vUdxq12aI/SB+w1gjaEg1y1yC/0MmvoqB/AJQ= 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; bh=Xl2FtV83bQbnWP3+isYZpRD72zzWELf6Xs60zR6mnW4=; b=uh2bs2J6tl0RcRVNJZEg3kfBCOP8DoMw5g+moZYj6/8WxuI3+q3JaB54j6fnODJDts C7L/7vaEK4mzTd6hF1FVKjUIAIsHAJH5/X9aszp+qXVCT6wBclfbwVE5n8Ra+h8/2f8n VKJwwRnRD6QxrcKnx7rivYENSDcWoDSIxchlFwd4gSd71H5t3GOz1lvCknsUa5ohpmUT mFXZyeQ/wLfN3p08dbzg9BCje85rMpGamFicnC5cSCCOs5v50wdls4u8U/Ghu8QdEh+F b1PlUCxYxy3ISDvtr+RdnlDEUj0+5TIJd3HzPH8XbC6KcE2Y9G+8u9VXXtj4hyEKBRDv 7e0g== X-Gm-Message-State: AElRT7FsWFAlGq3IRKpFqfLUZiHKRMcwjcUnOQeHxgbEFlYQqozlt25W 9uqPEdn2cI16wijhDv1VBkYM2Q== X-Received: by 10.28.9.68 with SMTP id 65mr2051062wmj.29.1522230535944; Wed, 28 Mar 2018 02:48:55 -0700 (PDT) Received: from localhost.localdomain ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id n49sm4911359wrn.90.2018.03.28.02.48.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Mar 2018 02:48:55 -0700 (PDT) From: Andrea Parri To: Peter Zijlstra , Ingo Molnar Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Andrea Parri , Will Deacon Subject: [PATCH v2 for-4.17 3/3] locking: Clean-up comment and #ifndef for {,queued_}spin_is_locked() Date: Wed, 28 Mar 2018 11:48:38 +0200 Message-Id: <1522230518-12398-1-git-send-email-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 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 not used _and_ it is reasonable to conclude that it'll never be. Also removes the comment about spin_is_locked() from mutex_is_locked(): it remains valid, but not particularly useful. Suggested-by: Will Deacon Signed-off-by: Andrea Parri Acked-by: Will Deacon Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Linus Torvalds Cc: Will Deacon --- 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 cb3bbed4e6339..9921822c51585 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -147,9 +147,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