msm: kgsl: Correctly update fence_name for larger timestamp

Since 'timestamp' is of unsigned int type, for larger timestamp
the format specifier %d can show negative values. Fix this by
using %u format specifier for timestamp.

Change-Id: I621dfd4843099cb27436006500fe3342d1d5ddf4
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
This commit is contained in:
Abhilash Kumar 2017-08-08 11:27:10 +05:30 committed by Gerrit - the friendly Code Review server
parent 603df3f744
commit a9d6b142e1

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -179,7 +179,7 @@ int kgsl_add_fence_event(struct kgsl_device *device,
goto out;
}
snprintf(fence_name, sizeof(fence_name),
"%s-pid-%d-ctx-%d-ts-%d",
"%s-pid-%d-ctx-%d-ts-%u",
device->name, current->group_leader->pid,
context_id, timestamp);