Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750878AbaFVDOQ (ORCPT ); Sat, 21 Jun 2014 23:14:16 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:48044 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbaFVDOP (ORCPT ); Sat, 21 Jun 2014 23:14:15 -0400 Message-ID: <53A649FB.3090808@gmail.com> Date: Sun, 22 Jun 2014 11:14:03 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: anton@tuxera.com CC: linux-ntfs-dev@lists.sourceforge.net, "linux-kernel@vger.kernel.org" , Liqin Chen , Lennox Wu Subject: [PATCH] fs/ntfs: Use '%lx' instead of '%zx' Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For subtraction between 2 pointers, the result's type is 'long', so need use '%lx' instead of '%zx'. The related warning (allmodconfig under unicore32): CC [M] fs/ntfs/compress.o fs/ntfs/compress.c: In function 'ntfs_decompress': fs/ntfs/compress.c:207:2: warning: format '%zx' expects argument of type 'size_t', but argument 5 has type 'long int' [-Wformat=] ntfs_debug("Beginning sub-block at offset = 0x%zx in the cb.", ^ CC [M] fs/ntfs/dir.o fs/ntfs/dir.c: In function 'ntfs_readdir': fs/ntfs/dir.c:1197:3: warning: format '%zx' expects argument of type 'size_t', but argument 5 has type 'long int' [-Wformat=] ntfs_debug("In index root, offset 0x%zx.", (u8*)ie - (u8*)ir); ^ Also let the related code match linux kernel styles which is found by 'scripts/checkpatch.pl'. Signed-off-by: Chen Gang --- fs/ntfs/compress.c | 2 +- fs/ntfs/dir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index f82498c..51abeb3 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c @@ -204,7 +204,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index, ntfs_debug("Entering, cb_size = 0x%x.", cb_size); do_next_sb: - ntfs_debug("Beginning sub-block at offset = 0x%zx in the cb.", + ntfs_debug("Beginning sub-block at offset = 0x%lx in the cb.", cb - cb_start); /* * Have we reached the end of the compression block or the end of the diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 9e38daf..cf85530 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c @@ -1194,7 +1194,7 @@ static int ntfs_readdir(struct file *file, struct dir_context *actor) * or signals an error (both covered by the rc test). */ for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) { - ntfs_debug("In index root, offset 0x%zx.", (u8*)ie - (u8*)ir); + ntfs_debug("In index root, offset 0x%lx.", (u8 *)ie - (u8 *)ir); /* Bounds checks. */ if (unlikely((u8*)ie < (u8*)ir || (u8*)ie + sizeof(INDEX_ENTRY_HEADER) > index_end || -- 1.9.2.459.g68773ac -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/