Messages in this thread | | | From | Takashi Sakamoto <> | Subject | [PATCH 0/8] firewire: core/ohci: add inline helper functions to serialize/deserialize header of asynchronous packet | Date | Sun, 28 Apr 2024 16:13:38 +0900 |
| |
Hi,
Between core and 1394 ohci driver modules, the data of 'struct fw_packet' is utilized to deliver data of asynchronous packet. Especially, its 'header' array member is for the parameters of packet. However, the serialization/deserialization are done by local hard-coded macro in each module. It is inconvenient.
This series of changes adds some inline helper functions to replace them. A KUnit test is also added to check them.
Takashi Sakamoto (8): firewire: core: add common inline functions to serialize/deserialize asynchronous packet header firewire: core: replace local macros with common inline functions for asynchronous packet header firewire: ohci: replace local macros with common inline functions for asynchronous packet header firewire: ohci: replace hard-coded values with inline functions for asynchronous packet header firewire: ohci: replace hard-coded values with common macros firewire: core: obsolete tcode check macros with inline functions firewire: core: add common macro to serialize/deserialize isochronous packet header firewire: core: replace local macros with common inline functions for isochronous packet header
drivers/firewire/.kunitconfig | 1 + drivers/firewire/Kconfig | 16 + drivers/firewire/Makefile | 3 + drivers/firewire/core-transaction.c | 152 ++--- drivers/firewire/core.h | 21 +- drivers/firewire/ohci.c | 78 +-- drivers/firewire/packet-header-definitions.h | 234 ++++++++ drivers/firewire/packet-serdes-test.c | 582 +++++++++++++++++++ 8 files changed, 952 insertions(+), 135 deletions(-) create mode 100644 drivers/firewire/packet-header-definitions.h create mode 100644 drivers/firewire/packet-serdes-test.c
-- 2.43.0
| |