Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp639864ybb; Fri, 3 Apr 2020 09:09:08 -0700 (PDT) X-Google-Smtp-Source: APiQypIQqnzG/+knvF+FnAJNgTS2RjqOHnTaTV3xCEoZhQU+SbIYolOVHeaXfCyw+7TMbzu2JDUr X-Received: by 2002:aca:3302:: with SMTP id z2mr3693056oiz.3.1585930147880; Fri, 03 Apr 2020 09:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585930147; cv=none; d=google.com; s=arc-20160816; b=U5SjA5aKzhfpmWRjhUU4qQzYSe1kk8Efk7JleXIY5cu4MJVlQi6B2U6V+876PIb5ek aVQTyPlITtb8R4ZUlYj2a3Vo4iiRvn92ZD1SMThyUzOc9OGFQbqniWZ/p1PJN+6Axo3L CSeTfLykADdZoP9E6nEmYmXxpZowM96G/Fz256RbG2HyWpyfDcb6sbqQRRVxIu3koCYm VwZVd1kowwaY6kWvwqQIBdqjBqr9+S08d18v/iV2FdoPy4X4m6xt/nCmL4IVnRwTJdCV kMQB/QrHef/hDS+GfyV8axTl4+XOgH5+S9BGgttgcu8LEwcJKElL1d4wvXK0nRvY8Gmd vW5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IWqKdCVyF/z0Jc9mD3yRP7UIaHgfLawKN8WXGvn4s4c=; b=lUBD8EU8+gsV4b2wF21AgQzMh6h0Vrs2sXM3uc+ch4qo40czDO2lRHp9s3bY23THjS 0ToBZX8G+3hQG17NWGQgfPw1x9NKD5WRxnz+0oH9G6M76vDpZrhJAF1yUyR7x3ZHAQVb ATiKV7zvoweBlnzgbVuX0IgNu1UYckFtTRu8JiWLNDGMBIsoBn3UcpQHMVNRSUpEGE/+ Y5akh/91AWRW9iX1V9yn15fg9tenv7YnkQcXqorBOItOwGO677rhDATIx5FLn34b1bAZ 3BT6KIGtUyCcv6tCcSIegXepSIbK6DunViFR8HMWzRyTddFirQZd6GiWo/Oe60d8SNCo 69HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GfnGlLgU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w203si3837420oie.193.2020.04.03.09.08.53; Fri, 03 Apr 2020 09:09:07 -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=@gmail.com header.s=20161025 header.b=GfnGlLgU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403981AbgDCQGB (ORCPT + 99 others); Fri, 3 Apr 2020 12:06:01 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44399 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403868AbgDCQGA (ORCPT ); Fri, 3 Apr 2020 12:06:00 -0400 Received: by mail-wr1-f66.google.com with SMTP id m17so9117620wrw.11; Fri, 03 Apr 2020 09:05:59 -0700 (PDT) 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=IWqKdCVyF/z0Jc9mD3yRP7UIaHgfLawKN8WXGvn4s4c=; b=GfnGlLgUcYQIhYNkEieLbOd0BRlWORaqkq+5m0qgwVo5hzUcRhv8tTxl1be5jb/9KC FBBtRRg9JRTJegE9didYrrlZ+eV7nagVkB//sCytQSRNLF7Jg6PSwoC//w/26ZBJUTDm qXHvr4l+mvZfQalJct1p/EDlLHXqXABIPVPu9GYAwcU/ZHj5aTWHSvXbpAa1/2p+Kdhs y9V2XGB/sZsCbWmjr3Rw8xwBATsq+00Qc/SsPalm1TGo7lAkc4THILYVGwNI9sq6JTRs W7XzrPbwy9iDU5ooIxt3yiDlNCfSgZ1GDq2SgRJKtwPJCEbfjJx38P45StiCQff5HFge hwJg== 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=IWqKdCVyF/z0Jc9mD3yRP7UIaHgfLawKN8WXGvn4s4c=; b=o4w82XjCamT05qdQtLQAmHCag38UolFarxPeXq+0gLWBOJKvnQzmSEXN4gMIFfYqvi M6/RBSo0zhRtDomOo5s7esYFJuv9DliE/VGjijJ4HSnZFj/1xR0WABHPFevZsBN4bGn+ JlR8DLO2KK2IrsT20le72aWRxXoIxzgzpimhVthJf4GK/0uAbrEVcP5BU9mgvGjdKxJy oH+u+HAU7BHFBgFpks/EjUFY2ebD0QYlnqbzL36VyAx3OvDSqwP+RxvtjHjet8scn6S8 r7+y2n1QOD3KeKD3i0bG9z9rKAUMizjRQlvmMo4rLkOKljioUFZn3wm0xVYTX/kXVOvq 4FlA== X-Gm-Message-State: AGi0PuYWUDP7nCyo/JzMON9dFiySHddJrDbvnaBxYQC1YTgjDyYl/sY1 bKa22IXCzZQxy2lylDmh0AoiEARsX4kO X-Received: by 2002:adf:ed4a:: with SMTP id u10mr9412066wro.399.1585929958228; Fri, 03 Apr 2020 09:05:58 -0700 (PDT) Received: from ninjahost.lan (host-92-23-85-227.as13285.net. [92.23.85.227]) by smtp.gmail.com with ESMTPSA id l12sm12351426wrt.73.2020.04.03.09.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 09:05:57 -0700 (PDT) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Russell King , Bartlomiej Zolnierkiewicz , linux-arm-kernel@lists.infradead.org (moderated list:CYBERPRO FB DRIVER), dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER), linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER) Subject: [PATCH 2/5] video: Add missing annotation for cyber2000fb_enable_ddc() and cyber2000fb_disable_ddc() Date: Fri, 3 Apr 2020 17:05:02 +0100 Message-Id: <20200403160505.2832-3-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200403160505.2832-1-jbi.octave@gmail.com> References: <0/5> <20200403160505.2832-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports warnings at cyber2000fb_enable_ddc() and cyber2000fb_disable_ddc() warning: context imbalance in cyber2000fb_enable_ddc() - wrong count at exit warning: context imbalance in cyber2000fb_disable_ddc() - unexpected unlock The root cause is the missing annotation at cyber2000fb_enable_ddc() and cyber2000fb_disable_ddc() Add the missing __acquires(&cfb->reg_b0_lock) annotation Add the missing __releases(&cfb->reg_b0_lock) annotation Signed-off-by: Jules Irenge --- drivers/video/fbdev/cyber2000fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 460826a7ad55..513f58f28b0f 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1160,12 +1160,14 @@ EXPORT_SYMBOL(cyber2000fb_detach); #define DDC_SDA_IN (1 << 6) static void cyber2000fb_enable_ddc(struct cfb_info *cfb) + __acquires(&cfb->reg_b0_lock) { spin_lock(&cfb->reg_b0_lock); cyber2000fb_writew(0x1bf, 0x3ce, cfb); } static void cyber2000fb_disable_ddc(struct cfb_info *cfb) + __releases(&cfb->reg_b0_lock) { cyber2000fb_writew(0x0bf, 0x3ce, cfb); spin_unlock(&cfb->reg_b0_lock); -- 2.24.1