From patchwork Sat Sep 21 22:27:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 2923221 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 829CABFF05 for ; Sat, 21 Sep 2013 22:33:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4F5320439 for ; Sat, 21 Sep 2013 22:33:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1102220319 for ; Sat, 21 Sep 2013 22:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552Ab3IUW26 (ORCPT ); Sat, 21 Sep 2013 18:28:58 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:39280 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099Ab3IUW2m (ORCPT ); Sat, 21 Sep 2013 18:28:42 -0400 Received: by mail-wg0-f43.google.com with SMTP id z12so1798749wgg.10 for ; Sat, 21 Sep 2013 15:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3X+Bu6QBgp48I8YmmdI5FC7jULRjUcGTBm+/UgPSclI=; b=uwoX3YB3vSjwcirsY1HDLeyyv0eOBguKS+kYSvUa4ijCruyoeET53aiIgKf5v4g6t4 o3f0Lz+O7t3so7s3k7Ww7ZDJVrGCDGAgjixmwR4MwtxaeRqvaGxzSasUxJNUtuCYo0ou FiE4EXuhn8JiB2gnPMFSvgwXo+saoE0k+H5AthwnoX8xTa8x8Mu3RkhqpJ1zGKjdGP7K tKuIHJHaNSa50rt24GgDW1Q7+FzAg0tcP2BQCOZjU0SvfwmovOwSirLe6Slh+zfaSEj5 hAsnZ8HKT8tpilwu3V7/ZRYijKS9UHgZYk7QAydgJh2YJBC07CSrJZ1IODRPvdksbeUf vSew== X-Received: by 10.180.90.19 with SMTP id bs19mr7661909wib.15.1379802520971; Sat, 21 Sep 2013 15:28:40 -0700 (PDT) Received: from notepeter.home (210-232.80-90.static-ip.oleane.fr. [90.80.232.210]) by mx.google.com with ESMTPSA id iz19sm14891990wic.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 21 Sep 2013 15:28:40 -0700 (PDT) From: Peter Senna Tschudin To: m.chehab@samsung.com Cc: sakari.ailus@iki.fi, hans.verkuil@cisco.com, peter.senna@gmail.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 06/19] media: Change variable type to bool Date: Sun, 22 Sep 2013 00:27:38 +0200 Message-Id: <1379802471-30252-6-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> References: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable frame_ready is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin --- This fails at checkpatch due initializing static variable to false. I haven't changed the assignment. drivers/media/usb/cpia2/cpia2_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c index be17192..351a78a 100644 --- a/drivers/media/usb/cpia2/cpia2_usb.c +++ b/drivers/media/usb/cpia2/cpia2_usb.c @@ -209,7 +209,7 @@ static void cpia2_usb_complete(struct urb *urb) { int i; unsigned char *cdata; - static int frame_ready = false; + static bool frame_ready = false; struct camera_data *cam = (struct camera_data *) urb->context; if (urb->status!=0) {