lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150316072433.GA4934@quack.suse.cz>
Date:	Mon, 16 Mar 2015 08:24:33 +0100
From:	Jan Kara <jack@...e.cz>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel@...r.kernel.org, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH 1/1 linux-next] udf: use int for allocated blocks instead
 of sector_t

On Sun 15-03-15 10:54:23, Fabian Frederick wrote:
> 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 <jack@...e.cz>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
  Thanks. Applied to my tree.

								Honza

> ---
>  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
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ