From patchwork Thu Apr 7 23:12:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Frederic Sowa X-Patchwork-Id: 607712 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qgyzj1zbdz9t5C for ; Fri, 8 Apr 2016 09:12:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=stressinduktion.org header.i=@stressinduktion.org header.b=iuSYXlab; dkim=pass (1024-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b=lYWTV1bb; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756541AbcDGXMN (ORCPT ); Thu, 7 Apr 2016 19:12:13 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45402 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756419AbcDGXMM (ORCPT ); Thu, 7 Apr 2016 19:12:12 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C001920A0D for ; Thu, 7 Apr 2016 19:12:10 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 07 Apr 2016 19:12:10 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= stressinduktion.org; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=iUr75dtjTuSG380Iytv/FmI7Mtw =; b=iuSYXlabF4lzdAIJ01BMJl5cG1otdvrRBCp7Ue2tjNlUr3WI6XUShts6FAr bsvQ/VwdAtyY9Ols3a1ggE0XekQ5th9wJj8MHxFgsD83HTCVGzvI8819rnzglpun 4o6LetfWuNXMEp45qLdR0arwBNE7HKcphzgEj4dXyjtuuNCE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=iUr75dtjTuSG380Iytv/FmI7Mt w=; b=lYWTV1bbFaErd0/Z1Q7MzmWK6ub+f0+ChbtmWAdGIhd5gtw4n1/7pszutl I71YEtod9WIqYwYyzqqIOdSshUv0tlPfpHnobCIGPWbWB92W+WI7BFStNzLDvzq4 RoiIRPzKb2muqC4L/ft8ItWwuJ2kAYc6kt/fULWcHKPhxe+Tg= X-Sasl-enc: 2FplMTKtTjr68ZJ1UcDfAQU7JgqaX/5gJEasplwX/SEb 1460070730 Received: from z.localhost.localdomain (unknown [213.55.184.139]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B883C00014; Thu, 7 Apr 2016 19:12:08 -0400 (EDT) From: Hannes Frederic Sowa To: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Eric Dumazet , David Miller Subject: [PATCH net] lockdep: provide always true lockdep_is_held stub if lockdep disabled Date: Fri, 8 Apr 2016 01:12:02 +0200 Message-Id: <1460070722-18652-1-git-send-email-hannes@stressinduktion.org> X-Mailer: git-send-email 2.5.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org I need this to provide a generic lockdep_sock_is_held function which can be easily used in the kernel without using ifdef PROVEN macros. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Eric Dumazet Cc: David Miller Signed-off-by: Hannes Frederic Sowa --- Hello Peter and Ingo, if it is possible coud this go in via the net-tree, as this problem is visible there already? Would be happy to get a review. Thanks, Hannes include/linux/lockdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index d026b190c53066..dc8d447cb3ab1c 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -428,6 +428,8 @@ struct lock_class_key { }; #define lockdep_pin_lock(l) do { (void)(l); } while (0) #define lockdep_unpin_lock(l) do { (void)(l); } while (0) +#define lockdep_is_held(l) ({ (void)(l); (1); }) + #endif /* !LOCKDEP */ #ifdef CONFIG_LOCK_STAT