Message ID | 1515990087-11598-2-git-send-email-nicoleotsuka@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zKgHD5Qdbz9sBW for <patchwork-incoming@ozlabs.org>; Mon, 15 Jan 2018 15:24:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FbZuLiQg"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zKgHD47XvzF0XX for <patchwork-incoming@ozlabs.org>; Mon, 15 Jan 2018 15:24:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FbZuLiQg"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c01::244; helo=mail-pl0-x244.google.com; envelope-from=nicoleotsuka@gmail.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FbZuLiQg"; dkim-atps=neutral Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zKgDT6vwhzF0X9 for <linuxppc-dev@lists.ozlabs.org>; Mon, 15 Jan 2018 15:22:17 +1100 (AEDT) Received: by mail-pl0-x244.google.com with SMTP id q3so2800627plr.8 for <linuxppc-dev@lists.ozlabs.org>; Sun, 14 Jan 2018 20:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pMm8js0M3AuhPdMzRIX1JggCyxkrbFC8eqDpKkcthqs=; b=FbZuLiQgjSekEwMqPAC3Fb9jWOrilEwKPAafYryE4nnlyYgE9ae/xuLztqrZ0SzDSz Fdqmm03cTImf2LihFIAtSxIw4klc1IklnN51wo21BUDOOavWpOgYQLPUmU/9XPIj1rhk dB0ATqLOe8A1OPrRbRz44sQEE8/zTAwskX59LjJw1oK8k2SKAVDERjpeRvXqjG7p4xBY NilRIwGqMHK9WabqwY67tLh2SYIRNS5GaJBREWzRrtnxKcbmEMs+Qyg205AUu8VFxL+f diCT3EuCZ2Nm3XbE2wF4ZOZgCZ8peik+FTnaLqsYCRQb0HkQqyxfxlVihxap89OWUsFt Qb2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pMm8js0M3AuhPdMzRIX1JggCyxkrbFC8eqDpKkcthqs=; b=GDcua5vazOZlfy3nIrsS2Lus+LhB4Nt+mrhiwvgZS+hAYmnCVU2ovBopsDEHrTTJ7E yLnr3U/anwbQ/3M8DCTEivWQI9F1hBaPNznp/H1q1ohQkiAbnggbrpHfz5P/CNTx13Sx Ufsrpj78+L91EqDtTgY0dxsTr30aJsIT3UKmrfgrjjzYbzoMrDhvgDRQaOCIhFnaOgIS xsfnxwllMoKpyAsS5wXD/r5v3sIFc8HYK8RjqJLw/CSqBSljVzLjy+K2Bc7cGmMUfzNd 7T43cXguWyl1+1XGP0hxxDUEXtfXItRl6EJEbWLclf2n+Z1ls0uc8gbv4f9d1tg2CiO9 T10Q== X-Gm-Message-State: AKGB3mK4EraK4F/t/IhCZYPoglnXxzPc0Ksajg8Y8BLdIGpJM1jAfSy/ drDnV8LsyiRsoMkSKBBTBm1dMw== X-Google-Smtp-Source: ACJfBos0RomJwA77vQI+wWd0IMyI9yZXbYXGMrtFYpjsQrDXsSaT/prC7WQCqBS+vQYxZu1K+ZBQgw== X-Received: by 10.159.203.138 with SMTP id ay10mr33891141plb.105.1515990135588; Sun, 14 Jan 2018 20:22:15 -0800 (PST) Received: from Asurada-CZ80.localdomain (c-73-231-2-134.hsd1.ca.comcast.net. [73.231.2.134]) by smtp.gmail.com with ESMTPSA id v7sm17011018pgs.83.2018.01.14.20.22.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Jan 2018 20:22:15 -0800 (PST) From: Nicolin Chen <nicoleotsuka@gmail.com> To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Subject: [PATCH v3 01/17] ASoC: fsl_ssi: Redefine RX and TX macros Date: Sun, 14 Jan 2018 20:21:11 -0800 Message-Id: <1515990087-11598-2-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> References: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev/> List-Post: <mailto:linuxppc-dev@lists.ozlabs.org> List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe> Cc: alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, caleb@crome.org, lgirdwood@gmail.com, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> |
Series |
ASoC: fsl_ssi: Clean up - program flow level
|
expand
|
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index aecd00f..001e453 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -56,6 +56,10 @@ #include "fsl_ssi.h" #include "imx-pcm.h" +/* Define RX and TX to index ssi->regvals array; Can be 0 or 1 only */ +#define RX 0 +#define TX 1 + /** * FSLSSI_I2S_FORMATS: audio formats supported by the SSI * diff --git a/sound/soc/fsl/fsl_ssi.h b/sound/soc/fsl/fsl_ssi.h index de2fdc5..18f8dd5 100644 --- a/sound/soc/fsl/fsl_ssi.h +++ b/sound/soc/fsl/fsl_ssi.h @@ -12,9 +12,6 @@ #ifndef _MPC8610_I2S_H #define _MPC8610_I2S_H -#define RX 0 -#define TX 1 - /* -- SSI Register Map -- */ /* SSI Transmit Data Register 0 */
The RX and TX macros were defined implicitly and there was a potential risk if someone changes their values. Since they were defined to index the array ssi->regvals[2], this patch moves these two macros to fsl_ssi.c, closer to its owner ssi->regvals. And it also puts some comments here to limit their value within [0, 1]. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> --- sound/soc/fsl/fsl_ssi.c | 4 ++++ sound/soc/fsl/fsl_ssi.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-)