From patchwork Sun May 6 15:47:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10382869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B08636037F for ; Sun, 6 May 2018 15:48:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A04002787C for ; Sun, 6 May 2018 15:48:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 951FB28738; Sun, 6 May 2018 15:48:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C558E2787C for ; Sun, 6 May 2018 15:48:16 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C432E267628; Sun, 6 May 2018 17:48:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E9A9A26734C; Sun, 6 May 2018 17:47:56 +0200 (CEST) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by alsa0.perex.cz (Postfix) with ESMTP id 22751267345 for ; Sun, 6 May 2018 17:47:54 +0200 (CEST) Received: by mail-qt0-f194.google.com with SMTP id q6-v6so33318426qtn.3 for ; Sun, 06 May 2018 08:47:54 -0700 (PDT) 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=Ob3dNGByPQA8O9/m9PmZCZFpwR98QwYZmzCQ/6NvO9g=; b=MxhYk/2IvsQPD2xjORq6lpsezT94bK4vQHbLHORYPIPDNhQd+wLYW1wF8pjA+k27Ql OYlMPrXkvUZsPQBCWg9sL2rkzzbXogvCKTByDspAlunM+zqTZcJiZ4nkS1m9Ylle1ITD DEeqlrzIBcBK4M4CZaInhftzWEYhTxGH5+4yBfqOIGpDdcDNVXNOi7G7qeZTeyseHQBE GBGnok7SVMRv4HkcVfbrf4XquXeqD1UP8/RpsFH/CPlOQXV5kXEnRPyMeECzeebg2Kh7 qs1hMWKbEITmFuzOsYxwFGLy+gkgVbstrLDnV084cr6OLCulwkCG9t8ahDBkVkBVtNH6 y+WQ== 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=Ob3dNGByPQA8O9/m9PmZCZFpwR98QwYZmzCQ/6NvO9g=; b=JUHg5b6HjhKgPRoxTZe1mEbACZu+Twgfgipj+/tTnCvQf+pVlC0UmTL2vkanKVrmKd 4mpPt+TxuXMTqz8AptYcRop9CtTiuynzOyCIxgVlYOC+Vrj2P8jRKH8yL974C7B3X8Tx rEou2VolWV4JQOCIYdiOtprC+rQndFHMagCcK7JtFFLxRys6V4E06FrftIdw0Joev3v2 zMHP5rw8gTDxiolWouMKjAfWRNq4589e5/y2y6+2aL7cRbt5vIeUNQDdwviOwlWyOA2o +UMG6GSfD7UbdnvZpUXZ/0M5/jYbdMc+stog8B71qE/ZWL1O8mq9ZNbR05s0PChNUOic 8DnA== X-Gm-Message-State: ALQs6tD+IJIyr37CxrUBD17fBd43eS6SbvbNPb6Iob5USKmnpXrswPvA P6GX9iic7o4YpUxzDDKl1nw= X-Google-Smtp-Source: AB8JxZp8Q9AEXSIAhAO3yVoPSmnrDq8pzcODaYQogILkNG30oQljp3U0NmDEztHmIqlJm1X0beXhdg== X-Received: by 2002:a0c:bd25:: with SMTP id m37-v6mr30624925qvg.209.1525621674025; Sun, 06 May 2018 08:47:54 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:90ae:4c9c:cde4:b11c:33c2:be38]) by smtp.gmail.com with ESMTPSA id 135sm16180309qkf.26.2018.05.06.08.47.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 May 2018 08:47:53 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sun, 6 May 2018 12:47:45 -0300 Message-Id: <1525621665-11022-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525621665-11022-1-git-send-email-festevam@gmail.com> References: <1525621665-11022-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 3/3] ASoC: omap-pcm: Use 'snd_pcm_format_t' type X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam 'snd_pcm_format_t' type is better suited for iterating through the SNDRV_PCM_FORMAT members. Also, use SNDRV_PCM_FORMAT_FIRST for the first element. Signed-off-by: Fabio Estevam --- sound/soc/omap/omap-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 778cc8f..d1b07e4 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -56,9 +56,9 @@ static struct snd_pcm_hardware omap_pcm_hardware = { /* sDMA supports only 1, 2, and 4 byte transfer elements. */ static void omap_pcm_limit_supported_formats(void) { - int i; + snd_pcm_format_t i; - for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) { + for (i = SNDRV_PCM_FORMAT_FIRST; i <= SNDRV_PCM_FORMAT_LAST; i++) { switch (snd_pcm_format_physical_width(i)) { case 8: case 16: