From patchwork Sun Feb 23 23:17:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Irenge X-Patchwork-Id: 11399091 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 4245314E3 for ; Sun, 23 Feb 2020 23:19:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22EA8217F4 for ; Sun, 23 Feb 2020 23:19:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r4STgYyA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727158AbgBWXS4 (ORCPT ); Sun, 23 Feb 2020 18:18:56 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45117 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727714AbgBWXSX (ORCPT ); Sun, 23 Feb 2020 18:18:23 -0500 Received: by mail-wr1-f66.google.com with SMTP id g3so8198972wrs.12; Sun, 23 Feb 2020 15:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ccYGGn1uhoFTFXxc2+BMi8Zd6VbgRQR/G4zbVgFlOUE=; b=r4STgYyAZux/o3Dt72R5Ko6iVKcPclN6D+za76CjVEHXwp2xpo50t4Sk2ftvec+6md qufUrxwUIfQPvTvKCHy5caU007cv6vV0VC09jtOMlIJm0BOGfHS9ExLutNgwTkM6j4b0 JRQP1r9UZXQG0Y2MiBZvzKAiTtKxzm8J8HMw/ozs9pAohsOLmO7RmE7jjQxI42KQA6lo TIz2mOQgcSYOgjylKHxSus783f3EKk3emoFKntkmZQxUbB+/eYMSxPXra0jFrFb+x6O3 tM4tHlI6rVujFLcvUW271ltzJfVXg7OFLxE4Tirir3h/jq0MiGeWQBEkjMuKtyXoWydc En7w== 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:mime-version:content-transfer-encoding; bh=ccYGGn1uhoFTFXxc2+BMi8Zd6VbgRQR/G4zbVgFlOUE=; b=sikWP39GkGFe12Ls2TIbT3r97w2rqw3hdUiAfa6oYUQvWLP6FXc88MnZ/rTAgk/FMD h0kDwh0NJs0TrDa1MPATPWBzON15QeMeA+lhUxVWEuMO/HJqHScvWui8uKi2+aa5piZE FHEL5IRWtDr5+HQemGOvKKsWpvMRihkikSWPK2WUSLxHuSLn/+07r0BHK12mEqGjI9tm o36/uFpc0nKWpmo+guL1tRFgpmRCkeZzVsFtNl+ioIVDf8/jBLnhCVYEe2+JesNXBUSc vYkqmhg9PnoNldAbBqGj6Y/vwCY9zUC6UG1UUH8abFT1KQqD/dGfosUNnaeuRGsqAUTm Q6gw== X-Gm-Message-State: APjAAAXbIvzlsihWLMce+bMfxW0Y80EXjrS3bYIo5OdVRrr31wkcfnU3 raml30ilGCSI5YTWp4ty8Q== X-Google-Smtp-Source: APXvYqze4QE8CTc6dz6axQ5sYtb2cIFpT5+DoqGVfDSvPVruLu/UNRhG1Tr1HgVBEm1bF2VSQAm7Ww== X-Received: by 2002:a5d:4443:: with SMTP id x3mr2849788wrr.379.1582499902227; Sun, 23 Feb 2020 15:18:22 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:21 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org (open list:ACPI) Subject: [PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock() Date: Sun, 23 Feb 2020 23:17:03 +0000 Message-Id: <20200223231711.157699-23-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-1-jbi.octave@gmail.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Sparse reports a warning at acpi_os_acquire_lock() warning: context imbalance in acpi_os_acquire_lock() - unexpected unlock The root cause is the missing annotation at acpi_os_acquire_lock() Add the missing annotation __acquires(lockp) Signed-off-by: Jules Irenge --- drivers/acpi/osl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 41168c027a5a..7094abc5ffc6 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1598,6 +1598,7 @@ void acpi_os_delete_lock(acpi_spinlock handle) */ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) + __acquires(lockp) { acpi_cpu_flags flags; spin_lock_irqsave(lockp, flags); From patchwork Sun Feb 23 23:17:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Irenge X-Patchwork-Id: 11399083 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 86E96924 for ; Sun, 23 Feb 2020 23:18:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65EEB2192A for ; Sun, 23 Feb 2020 23:18:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HwmZB7S8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727746AbgBWXSZ (ORCPT ); Sun, 23 Feb 2020 18:18:25 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35789 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727736AbgBWXSY (ORCPT ); Sun, 23 Feb 2020 18:18:24 -0500 Received: by mail-wm1-f66.google.com with SMTP id b17so7458149wmb.0; Sun, 23 Feb 2020 15:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eQ5r1R+UXgGBuhFGCv+iPfwy5B5w68fhiQyCKeEBPYo=; b=HwmZB7S8xicuJrpOFUlYj6Ywn+OcDppxlvgApU3s1ba85vApmC+cFGYcw1DfOobyc+ 377o2d2eVuGlEGGsGSrGfo1nh0BMD+Gf/tHin6Ro+tEEnUH0EGHqFTgMaavwLJi86Nr9 p/QGVc/Oo4oFsgCtjMe+2EIvVKqsOSKzfIX0ZI7Jt2PQBjf43lRChJ/mE8oOaGGGhuQU XQvZkkWki2aSOv9m86A6T2UG5t6F7YD5uYy1Y7pmAqETA+NYfQPUJs0snqG5pdvp/aLq K+8kL0OfVBmD1tS0XT66jfv29XWpVp8p1CpQyEv6PEpz1VmaTRr/FlxBpvQ4gfjfPDrl hslA== 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:mime-version:content-transfer-encoding; bh=eQ5r1R+UXgGBuhFGCv+iPfwy5B5w68fhiQyCKeEBPYo=; b=ucRtrGTh+GWdEoEKlAP+5GW2fBCv5O3kTR7cYnuXMkYxu5xPFL5c8jgg/aoDLuqUUF gxEm34mULCdNgwBlDCUpLQvbPoiG29+I4qyvynHgs8JoXpGVvnXIuvoSkuGAiNoQtDwD DwGlYS2PWgdgGu/TApbwfMuBWy1o0XkoaAd7J92sLBkiyIhiFKClgBJ1PPQ/v1ep9Vfz 39QvS+4+m7NzFl6mKNb5W5WKBjU3ME/4atU2REtW+0n6BoHGkeJbQXvxywpXQ+gTz9/F DgP0603jAkf9CLT6TykwdvXMf73S0Tdfve6VtGKS9cdemfnCiWTqjrbCzB0hkOPa5GV8 zW7A== X-Gm-Message-State: APjAAAV7JMk9w+s464yAT9AV/5EO4Yp/1wLocH/lELBdIahcVU8bU2+q WUDfyqUYiNQu2s34zrzEbg== X-Google-Smtp-Source: APXvYqwuXB8nvNhZzMwFqEvDoIykVeaCu/TUBfTRvhnQKrU5oyx+n944YvUaV3THAhlRAMI2/lRwzw== X-Received: by 2002:a7b:cb97:: with SMTP id m23mr17317321wmi.37.1582499903296; Sun, 23 Feb 2020 15:18:23 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:22 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org (open list:ACPI) Subject: [PATCH 23/30] ACPI: OSL: Add missing annotation for acpi_os_release_lock() Date: Sun, 23 Feb 2020 23:17:04 +0000 Message-Id: <20200223231711.157699-24-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-1-jbi.octave@gmail.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Sparse reports a warning at acpi_os_release_lock() warning: context imbalance in acpi_os_release_lock() - unexpected unlock The root cause is the missing annotation at acpi_os_release_lock() Add the missing annotation __releases(lockp) Signed-off-by: Jules Irenge --- drivers/acpi/osl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 7094abc5ffc6..762c5d50b8fe 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1610,6 +1610,7 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) */ void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) + __releases(lockp) { spin_unlock_irqrestore(lockp, flags); }