Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1333359 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2016-02-13 21:30 +0100 |
| Last post | 2016-02-15 20:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] xfs: fix format specifier , should be %llx and not %llu Colin King <colin.king@canonical.com> - 2016-02-13 21:30 +0100
Re: [PATCH] xfs: fix format specifier , should be %llx and not %llu Brian Foster <bfoster@redhat.com> - 2016-02-15 20:00 +0100
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2016-02-13 21:30 +0100 |
| Subject | [PATCH] xfs: fix format specifier , should be %llx and not %llu |
| Message-ID | <r1OZk-1dF-7@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
busyp->bno is printed with a %llu format specifier when the
intention is to print a hexadecimal value. Trivial fix to
use %llx instead. Found with smatch static analysis:
fs/xfs/xfs_discard.c:229 xfs_discard_extents() warn: '0x'
prefix is confusing together with '%llu' specifier
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/xfs/xfs_discard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index e85a951..272c3f8 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -227,7 +227,7 @@ xfs_discard_extents(
GFP_NOFS, 0);
if (error && error != -EOPNOTSUPP) {
xfs_info(mp,
- "discard failed for extent [0x%llu,%u], error %d",
+ "discard failed for extent [0x%llx,%u], error %d",
(unsigned long long)busyp->bno,
busyp->length,
error);
--
2.7.0
[toc] | [next] | [standalone]
| From | Brian Foster <bfoster@redhat.com> |
|---|---|
| Date | 2016-02-15 20:00 +0100 |
| Message-ID | <r2wxl-505-33@gated-at.bofh.it> |
| In reply to | #1333359 |
On Sat, Feb 13, 2016 at 08:26:22PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> busyp->bno is printed with a %llu format specifier when the
> intention is to print a hexadecimal value. Trivial fix to
> use %llx instead. Found with smatch static analysis:
>
> fs/xfs/xfs_discard.c:229 xfs_discard_extents() warn: '0x'
> prefix is confusing together with '%llu' specifier
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
> fs/xfs/xfs_discard.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
> index e85a951..272c3f8 100644
> --- a/fs/xfs/xfs_discard.c
> +++ b/fs/xfs/xfs_discard.c
> @@ -227,7 +227,7 @@ xfs_discard_extents(
> GFP_NOFS, 0);
> if (error && error != -EOPNOTSUPP) {
> xfs_info(mp,
> - "discard failed for extent [0x%llu,%u], error %d",
> + "discard failed for extent [0x%llx,%u], error %d",
> (unsigned long long)busyp->bno,
> busyp->length,
> error);
> --
> 2.7.0
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web