summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2025-06-20 15:08:07 +0200
committerJarkko Sakkinen <jarkko@kernel.org>2025-07-23 02:23:18 +0300
commit07d8004d6fb95cbe48918e56012f16454cfdfe89 (patch)
treeda6c142d871a7eaf8a006bcfd17ea2430e5b1770 /scripts/lib
parent89be9a83ccf1f88522317ce02f854f30d6115c41 (diff)
tpm: add bufsiz parameter in the .send callback
Add a new `bufsiz` parameter to the `.send` callback in `tpm_class_ops`. This parameter will allow drivers to differentiate between the actual command length to send and the total buffer size. Currently `bufsiz` is not used, but it will be used to implement devices with synchronous send() to send the command and receive the response on the same buffer. Also rename the previous parameter `len` to `cmd_len` in the declaration to make it clear that it contains the length in bytes of the command stored in the buffer. The semantics don't change and it can be used as before by drivers. This is an optimization since the drivers could get it from the header, but let's avoid duplicating code. While we are here, resolve a checkpatch warning: WARNING: Unnecessary space before function pointer arguments #66: FILE: include/linux/tpm.h:90: + int (*send) (struct tpm_chip *chip, u8 *buf, size_t bufsiz, Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Suggested-by: Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions