From patchwork Wed Aug 14 23:16:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zach Brown X-Patchwork-Id: 2844889 Return-Path: X-Original-To: patchwork-linux-btrfs@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 E9D56BF546 for ; Wed, 14 Aug 2013 23:17:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CF20206D0 for ; Wed, 14 Aug 2013 23:17:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DAD2206D4 for ; Wed, 14 Aug 2013 23:17:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933417Ab3HNXRY (ORCPT ); Wed, 14 Aug 2013 19:17:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27087 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933280Ab3HNXRV (ORCPT ); Wed, 14 Aug 2013 19:17:21 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7ENHLOs030715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Aug 2013 19:17:21 -0400 Received: from lenny.home.zabbo.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7ENHKSl017824 for ; Wed, 14 Aug 2013 19:17:20 -0400 From: Zach Brown To: linux-btrfs@vger.kernel.org Subject: [PATCH 02/15] btrfs-progs: remove __CHECKER__ from main code Date: Wed, 14 Aug 2013 16:16:32 -0700 Message-Id: <1376522205-16992-3-git-send-email-zab@redhat.com> In-Reply-To: <1376522205-16992-1-git-send-email-zab@redhat.com> References: <1376522205-16992-1-git-send-email-zab@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 __CHECKER__ is only for the type juggling used to tell sparse which types need conversion between address spaces. It is not OK to use to change the code that gets checked to avoid bugs elsewhere in the build infrastructure. We want to check the code that builds when the checker isn't enabled. Signed-off-by: Zach Brown --- btrfs-convert.c | 2 -- btrfs-list.c | 2 -- cmds-device.c | 9 --------- mkfs.c | 3 --- utils.c | 7 ------- 5 files changed, 23 deletions(-) diff --git a/btrfs-convert.c b/btrfs-convert.c index a4608ec..9a7da57 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -21,10 +21,8 @@ #include "kerncompat.h" -#ifndef __CHECKER__ #include #include -#endif #include #include #include diff --git a/btrfs-list.c b/btrfs-list.c index 072a592..214cb45 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -17,11 +17,9 @@ */ #define _GNU_SOURCE -#ifndef __CHECKER__ #include #include #include "ioctl.h" -#endif #include #include #include diff --git a/cmds-device.c b/cmds-device.c index be2aaff..48ac526 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -30,15 +30,6 @@ #include "commands.h" -/* FIXME - imported cruft, fix sparse errors and warnings */ -#ifdef __CHECKER__ -#define BLKGETSIZE64 0 -#define BTRFS_IOC_SNAP_CREATE_V2 0 -#define BTRFS_VOL_NAME_MAX 255 -struct btrfs_ioctl_vol_args { char name[BTRFS_VOL_NAME_MAX]; }; -static inline int ioctl(int fd, int define, void *arg) { return 0; } -#endif - static const char * const device_cmd_group_usage[] = { "btrfs device []", NULL diff --git a/mkfs.c b/mkfs.c index 8183879..5724dec 100644 --- a/mkfs.c +++ b/mkfs.c @@ -21,12 +21,9 @@ #include "kerncompat.h" -#ifndef __CHECKER__ #include #include #include "ioctl.h" -#endif - #include #include #include diff --git a/utils.c b/utils.c index 86ee948..e0417cb 100644 --- a/utils.c +++ b/utils.c @@ -24,10 +24,8 @@ #include #include #include -#ifndef __CHECKER__ #include #include -#endif #include #include #include @@ -50,11 +48,6 @@ #include "volumes.h" #include "ioctl.h" -#ifdef __CHECKER__ -#define BLKGETSIZE64 0 -static inline int ioctl(int fd, int define, u64 *size) { return 0; } -#endif - #ifndef BLKDISCARD #define BLKDISCARD _IO(0x12,119) #endif