]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb77d4f554c3609e15ab117a7a1a6afb1b9fa39ad
tree1993aa8a22c6ae0f370f32813ff1e19a4690e6d1
parent081f9b90f6e63cedb9ba70c497c26fde08ee9bb6
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