Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753012AbbHETBz (ORCPT ); Wed, 5 Aug 2015 15:01:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34911 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbbHETBx (ORCPT ); Wed, 5 Aug 2015 15:01:53 -0400 Date: Wed, 5 Aug 2015 12:01:53 -0700 From: Greg KH To: Peng Fan Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: sm750fb: fix sparse warning for lock Message-ID: <20150805190153.GB2856@kroah.com> References: <1438781204-13283-1-git-send-email-van.freenix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438781204-13283-1-git-send-email-van.freenix@gmail.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1584 Lines: 36 On Wed, Aug 05, 2015 at 09:26:44PM +0800, Peng Fan wrote: > Use __acquire() and __release() in the right place to silence the sparse > lock checking warning. > > drivers/staging/sm750fb/sm750.c:177:13: warning: context imbalance in 'lynxfb_ops_fillrect' - different lock contexts for basic block > drivers/staging/sm750fb/sm750.c:243:9: warning: context imbalance in 'lynxfb_ops_copyarea' - different lock contexts for basic block > drivers/staging/sm750fb/sm750.c:247:13: warning: context imbalance in 'lynxfb_ops_imageblit' - different lock contexts for basic block > > Signed-off-by: Peng Fan > Cc: Sudip Mukherjee > Cc: Teddy Wang > Cc: Greg Kroah-Hartman > --- > drivers/staging/sm750fb/sm750.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index 8e201f1..5ba1c06 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -203,6 +203,8 @@ static void lynxfb_ops_fillrect(struct fb_info *info, > */ > if (share->dual) > spin_lock(&share->slock); > + else > + __acquire(&share->slock); That's horrid, please don't do stuff like this just to make a static checker "quiet". greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/