From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B249E745D5 for ; Mon, 15 Apr 2024 14:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713190765; cv=none; b=Vrs/Yur+ffaQmAMN2GGWAjlm7GwpW1e8Q47cDxqnMVOMt3I6FAkqBhIxwwdqQRXGx+5RkNej++IKMriU1Z/brR+sNNIBq2n3y5SAIGiXxk7xwBrBZbwVZpbgOfhKv51v2u1NxFnXrqtjIEX/9Cs1+OPU87NdsBB7yFpQy4eNq34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713190765; c=relaxed/simple; bh=WU5KDltuTt9aQCPYXF9+eq8jRI7Tg8SGbP0xqq6dmYs=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=KlAFA/sll742PK4ekbpHHURnUsgC2bJjP699ZRQUzUaT89nfUEiyMNnu84C5HwSoYbMWC/ptJE8SfwW1rbZImIB3B7lrYuckZHA+SmBQGEJgqaguHiAE3GX7cxY1fAgxL3tYZexgMRzM/X75WeKgdX+Nc7gpQZBR0HxRvHpNsCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=I9G6dTMk; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="I9G6dTMk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713190763; x=1744726763; h=message-id:date:mime-version:from:subject:to:cc: references:in-reply-to:content-transfer-encoding; bh=WU5KDltuTt9aQCPYXF9+eq8jRI7Tg8SGbP0xqq6dmYs=; b=I9G6dTMkSZCwWMKZq1UbQS5rcThRTeX6e1U56iYK0+SQG842MO5DM/B0 RGE5+9R2kqzK0Xxu5zS4XIzVE3DEHyLBuyqUxXpBF+8QEKcbsdkjI20SE z5URpM8cMfwvucZ5wT28gIdnc89h2nZCHhIDg9eG6R7dzeMkIghZAFEJx VtVLeKA83efxgkDbjQWqorLbGkHV0vPbHWrFQarRovNpef2JUVfIbg4re pG1aadXCeAcmXDuJHlprAzPq+NR9oPJGLo9PT2Lxx5Vsjgm4QpxRRyXl7 vJxw5KiW/j0nHaztG8recoSxZ68ZziXqxU3wWjufcNAZxnKU4sMxR3k1x g==; X-CSE-ConnectionGUID: ajvpljXFRhKMWdv0olmOdA== X-CSE-MsgGUID: XXXro+PsR9qCQWEBO729mw== X-IronPort-AV: E=McAfee;i="6600,9927,11045"; a="8443594" X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="8443594" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 07:19:23 -0700 X-CSE-ConnectionGUID: 1TdWzhgfSOmUQ40OtUKQlA== X-CSE-MsgGUID: dlzDrL9kQtGH1m7YQEahRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="26347149" Received: from sadhupha-mobl.amr.corp.intel.com (HELO [10.212.11.252]) ([10.212.11.252]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 07:19:22 -0700 Message-ID: <89f8f0be-2534-46c8-9058-cabea4f68568@linux.intel.com> Date: Mon, 15 Apr 2024 09:19:21 -0500 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Pierre-Louis Bossart Subject: Re: [PATCH 00/14] ASoC: Constify local snd_sof_dsp_ops To: Krzysztof Kozlowski , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> Content-Language: en-US In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > The core code does not modify the 'struct snd_sof_dsp_ops' passed via > pointer in various places, so this can be made pointer to const. The structure itself is NOT always const - the initialization itself does have platform-specific changes, so what do we really gain from all this? some commit messages say the code is "a bit safer", but I personally find the 'const' more confusing since the information that the structure can be modified during initialization is lost. 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70122C4345F for ; Mon, 15 Apr 2024 14:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nROnsghVd3UgtR4KkAcvEDx5/rGpgOJfQ3cImvDVKJQ=; b=DsP5wzq5CW3soE heq2Pyc9cXPQJ3ARGy23TvBE0LI9boGaQF5F/6U/EZx2E2vqueBbzRpzskDlB9iZlyHYR4hm+fcHc KoDWQqo/wryI58BiXh0k+6w/SHG3j+TfkILEqXTI8ltum/x/EEcIIW0yyXpuqpPgN2a54rYiQI7J3 r29HGP4WlgZZU/us7nQwutv5i6vhqQikeo6Na1CZPsyS9yimctPPwbLjvvLKJWlRjrZdwQNt7sc+M curNXdRWmBCgMnVm1iefCyeBTuSIBOLvqqeFAtuK6sbK7UzhwQQR2LS+wfAqxQ0grfHrFowQYkLFT fhxAQyHsccqjHSwwj7wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwNBC-00000008f10-1lGz; Mon, 15 Apr 2024 14:19:30 +0000 Received: from mgamail.intel.com ([192.198.163.19]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwNB5-00000008eys-3q9M; Mon, 15 Apr 2024 14:19:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713190764; x=1744726764; h=message-id:date:mime-version:from:subject:to:cc: references:in-reply-to:content-transfer-encoding; bh=WU5KDltuTt9aQCPYXF9+eq8jRI7Tg8SGbP0xqq6dmYs=; b=UPyvIXQv2uyO0JtWYH+26IxxIcf4Ctq7gYkDCF1/iJQs9TLoCKZKLeqP i1PPgExp/ZEXDY8sXOBqzKa2ZlfLfTrBykhqYZZzxDINBB+/txIhxIDx1 3lKwvl8I1FmlGQuk5nSIJ8eW5odQ14H/sqIxR7ZdnUKMczLSnEJn3VPw2 H/AVnGn8yV9c+6uwrMUJkbSgJZysLKrE6UVFNfWApHAOL9HfHejqmwMTU LCYCjkuiRzo86NncDuobJDbI8T4yVxRwt6Ewn4C5AnnoDVsMZ5DjHziPH SYKWy6JiAdNLaiXQyrVg2Ar19B+M5JUHBQHGYZ0sZnFyGj9HrMqk+XF6r Q==; X-CSE-ConnectionGUID: o/M9Q08FTEqtrGOBh8aQ6A== X-CSE-MsgGUID: z+DJc8ZJQUOHirQwjGSE2g== X-IronPort-AV: E=McAfee;i="6600,9927,11045"; a="8443595" X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="8443595" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 07:19:23 -0700 X-CSE-ConnectionGUID: 1TdWzhgfSOmUQ40OtUKQlA== X-CSE-MsgGUID: dlzDrL9kQtGH1m7YQEahRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,203,1708416000"; d="scan'208";a="26347149" Received: from sadhupha-mobl.amr.corp.intel.com (HELO [10.212.11.252]) ([10.212.11.252]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 07:19:22 -0700 Message-ID: <89f8f0be-2534-46c8-9058-cabea4f68568@linux.intel.com> Date: Mon, 15 Apr 2024 09:19:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Pierre-Louis Bossart Subject: Re: [PATCH 00/14] ASoC: Constify local snd_sof_dsp_ops To: Krzysztof Kozlowski , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> Content-Language: en-US In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240415_071924_004297_64DEED82 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > The core code does not modify the 'struct snd_sof_dsp_ops' passed via > pointer in various places, so this can be made pointer to const. The structure itself is NOT always const - the initialization itself does have platform-specific changes, so what do we really gain from all this? some commit messages say the code is "a bit safer", but I personally find the 'const' more confusing since the information that the structure can be modified during initialization is lost. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel