Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1590319lqt; Wed, 20 Mar 2024 08:21:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnZPIYxrhaE2Q7XbcMg+aXhJE2yHdr9mFeyx5a3f4DajB6R8/YDOKTg3xv3Zm+3BNDozDwaj3ONgyTw8/7dAQAsqBgA3qdg+VtBpFKUA== X-Google-Smtp-Source: AGHT+IGDaKdPJuIUv4Do0buh7/IK4D4LAKXpCJZNUWEHa5INc6EYr2Aca+x71RpUcBC4af91g47X X-Received: by 2002:a17:902:8f81:b0:1e0:2995:c330 with SMTP id z1-20020a1709028f8100b001e02995c330mr2161316plo.63.1710948104639; Wed, 20 Mar 2024 08:21:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710948104; cv=pass; d=google.com; s=arc-20160816; b=N2hRH/yiIgWI2L4CJRXjBLY4WanG5CbQlJu042eZVk+Ppp4uMoMn7usPy6vyBG2S1n 6Xrl/hdZJ9s/8eAEBC+3O3d3HZ0v7IVG5BXFO7Hr6f+NG2e58bmoBisggCRFTgJQzX9k BHbqFrBtsOIoLahnKFPYHKq6F6OdjqQAjC5FZyqS2HaOinbR2BAKmolvMfipBV0yXpqs tKGcEKT/U2LXlSgZoiPy/+BBJMtSPnrfD+Jo5D49xaWNyk7ZbOy4B0YVwz3GTJC02WdD X3HeK+mH1ywaA93p9SrTTaYbV3NtNEAm9GEr50aOvpzXiVgMj7mGLci6L0fkJnORhT4Q z+5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P0pXJnk2JDtH0exrgfHBBps3kdUOp/IIQIe6R2qmbEc=; fh=nHjHPaBIBzXi5legwNuq2VxGq/Ervfyymz+Ysg0BCQM=; b=v3ws99v2F6SQsL85n6BoC7RB9uCPsKkfwHiIqoea/a/+6L9MpvHI3IZ9mvPFHgQ2nR Vk2oWKcOc9EmpDJJpnsmXvzvfDFS0PLzqQNhLADysr/+14UUmilUqslL4kF2YE8dSP9s SiqzvHIampqo/8ZKpU2RRIbTecBnjAT0DKqpfov20U+6VVkhqseSJUrCD798/EnfEOes XeOuO3OgBDnoK0tJt3xAT8MM92m4wNmzLfZLl8ocLwtLLeYvCCU6M9vP2wqdqulkF56T yx06Cv1ZeNLnVJgbTMrN0tWLYHX7vdKdMjOeD4YtZfzIFOc0FlEQAI3wYhOk+I1RQhdr lMRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VzZyDMRT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b18-20020a170902e95200b001e00879706asi8505982pll.473.2024.03.20.08.21.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 08:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VzZyDMRT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-109081-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 46907284381 for ; Wed, 20 Mar 2024 15:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D314554BCC; Wed, 20 Mar 2024 15:21:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VzZyDMRT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F23AF5472A; Wed, 20 Mar 2024 15:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710948066; cv=none; b=PU/iN63w+mXraQ/bDFGk7HkxGHFw8rBbZf8ALMApQOxefzdXWwNHt91MQwT+X8gB3toiNIf4CeL4XddpEXLaDkrqLjzNGfYVkXEpvPF6sEPvr68jZ9TysSKgq3MjY5qe6wpURVPzn5dW9QJ/eQ6TNE5uiAIaddLvt6XVj9t7sqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710948066; c=relaxed/simple; bh=1tGig6cMdiKntUIQI2Cqx4/KYJV/11C4ppZ+rg59blM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jiyT6iRBbmwDRgZI3ZFcLjP1JTm73ylZgJVlxNDKrX/m/NAHSsUFGmGiaB+wXjij60UtfN9MBDObrKN0wrYiJ6zKZQuvm68ppPcc4cXEBcd+SierN6XRCaj3VyS1ythZa8aOppvMF2qE2ZPy844Jlncsrq0QJk80TJjo1hCH2wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VzZyDMRT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE3B8C433C7; Wed, 20 Mar 2024 15:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710948065; bh=1tGig6cMdiKntUIQI2Cqx4/KYJV/11C4ppZ+rg59blM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VzZyDMRTD6tiu8t50ps7WpB9F2ZgXz9wsf3Z1pWLWaVhFhGl+tOTmDDwtVpMdx6XX jdYCKWoHwCZs9loN8cbi5K/+hop+jJQEQE0nhUFuYwTKUTfLff35CoTNr4JzN+IS9/ niFqFBP7OI8c8pCVAD4iUwsZemY4TlJOnNuuC+BrBui+8Bw2gN1CyKYoMqwny/a1YO V1PVogkpeRKB+CDSbTxg6VXRWUFwf++QeHvGRhLWFiEgy/30AlaGi8VmMkWZDeeHcb sueTSFUU78dR6iZInmbbdCebwwDxztEp19M1OzmsXGbSQr++TLM5tbGRXWLYccx3bm S3NNG6oHJoyPA== Date: Wed, 20 Mar 2024 15:21:00 +0000 From: Mark Brown To: Pierre-Louis Bossart Cc: Xingyu Wu , Liam Girdwood , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: Re: [PATCH v2 2/2] ASoC: cdns: Add drivers of Cadence Multi-Channel I2S Controller Message-ID: References: <20240320090239.168743-1-xingyu.wu@starfivetech.com> <20240320090239.168743-3-xingyu.wu@starfivetech.com> <1d0399d2-684f-490e-8711-f636e987a0b8@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V7Pu1AxS8JZcWuN0" Content-Disposition: inline In-Reply-To: <1d0399d2-684f-490e-8711-f636e987a0b8@linux.intel.com> X-Cookie: Androphobia: --V7Pu1AxS8JZcWuN0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 20, 2024 at 10:00:24AM -0500, Pierre-Louis Bossart wrote: > > + for (i = 0; i < CDNS_I2S_FIFO_DEPTH; i++) { > > + if (format == SNDRV_PCM_FORMAT_S16_LE) { > > + data[0] = p16[tx_ptr][0]; > > + data[1] = p16[tx_ptr][1]; > > + } else if (format == SNDRV_PCM_FORMAT_S32_LE) { > > + data[0] = p32[tx_ptr][0]; > > + data[1] = p32[tx_ptr][1]; > > + } > what about other formats implied by the use of 'else if' ? In general things like this should be written as switch statements. --V7Pu1AxS8JZcWuN0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmX6/tsACgkQJNaLcl1U h9BupQf/TIN+i7DTxIw1TfTwOUo18dvWHR8fAtRPMkNvvTXlDI+sAFwhdGomSgtj 7gHyw1/ZmMWHeGC6CffzXKwU4g3z/HyEidwFO6s2LdVxEvl2t8wE0Xo+c5Sgy9G/ iOdGpcwiRCqHh53rhK1UWdIP+paItr1ghPq6ySCASwQZFtvH7CMX4GWbNOEysO1V 6oQcPRwNkQ0k18dVdhsid+PvdPckEJVJGH8+H/YXeR/macDHMiyAJJEdTajQwAuX iptwgUav7/bLABLR08oqMAaaczvDQgrhm0gRMdLqZQbgeTeq6Liap+HE039e3W9V LUtcRjsLp6oOIB79EuRycmDey0JzUQ== =f9S8 -----END PGP SIGNATURE----- --V7Pu1AxS8JZcWuN0--