From patchwork Fri Feb 14 13:24:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 11382261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A521013A4 for ; Fri, 14 Feb 2020 13:24:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DB7A22314 for ; Fri, 14 Feb 2020 13:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728083AbgBNNYK (ORCPT ); Fri, 14 Feb 2020 08:24:10 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:45336 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgBNNYK (ORCPT ); Fri, 14 Feb 2020 08:24:10 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1j2awy-00BkJJ-33; Fri, 14 Feb 2020 14:24:08 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH] backports: patch lib/refcount.c to make sparse happy Date: Fri, 14 Feb 2020 14:24:00 +0100 Message-Id: <20200214142400.3a70d41278c6.I1154c5725b98fb8535c25fce7862eeb546535515@changeid> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg We're testing sparse, so don't want warnings here. Signed-off-by: Johannes Berg --- patches/lib-refcount.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/patches/lib-refcount.patch b/patches/lib-refcount.patch index cca07cfb7df2..0f63ec6aa6d9 100644 --- a/patches/lib-refcount.patch +++ b/patches/lib-refcount.patch @@ -10,3 +10,21 @@ index 5d0582a..8d108f9 100644 /** * refcount_add_not_zero_checked - add a value to a refcount unless it is 0 +@@ -153,6 +153,8 @@ bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock) + return false; + } + ++ __release(lock); ++ + return true; + } + EXPORT_SYMBOL(refcount_dec_and_lock); +@@ -182,6 +184,8 @@ bool refcount_dec_and_lock_irqsave(refcount_t *r, spinlock_t *lock, + return false; + } + ++ __release(lock); ++ + return true; + } + EXPORT_SYMBOL(refcount_dec_and_lock_irqsave);