From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27C82C433DB for ; Tue, 12 Jan 2021 16:06:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5388221E2 for ; Tue, 12 Jan 2021 16:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392471AbhALQF6 (ORCPT ); Tue, 12 Jan 2021 11:05:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:48880 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392162AbhALQF5 (ORCPT ); Tue, 12 Jan 2021 11:05:57 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B7728AF6D; Tue, 12 Jan 2021 16:05:15 +0000 (UTC) Date: Tue, 12 Jan 2021 17:05:15 +0100 Message-ID: From: Takashi Iwai To: Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Luca Coelho Subject: Re: [PATCH 2/2] iwlwifi: dbg: Mark ucode tlv data as const In-Reply-To: <87pn2arw69.fsf@codeaurora.org> References: <20210112132449.22243-1-tiwai@suse.de> <20210112132449.22243-3-tiwai@suse.de> <87pn2arw69.fsf@codeaurora.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 12 Jan 2021 16:50:54 +0100, Kalle Valo wrote: > > Takashi Iwai writes: > > > 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 > > So this need to go to -next, right? Yes, this isn't urgently needed for 5.11. > Does this depend on patch 1 or can > this be applied independently? It depends on the first patch, otherwise you'll get the warning in the code changing the const data (it must warn -- that's the purpose of this change :) So, if applying to a separate branch is difficult, applying together for 5.11 would be an option. thanks, Takashi