From patchwork Tue Jan 13 14:09:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5620721 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 25ED19F3A0 for ; Tue, 13 Jan 2015 14:09:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EBC1203DF for ; Tue, 13 Jan 2015 14:09:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5B553203DC for ; Tue, 13 Jan 2015 14:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138AbbAMOJJ (ORCPT ); Tue, 13 Jan 2015 09:09:09 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:56169 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbbAMOJI (ORCPT ); Tue, 13 Jan 2015 09:09:08 -0500 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0M3fC1-1XtMkD0FMn-00rDA5; Tue, 13 Jan 2015 15:09:04 +0100 From: Arnd Bergmann To: Chris Mason Cc: Miao Xie , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Btrfs: avoid build warning on 32-bit Date: Tue, 13 Jan 2015 15:09:03 +0100 Message-ID: <4264141.3m7C7LgF5c@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:4n7VGceHa7gL6OAQxH79RDJxALgATUjpRoEU6Z17iTpqzMAHrkz AlIVb7Tg+3E3/gNg3VA37ezcdc5x+BIEkyQf/UoIwbtboPvhD1vH6huDtR7DiIsfRxtF/9e wk+tCF83R4rRCIEowRqZ2CJy+CU1vbloV82r045rfG0/f7xNNyaq2nDqqodyXayk27hPBxK 1KWcjtnhWCVhOyKvaZqUQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 A recent change introduced a type cast from a private 64-bit value to a pointer, which works fine on 64-bit architectures, but not on 32-bit ones, where it produces a harmless compiler warning: fs/btrfs/extent_io.c: In function 'btrfs_free_io_failure_record': fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] This adds an intermediate cast to 'unsigned long', which tells the compiler to ignore the type mismatch. Signed-off-by: Arnd Bergmann Fixes: f612496bca664 ("Btrfs: cleanup the read failure record after write or when the inode is freeing") --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" 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/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4ebabd237153..790dbae3343c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2190,7 +2190,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end) next = next_state(state); - failrec = (struct io_failure_record *)state->private; + failrec = (struct io_failure_record *)(unsigned long)state->private; free_extent_state(state); kfree(failrec);