From patchwork Sun Feb 18 07:41:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 13561723 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 86FCAC4829E for ; Sun, 18 Feb 2024 07:51:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B71DCA4B; Sun, 18 Feb 2024 08:51:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B71DCA4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1708242715; bh=Fu3fdtS7oQgOWe/O3MBGdeO+WH/z2+AmZDVcBf+jPJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ljxumwi3boh44ZU7T4447IdNfnj3vUiNw6wtVb7td7HYZOdjgokbzjfszPc5x29fZ EUq9omtlbHNseoM2O8QD2t3sc8pX6vfD9wKBNAmiLf8J+debwq6fzsmguXhE1PN6UT R2p4ewJs93NmvG8genKPB+xPFV4Fumm4tcijfKrA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C610EF80623; Sun, 18 Feb 2024 08:50:30 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 92FEEF805F7; Sun, 18 Feb 2024 08:50:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8C86DF804B0; Sun, 18 Feb 2024 08:44:58 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A34D0F8047D for ; Sun, 18 Feb 2024 08:41:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A34D0F8047D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.a=rsa-sha256 header.s=fm1 header.b=g0Uewg3H; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=KUXus+Sb Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5A0C15C006E; Sun, 18 Feb 2024 02:41:36 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 18 Feb 2024 02:41:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1708242096; x= 1708328496; bh=xfklvt63Cya7crTHMbBmSR2hu8vK8DoS/tjKNZFEIvM=; b=g 0Uewg3HXcfZlH9ZwKSAAT1pzO8VOOFtaUZhWAs2LTgQ/y1arIqRMlWihK9uk12Fm 0yoPw79Cr3juDccVaibeo8gf/AI9MRBcwDFIrqIjVYJTWxvtHWEHM9fHh64XY+VW WyV1xZ9bZHpqk4Z9DoOarGf6LjPPx5uoWPdueUvonco5feE0Z1NLn5lF6ESAIPCa jpdvG1tNKh97kC1WEhCaJ9W0thxYGYzDwNaawrPxJQoCuh8kr+gdYaDrDz8JhvuV hI7YdutvY1z3AaCpt8c6Fsv9DuPQLzaBH7HM0hCY2HW/SNLo5FVuQWOfQbTgkir3 +7bkXkQfddXC0eLDe/MhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708242096; x= 1708328496; bh=xfklvt63Cya7crTHMbBmSR2hu8vK8DoS/tjKNZFEIvM=; b=K UXus+SbLoj6qQzj5ePwzijntzNCUvJX+bgI591lhsyQWy9jqyamk0Q7UVTXEoEX1 RHSRFT41n3u5Ot3Py9TfaEXTS2zI8YxM+iNDNw8K5pV0xaR0rHaj+U+6Ka9bAKc1 WgqWJasjHuzEHVvTg08HXJ1ShCaRI+IXyM9Vw1/rKOTrp80TFTnnckTx2bD+Ea3R KVapqJ/EEfut9mp3DgdROacY1axeNQVsPCbKhSLHlMAfE9GK1OlPMMgyqfaIuC0X 32uFWUU3xypxw3vxyA167VOIBZL5BQcje8beLz0KgqnIP0YB43TX0dPHo8JpkRZg xHbTPS5kSI/x+ewmj6LxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 18 Feb 2024 02:41:35 -0500 (EST) From: Takashi Sakamoto To: tiwai@suse.de Cc: alsa-devel@alsa-project.org Subject: [PATCH 1/4] ALSA: oxfw: use const qualifier for immutable argument Date: Sun, 18 Feb 2024 16:41:25 +0900 Message-Id: <20240218074128.95210-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240218074128.95210-1-o-takashi@sakamocchi.jp> References: <20240218074128.95210-1-o-takashi@sakamocchi.jp> MIME-Version: 1.0 Message-ID-Hash: YGSFURXDZACTR7522TIOA5P2YSGEL4SM X-Message-ID-Hash: YGSFURXDZACTR7522TIOA5P2YSGEL4SM X-MailFrom: o-takashi@sakamocchi.jp X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In the helper function, the first argument is immutable, thus it is preferable to use const qualifier. Signed-off-by: Takashi Sakamoto --- sound/firewire/oxfw/oxfw-stream.c | 2 +- sound/firewire/oxfw/oxfw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index f4a702def397..6d8722f9d3a5 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c @@ -515,7 +515,7 @@ int snd_oxfw_stream_get_current_formation(struct snd_oxfw *oxfw, * in AV/C Stream Format Information Specification 1.1 (Apr 2005, 1394TA) * Also 'Clause 12 AM824 sequence adaption layers' in IEC 61883-6:2005 */ -int snd_oxfw_stream_parse_format(u8 *format, +int snd_oxfw_stream_parse_format(const u8 *format, struct snd_oxfw_stream_formation *formation) { unsigned int i, e, channels, type; diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index d728e451a25c..39316aeafeaa 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h @@ -136,7 +136,7 @@ struct snd_oxfw_stream_formation { unsigned int pcm; unsigned int midi; }; -int snd_oxfw_stream_parse_format(u8 *format, +int snd_oxfw_stream_parse_format(const u8 *format, struct snd_oxfw_stream_formation *formation); int snd_oxfw_stream_get_current_formation(struct snd_oxfw *oxfw, enum avc_general_plug_dir dir,