From patchwork Wed Apr 17 07:20:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 2452631 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A5C713FC64 for ; Wed, 17 Apr 2013 07:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758171Ab3DQHUv (ORCPT ); Wed, 17 Apr 2013 03:20:51 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:29771 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757591Ab3DQHUu (ORCPT ); Wed, 17 Apr 2013 03:20:50 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r3H7Klfr018696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 07:20:48 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3H7Kklc019329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 17 Apr 2013 07:20:46 GMT Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3H7KjO6017472; Wed, 17 Apr 2013 07:20:45 GMT Received: from elgon.mountain (/197.237.137.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Apr 2013 00:20:45 -0700 Date: Wed, 17 Apr 2013 10:20:30 +0300 From: Dan Carpenter To: Hans Verkuil Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] go7007: dubious one-bit signed bitfields Message-ID: <20130417072029.GF7923@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Because they're signed, "is_video" and "is_audio" can be 0 and -1 instead of 0 and 1 as intended. It doesn't cause a bug, but it makes Sparse complain: drivers/staging/media/go7007/go7007-priv.h:94:31: error: dubious one-bit signed bitfield drivers/staging/media/go7007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield Signed-off-by: Dan Carpenter Acked-by: Hans Verkuil --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index 8bde187..6e16af7 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/staging/media/go7007/go7007-priv.h @@ -91,8 +91,8 @@ struct go7007_board_info { int num_i2c_devs; struct go_i2c { const char *type; - int is_video:1; - int is_audio:1; + unsigned int is_video:1; + unsigned int is_audio:1; int addr; u32 flags; } i2c_devs[5];