Message ID | b0dc037e-b41c-feaa-9f97-a55c331aa67f@vmware.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D3C16022E for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 10 Aug 2016 12:25:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 145B727FBC for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 10 Aug 2016 12:25:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06F0628389; Wed, 10 Aug 2016 12:25:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8529427FBC for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 10 Aug 2016 12:25:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E37956E751; Wed, 10 Aug 2016 12:24:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by gabe.freedesktop.org (Postfix) with ESMTPS id E60766E751 for <dri-devel@lists.freedesktop.org>; Wed, 10 Aug 2016 12:24:58 +0000 (UTC) Received: from sc9-mailhost1.vmware.com (10.113.161.71) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Wed, 10 Aug 2016 05:23:38 -0700 Received: from EX13-CAS-006.vmware.com (ex13-cas-006.vmware.com [10.113.191.56]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 796931854E; Wed, 10 Aug 2016 05:24:37 -0700 (PDT) Received: from EX13-CAS-003.vmware.com (10.113.191.53) by EX13-MBX-012.vmware.com (10.113.191.32) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Wed, 10 Aug 2016 05:24:37 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.113.170.11) by EX13-CAS-003.vmware.com (10.113.191.53) with Microsoft SMTP Server (TLS) id 15.0.1156.6 via Frontend Transport; Wed, 10 Aug 2016 05:24:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=58N0HK2Xy4nA7jG94IX9ZyugbArMDmOuSCreMOYvOZA=; b=pMsNHJhQ/Xzf+MRIgc81CYw7glksraWF3B7PU08tF1arhgQH8+3B2b83mL1xKfaPzw353fT9BeSsTbDkebwEgRvteO/mrIrxXBWU0KCqEAwoQVo0yrqNU05EuW/JxXv3oCcQI2TBUyhgUF/yHyHqh2pnTisyWa+3314JhfsQPoc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; Received: from linlap1.localdomain (155.4.129.115) by CY1PR05MB2332.namprd05.prod.outlook.com (10.166.192.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.557.8; Wed, 10 Aug 2016 12:24:28 +0000 Subject: Fwd: [PATCH] kref: prefer atomic_inc_not_zero to atomic_add_unless References: <1444474594-28359-1-git-send-email-Jason@zx2c4.com> To: Daniel Vetter <daniel.vetter@ffwll.ch> From: Thomas Hellstrom <thellstrom@vmware.com> X-Forwarded-Message-Id: <1444474594-28359-1-git-send-email-Jason@zx2c4.com> Message-ID: <b0dc037e-b41c-feaa-9f97-a55c331aa67f@vmware.com> Date: Wed, 10 Aug 2016 14:24:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1444474594-28359-1-git-send-email-Jason@zx2c4.com> X-Originating-IP: [155.4.129.115] X-ClientProxiedBy: CO2PR06CA020.namprd06.prod.outlook.com (10.141.242.20) To CY1PR05MB2332.namprd05.prod.outlook.com (10.166.192.154) X-MS-Office365-Filtering-Correlation-Id: 65b6e1b7-9f36-4b8a-47ed-08d3c1194688 X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2332; 2:TfHIfsyLYrJkeDXc9Z2wbeJab9P+dwQmK4DnAyGBtnhk1+EvTWb0KWa4yda814iZmZtgok0Pcw7wgxfMIWpkFXivMlVOfHciyEEL5cVZpA5+XtLmLVVwHEl9bg2oiYMhNW1l5vdwVahxWtghSjiNiHp8wIDElpJGnn6/iLfSK4FK/mcPAdhiPr9HOuci9ARh; 3:2U4TX5c753D/hvb1ucR1V0UuTUThFFo/9OZqjHlNk6ADepEkxTVcYsSaFlYXGnEJUllilGheju7JkaACJkHNUOV4DW2P9UBmOYT8ZPfLt0taJv/leNsagWzxF1t+hqFZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB2332; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2332; 25:wUK1D3Fw5blmlKcq6htWDQAjoZiCSNRbeTN0rBF8l+08hHwdTA7KVCdClKwmL4fCIkPKohrZn5JJwaF1Mw91aB9HBegkU3QoBjyWrrhBAddtaIjCIfSdyqzv0Lh2FDM1oFU4NMXvLxgy6T0CutjJUZjXlfJlTiQEmM8hfnXml+kVjtszjrgDtgC5q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FGJbyaPVRzPrb8RUW4+uJ2jrJMJCa/ZssZNkSOKWOYqYIiRyknOgd9yEhzqNfkJtsXYRBbJecAK4rVvXam3TdqKjC4h89ghiSrs2lvIm4Q7ulRTxl0cJV3iggQXM5OGZHRExb+OMEn4MTgkeZ6ruh4nyVJsxHp9eRCnPTZpqE6UyBR1uX+2nuSK4B/2BG0kIAnBVdYWw== X-Microsoft-Antispam-PRVS: <CY1PR05MB23328BC036452F0ED05A855DA11D0@CY1PR05MB2332.namprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(61668805478150)(10436049006162)(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040166)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:CY1PR05MB2332; BCL:0; PCL:0; RULEID:; SRVR:CY1PR05MB2332; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2332; 4:2qqbjlbTZbAJTlPDY+gcn4oLiOjKsnN0Ziwkp3ZgkJUGXhjCI+Br1I4tEkwMZ111i2OUxKh6POMuNGRzH0pp7Sd9TYVzsF6+vQymcTuu8o3FJu5nK7qpSNRccFI/cq5R3Ywe7ScbSnQMBjjSqH/2cG0eCojYa4G20y2t1KAdYyAjo2fHezBRZ5sCmigJMKceFX8/CoscS3n8XeX7T8k7208BZiBmLsdJXCEZ3WYdFrf5lcaOJ8/vVxRFSlU1yg0TURWkgX0IbCnXvVPktUmZl8ulWQdTem6hTB+q4lWuJZLEUQ6FedfEXjYPoOwFqDfUDYTGUrOzVcqGZLzMIvtAsA78qhEvSrmS5p1dKzxM7LhLJTK05td2q6njdSA4LYqry1/T3HozUK4JHd0/HYAsac6soiHqOla7cfjmxdCM3whSdzxz6pKD+qFzA7zFMguneml9Mxkso3nM92MTuR32f6/FmmMcWlT+xhL9gjUoPV6DkeI3l6l72l70UtNNbfED X-Forefront-PRVS: 0030839EEE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(2473001)(189002)(199003)(42186005)(101416001)(7846002)(7736002)(31686004)(65806001)(65956001)(47776003)(66066001)(50986999)(81166006)(76176999)(305945005)(54356999)(106356001)(97736004)(2950100001)(189998001)(68736007)(586003)(81156014)(4001350100001)(110136002)(64126003)(50466002)(8676002)(33646002)(4326007)(31696002)(77096005)(86362001)(575784001)(15975445007)(2906002)(230700001)(3846002)(23746002)(36756003)(6116002)(92566002)(19580405001)(105586002)(83506001)(19580395003)(65826006); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB2332; H:linlap1.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (EX13-EDG-OU-001.vmware.com: thellstrom@vmware.com does not designate permitted sender hosts) Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR05MB2332; 23:PvrvSLVvAu+N92we+GJuAZrNyZTYGC4APlPeM?= =?Windows-1252?Q?NHytbAJP7Qz1Da87/qGfzMEJAPFURdxoP89TKuKjLotyExzwZOHQ8f2s?= =?Windows-1252?Q?dW0eTT/wFZZrKQk0sTs2x+xEgPpGJeiM5kfYSsgvKBm+2601cQLZu0+S?= =?Windows-1252?Q?CIAj7SBpyyXX725kKnafiAae1snIGrzG+BR25ceNdtqG9RKMJKS86Tyu?= =?Windows-1252?Q?wz5OZmMBL1shae3eaqJxhUyJsQ9SiRGQf8I3j/LPbGKDNkoUNC0gftOX?= =?Windows-1252?Q?+mOYgChJUI1QNH386Bm8eaSzi2ansrZSz3Qaoj/UVore58LTkWFkqGAD?= =?Windows-1252?Q?HvK/THypqqyInJ0Kplf8Imbgbfe+Yaxj4whrxPvof5rKDf76rSf/PhCM?= =?Windows-1252?Q?9RTsBEdsYjRxy0iv9V49PBRzQimMwSrGQBcRPBjnndsL3zt0Co2cuxle?= =?Windows-1252?Q?qbRwQWcgY3bS14rjJwucV2M6onpMoxTTWHw0kros+derkLUxL+hE7Sph?= =?Windows-1252?Q?hkJVFr/ZYwJ9PEnnd2tgKJVXQWfvsVBjBk5gTZN4G0qSVI4TL6gypL8i?= =?Windows-1252?Q?e1VcwMQEIbDMOHa30GTFysn2vq9yeO67VTu4778SvVsWlpKd5Hclvj7B?= =?Windows-1252?Q?IT+Kej4S6XQHGXxr/Ys7jwkKiSHDiD5UEPxaNugWtfMJOk3A9OtE09Qu?= =?Windows-1252?Q?FMNSu9Zz8tUr0sZnYtEv14bw1LOHRXe9s7YBJPqd/ZLgSDOyW3LtukxE?= =?Windows-1252?Q?HTNliHNO3SIrHy8XBm8l9Gc3zDzUWe7IdHpUwMi1hCqhSdaV+xfm7zex?= =?Windows-1252?Q?t/Twk8jtg2ti27KyTYfFd9woCGpawSmAaqrqm38d5PN+mxqjVpd01DLt?= =?Windows-1252?Q?j6pWsurO0LrPZe8SyiHt861CMMbwIud0Q4X5rCzKA3ySC807Ru+LdcEP?= =?Windows-1252?Q?Xeh4yDniEhO2vQ9pHgtpHaAONPDca0WRLzIA5Vm46X1TnHbBfH2L2cFa?= =?Windows-1252?Q?OvvS52YLkUQzPf0qxB56gB78jNJuLdXxnwkdHBaPALqsss/6o39z1BX8?= =?Windows-1252?Q?HjofZj0ufhphZ+pqrXTMk8GoLBBMU19JiI4KD29+lbc1nDDGd8+nJ9Ed?= =?Windows-1252?Q?696eXuGvCz0mBkozqezADK0FMpsn6kr3d8wZCaswkv8IUKKBXGOiv8Zv?= =?Windows-1252?Q?quvuo8HKKPT55PkwsjMfsuhbGFW2JxkLBLmrleoBEiIfD1iY8XIfk1rM?= =?Windows-1252?Q?a62rnfyLBN3pZUoolGDOU2LEjVtb/nQ03uatdS+Q8FFJqT4ocFQYBYi0?= =?Windows-1252?Q?wajeU6zSp7NZdDhN94p89cVZfWJ18VP7pUqKreRNOXRo7CI4JlL2zRze?= =?Windows-1252?Q?rWnRAbxor6/?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2332; 6:YNHFLNztio+Ve7nunJhogNiBsssR2PeeWeGXo9MCzMMIUoOYazn3MgrUEzFHb2gGgvrknsXmYifMujwlLJlKDC9FjYzBp9QQGbGUJbjycabUzOrapDzVfdNaWoU1GyhKL60Mrzq8NqxHegF8XNvc7vjLK7D1cxbskXiRk9/Xi1Fe8HpYn5RnqwGHUauvxGCLcP/1yStmMKxrUpgtm6NW4tW94FlAD0/vNVEBK231jqByviUp/SCaBihGw4G8KbBYJE2697+3KPjz6OohcUN4bQ2BSskNnjLu6Jvfa7KSxdo=; 5:ZRWZGHcUDuYmFbYIfmNxvroWZJsfaygdax0rvUjKoUa3aCFpukjs+IbcdSg0Xa/cxOQTUW/Hz/KYaV8Ec2bRUDqPbYtArGN2kHJsEvC/JRqhFcISeWGg7m0UcvM9e6iUuULH72Tx3P3k/AoZHlodHw==; 24:AFdGoffk8bVwfNr7B17AZgUroVcI+y66+KYGpvHvepllJzcgJsHzRO8W6kW4k84QrnYsSLLcKxXAdB/3z1Nw0a5sotS1nvk05qnA/bvDe4Q=; 7:lzRP39+pCsvzVSn9cQXcI1Pbhb64CxRQv5lKtgYY7v8HfDNFNUsRbfbLZ+ZkjXxpNnh2hWxTHIp9K/X/H8AmWA3lEFDI300G1uqMX/kbkRXqg044WGEwDlBSm8pOwW+ktvWcwfUyPXMWCPhCc2e+cTlSNk8hrxS8I2b3uADfPCalNeUCQcVG0wD0z0JWCBQoIS47WiAgBmMYWhxLf1rI6mLZ184y+eeV9d3O53TNfJ8TIO8ke324kgzBgceMpf8H SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2332; 20:dHZZwecGc25exAroaroFBkrbG0bCK79kCZ/jJieQV3A2oBktSw2psFZLAqQk48VWElYx3Lr7iGWoZIZlwT8TcpfgSGcit/oJHvSVC4lcIAB9Gx97fz+Jik2KLgyutbIYErQjNgisQSE2rdTLYkceRqQqO8BKqsx33hXbs+n14bs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2016 12:24:28.2154 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2332 Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 484604d..83d1f94 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h @@ -166,6 +166,6 @@ static inline int kref_put_mutex(struct kref *kref, */ static inline int __must_check kref_get_unless_zero(struct kref *kref) { - return atomic_add_unless(&kref->refcount, 1, 0); + return atomic_inc_not_zero(&kref->refcount); } #endif /* _KREF_H_ */