-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should OP-TEE revision be printed as "string" in linux OP-TEE driver ? #7141
Comments
Yes, that will work, but we need to pass the size like (16) too in this case like below:
and how to decide on this size ? Otherwise, it is giving the following warning.
|
Casting the size argument to |
Sorry for confusion here. There is no compilation warning in case of following code:
But how we can decide if we should give the size as 8 (for 32bit arch) and 16 (for 64 bit arch) ? |
|
So it should be like this, right ?
|
No, because in the Linux (and OP-TEE) coding style, the argument of |
In that case, it should be like below ?
|
No. The if (res.result.build_id)
pr_info("revision %lu.%lu (%08lx)", res.result.major,
res.result.minor, (int)sizeof(res.result.build_id) * 2,
res.result.build_id);
else
pr_info("revision %lu.%lu", res.result.major, res.result.minor); |
Since we have moved to 16bit sha1 len for OP-TEE revision in case of 64 bit architecture.
Should we print the revision as
string
in place oflong int
hereObserved one issue on 64 bit architectures, if the commit id is starting with
0
like04d1c612ec7beaede073b8cad0f33a1f5ab9e2bc
It is printing revision as below removing leading 0.
2024-11-15T02:29:51.469317 [ 2.019585] optee: revision 4.4 (4d1c612ec7beaed)
The text was updated successfully, but these errors were encountered: