From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbbCOJyd (ORCPT ); Sun, 15 Mar 2015 05:54:33 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:59371 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbbCOJyc (ORCPT ); Sun, 15 Mar 2015 05:54:32 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=aVuRYB9jFzFsbHnyIO6WTXMsFsysg296qeRS+2aVNsk= c=1 sm=2 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=CY4gh59bFvxPIIA0mQcA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ACDgBYVgVV/5egQ1dbgwaBLLEEBQMBAQEFAXaMD4t1gRZNAQEBAQEBfYQ9LyOBGjeIMwHJUoYKiRpkHYQXBZogiySIcCOBRQGCKT0xgQKBQQEBAQ From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Jan Kara , Fabian Frederick Subject: [PATCH 1/1 linux-next] udf: use int for allocated blocks instead of sector_t Date: Sun, 15 Mar 2015 10:54:23 +0100 Message-Id: <1426413263-3466-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following warnings: fs/udf/balloc.c:768:15: warning: conversion to 'sector_t' from 'int' may change the sign of the result [-Wsign-conversion] allocated = udf_bitmap_prealloc_blocks(sb, ^ fs/udf/balloc.c:773:15: warning: conversion to 'sector_t' from 'int' may change the sign of the result [-Wsign-conversion] allocated = udf_table_prealloc_blocks(sb, ^ fs/udf/balloc.c:778:15: warning: conversion to 'sector_t' from 'int' may change the sign of the result [-Wsign-conversion] allocated = udf_bitmap_prealloc_blocks(sb, ^ fs/udf/balloc.c:783:15: warning: conversion to 'sector_t' from 'int' may change the sign of the result [-Wsign-conversion] allocated = udf_table_prealloc_blocks(sb, ^ fs/udf/balloc.c:791:26: warning: conversion to 'loff_t' from 'sector_t' may change the sign of the result [-Wsign-conversion] inode_add_bytes(inode, allocated << sb->s_blocksize_bits); ^ fs/udf/balloc.c:792:2: warning: conversion to 'int' from 'sector_t' may alter its value [-Wconversion] return allocated; Suggested-by: Jan Kara Signed-off-by: Fabian Frederick --- fs/udf/balloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index 1ba2baa..75d5f421 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c @@ -762,7 +762,7 @@ inline int udf_prealloc_blocks(struct super_block *sb, uint32_t block_count) { struct udf_part_map *map = &UDF_SB(sb)->s_partmaps[partition]; - sector_t allocated; + int allocated; if (map->s_partition_flags & UDF_PART_FLAG_UNALLOC_BITMAP) allocated = udf_bitmap_prealloc_blocks(sb, -- 1.9.1