wifi: iwlwifi: dbg-tlv: avoid extra allocation/copy
authorJohannes Berg <johannes.berg@intel.com>
Sun, 28 Jan 2024 06:53:51 +0000 (08:53 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 2 Feb 2024 12:47:46 +0000 (13:47 +0100)
commit2f72c759fdd413bbfd8888af8e31312b34d2be33
tree72ea67daefe246bc2e9fdb34928bc48a5c9eb37d
parent8a41c017409198dd4de5a4c522cd5ae4810a5911
wifi: iwlwifi: dbg-tlv: avoid extra allocation/copy

In iwl_dbg_tlv_alloc_trigger() the code makes a copy just
to modify it and pass it to another function to make a copy
again. Change the API to return the copy so the adjustment
can be done without another copy.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240128084842.075c8b9f7030.Id5a61e1a87a9c6932727fb4e2c9b54ed6070362a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c