Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp195464pxk; Thu, 24 Sep 2020 03:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcvdRJH2SYdKoXf91QDz1VxcMGcKai5CX/WJV5cPkTbKVcvLmHhVIZHiguF4YACiSNNj2T X-Received: by 2002:a17:906:bcd5:: with SMTP id lw21mr250930ejb.430.1600942978311; Thu, 24 Sep 2020 03:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600942978; cv=none; d=google.com; s=arc-20160816; b=GiHNvTHp7gCDqd98PTBjy6HvS9TPSkF3H8kk2YajP22NMiD8F+lZyzML3B4njvhwkz fjaTJgIrILhbPKbYms0oLLCHLytoaEFis9Z3Rt9HY3uILX42KzgG7cBEnAQH18g4xXnv ZgXPVd79v8heoqwJXBPnvPVr4u6JQNkRx0GF2PRa7+VdyAjiLEj3vygcK5BkSV/ImnuD ffL+QccJeX0caffbglnlFYjDDmZkqGfkQD5BZ+Cv43AT8nuGVcpUOQP7g75f9+Xmt53l COMTthBhYyPYPOUxzbREfnIoSeAY+6R1zgh5FDc2loSEsk1TszM3OPkfh+mJ0ST41yC+ dSRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zm8OOlfP7iSN8Z5QEpTuGr8Ee4ut7XyUwrYhe0zYYtU=; b=swjba4iqJ2HzO0SwBfjGN0yd57Nn/6B7H2Uu5DpNbg3n7rp15XX+5d441kFFf45Qca ioyO4q2OV5h+y6tLzEAOirAb3VRuers3BEh8pZznhoWi7YEFAbNNCI1nUYl3SJPxFOkX EN8tbtUqCD0BgBMQmSzB+tfAhK/bm8vL9X/kZXWfCjXjP/z3YgjtjloqGGEZCB7X1Z+D 14b2MOx9C2Xgp9sQI6/OKeQICkYvFRKIOsAC9+Ievae7wjVVub35YdDdLaAqQQyEN7a3 /9hdjef2Hl/YxmWDMXxCBNHD4jQaGm2XAMDmdeVH1VY5nRSvQbzTh4kQ9ZHnhB7lPVXs g1qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fTFAprBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu3si1659049ejb.617.2020.09.24.03.22.35; Thu, 24 Sep 2020 03:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fTFAprBB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727390AbgIXKU4 (ORCPT + 99 others); Thu, 24 Sep 2020 06:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgIXKU4 (ORCPT ); Thu, 24 Sep 2020 06:20:56 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A51C0613CE for ; Thu, 24 Sep 2020 03:20:56 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id 34so1608310pgo.13 for ; Thu, 24 Sep 2020 03:20:56 -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 :mime-version:content-transfer-encoding; bh=zm8OOlfP7iSN8Z5QEpTuGr8Ee4ut7XyUwrYhe0zYYtU=; b=fTFAprBBug9rHfk2WN6RzGWwlchqNO3GsCw1+qad1ydwkFtdunbM6LjrJrcZIP+WEz U7GBnE8ywP9tqj08t44dj++6nZqDIy42Er2JpiA7E/SzSEiJCLwaPzNRhEBK0wgbTxjH Zul+rnwCDFHFX7khle3dGiEjIK56b5I+eiLCnaDtb87xAhbfb94Jy2HKAKB0kUbALGa4 kbMGPgZPv3jiYSQJ/L7gNpNPF+D8C75+xtIkbtCxePf6M+POtM5in1w3owqESCWzYaqM Z9VkeOs1hXKqNTmRjLg4Gwl4r3H1pzHAr6DHkAqy4lLtfe3OelaGw4ABmBz2Li0WirxP vt7g== 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:mime-version:content-transfer-encoding; bh=zm8OOlfP7iSN8Z5QEpTuGr8Ee4ut7XyUwrYhe0zYYtU=; b=MhhpY43wuqB+HFmiSkffxXsns2+FvS3X2RPAY5bYVvEX02T4YsQrBXNY7PtVLTEAUh 9KDL2proQxmaXmHnCg1s7gT8Sime3yFMaKyn/wpvfZW1khd5R0s7F6fjOeqaxmZcpp9c vrjyVcVZ5NWozrkXWa9cAnGYr13l4iNVfUJDhcPTYk0GygBIAi2jvK9U+rAKzRu7zr51 JOgK/kDBZx9zH0HQDTmKw0JwZSGAmxnxfZPn00OwqToVZJBfnWSRYrAI9p5AMesTdDHB XbzLGUQTeqvRRk/MUYQlRkl7gGbjRRs8qR+4vbQ+rnuTwpmPxNd/CKVlJC+l612l5+UX 40xg== X-Gm-Message-State: AOAM533Mmsoc3MPxiapGjgeGWIokld1oCcqlL1ffkUKQWIzYTIp2L1+P 0FlJK3QYiIbPZX66OwEWWWw= X-Received: by 2002:aa7:81d5:0:b029:142:2501:39fa with SMTP id c21-20020aa781d50000b0290142250139famr3950860pfn.73.1600942856051; Thu, 24 Sep 2020 03:20:56 -0700 (PDT) Received: from localhost ([2001:e42:102:1532:160:16:113:140]) by smtp.gmail.com with ESMTPSA id b2sm2505030pfp.3.2020.09.24.03.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 03:20:55 -0700 (PDT) From: Coiby Xu To: devel@driverdev.osuosl.org Cc: Vaibhav Agarwal , Mark Greer , Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmask Date: Thu, 24 Sep 2020 18:20:38 +0800 Message-Id: <20200924102039.43895-2-coiby.xu@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200924102039.43895-1-coiby.xu@gmail.com> References: <20200924102039.43895-1-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org snd_soc_pcm_stream.formats should use the bitmask SNDRV_PCM_FMTBIT_* instead of the sequential integers SNDRV_PCM_FORMAT_* as explained by commit e712bfca1ac1f63f622f87c2f33b57608f2a4d19 ("ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask"). Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_codec.c:691:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:691:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:691:36: got restricted snd_pcm_format_t [usertype] drivers/staging/greybus/audio_codec.c:701:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:701:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:701:36: got restricted snd_pcm_format_t [usertype] Signed-off-by: Coiby Xu --- drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 74538f8c5fa4..494aa823e998 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -688,7 +688,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .playback = { .stream_name = "I2S 0 Playback", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, @@ -698,7 +698,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .capture = { .stream_name = "I2S 0 Capture", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, -- 2.28.0