iwlwifi: dbg: Mark ucode tlv data as const
authorTakashi Iwai <tiwai@suse.de>
Tue, 12 Jan 2021 13:24:49 +0000 (14:24 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 11:58:15 +0000 (13:58 +0200)
commit403ea939ea6a2fc322d93de40a2babd1fe9e6a19
tree1993aa8a22c6ae0f370f32813ff1e19a4690e6d1
parent410f758529bc227b186ba0846bcc75ac0700ffb2
iwlwifi: dbg: Mark ucode tlv data as const

The ucode TLV data may be read-only and should be treated as const
pointers, but currently a few code forcibly cast to the writable
pointer unnecessarily.  This gave developers a wrong impression as if
it can be modified, resulting in crashing regressions already a couple
of times.

This patch adds the const prefix to those cast pointers, so that such
attempt can be caught more easily in future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20210112132449.22243-3-tiwai@suse.de
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h
drivers/net/wireless/intel/iwlwifi/iwl-drv.c