From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B0DDC2D0EC for ; Tue, 7 Apr 2020 19:48:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B4F720748 for ; Tue, 7 Apr 2020 19:48:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B4F720748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA0136E8F3; Tue, 7 Apr 2020 19:48:30 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id D95096E8F3 for ; Tue, 7 Apr 2020 19:48:28 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 0EAE380533; Tue, 7 Apr 2020 21:48:26 +0200 (CEST) Date: Tue, 7 Apr 2020 21:48:24 +0200 From: Sam Ravnborg To: Jules Irenge Subject: Re: [PATCH 2/5] video: Add missing annotation for cyber2000fb_enable_ddc() and cyber2000fb_disable_ddc() Message-ID: <20200407194824.GA28801@ravnborg.org> References: <0/5> <20200403160505.2832-1-jbi.octave@gmail.com> <20200403160505.2832-3-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200403160505.2832-3-jbi.octave@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=XpTUx2N9 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=c_KzuGgbJLCNkQNsKyQA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:FRAMEBUFFER LAYER" , Bartlomiej Zolnierkiewicz , boqun.feng@gmail.com, Russell King , "open list:FRAMEBUFFER LAYER" , linux-kernel@vger.kernel.org, "moderated list:CYBERPRO FB DRIVER" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Jules. On Fri, Apr 03, 2020 at 05:05:02PM +0100, Jules Irenge wrote: > 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 Thanks, added to drm-misc-next, so the patch will hit the kernel when the merge windows opens the next time. Was this the only locking relevant warning in fbdev? I would expect a few more. Sam > --- > 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 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel