From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55903C48BE8 for ; Tue, 15 Jun 2021 22:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 274906044F for ; Tue, 15 Jun 2021 22:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbhFOWlq (ORCPT ); Tue, 15 Jun 2021 18:41:46 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:47367 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbhFOWlp (ORCPT ); Tue, 15 Jun 2021 18:41:45 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A49B55C018B; Tue, 15 Jun 2021 18:39:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 15 Jun 2021 18:39:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=f2gn9UHXuaQi9VRk/NVthPD7rSg BJOO3nqkzPfXlP7E=; b=A++O9VvnEAsR4q74jfqdIW+6V7C44iNxSXt+XblUeR/ mygiNFBgYrFqmsal3rQ7ZwGP58LTDblE0Dt931gyIHHka/57gvok/sbA/zm5LuEl ziCTLx/7Fi39ZgX2YeHOcoR10WNaxD2wsOXmau2IoWJ6aBTgMmywVXSGDF0HFYtj lXI2bDAaZdeePZhGoS3dbhPys1Z5xtewA0KJLtLF7n+NTMyBdbnDeP3yl37CrEzh RbhNvF/q1A+246IztXcx0y3L0AeROglBa1Lc0l58OTZT5K3Huk3+nbH16umTzn91 z2iBQwXc1fcAbAFtuB9spRaL5/ifdaLPURkfv+7MI8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=f2gn9U HXuaQi9VRk/NVthPD7rSgBJOO3nqkzPfXlP7E=; b=Y4wZEyfAt9osHhIvUU46Hu p9CNxo6Yyc2mPwsk0OI5iKhOCqMNUdkIH3uLla9q9kEwlgN5M6/fD+JyHyLW0/JI NkfKGkg1hOB88FFMJ7be+rVDXRCxe8rZC8ntcQOTC0joJVKRVI9e6FyZeX5CrE8g I9SIYiyT+aqA/kfhS8KW4hvW44GoldR48qRsBfg3hLu4jAGccmY4nh2tDk/PVVif qapajDNE9X9YPaszc9hs5cXBQ8QxPE9yP6kTEf6vqS7bO7JNNfzQOAnz2z5e7bzo Tj3sBSAp5Q+pIETDBaR8cnQgD6tQwuWgaHfUnWVo6EQGONMbE+NXj04tlsgGtbqg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvkedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefvrghkrghs hhhiucfurghkrghmohhtohcuoehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjh hpqeenucggtffrrghtthgvrhhnpeelhfeugedvjefgjefgudekfedutedvtddutdeuieev tddtgeetjeekvdefgeefhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Jun 2021 18:39:36 -0400 (EDT) Date: Wed, 16 Jun 2021 07:39:33 +0900 From: Takashi Sakamoto To: Colin King Cc: Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] ALSA: bebob: Fix bit flag quirk constants Message-ID: Mail-Followup-To: Colin King , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210615142048.59900-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615142048.59900-1-colin.king@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Jun 15, 2021 at 03:20:48PM +0100, Colin King wrote: > From: Colin Ian King > > The quirking bit-flags are currently set as contiguous integer enum values > and so currently SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC is zero and so > he quirking never getting set or tested correctly for this quirk. Fix this > by setting the quirking constants as shifted bit values. > > Addresses-Coverity: ("Bitwise-and with zero") > Fixes: 93cd12d6e88a ("ALSA: bebob: code refactoring for model-dependent quirks") > Signed-off-by: Colin Ian King > --- > sound/firewire/bebob/bebob.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h > index c06579d9380e..4d73ecb30d79 100644 > --- a/sound/firewire/bebob/bebob.h > +++ b/sound/firewire/bebob/bebob.h > @@ -76,8 +76,8 @@ struct snd_bebob_spec { > }; > > enum snd_bebob_quirk { > - SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC, > - SND_BEBOB_QUIRK_WRONG_DBC, > + SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC = (1 << 0), > + SND_BEBOB_QUIRK_WRONG_DBC = (1 << 1), > }; > > struct snd_bebob { > -- > 2.31.1 Nice to catch it. Indeed, I overlook it... Acked-by: Takashi Sakamoto Thanks Takashi Sakamoto From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47669C48BE5 for ; Tue, 15 Jun 2021 22:40:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1593561246 for ; Tue, 15 Jun 2021 22:40:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1593561246 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1C1D61678; Wed, 16 Jun 2021 00:39:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1C1D61678 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623796844; bh=ht3IcVPwevPM3UicdtR2vYQBMjYkh4pdYKWPRaRweOc=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ev2JJXekyYH23H+Hqam8XKbbc+79IqpM1D1hVL2R0GRvjt5QHwflYVo+xvHySdkPu VswS9g2yyidgr1KnuNwV1Yi7NN35pJqNlVqQKTFy5X3t+i/tIh9vZp6Bp8thobEQ6Z sKA/vq0IsN9TWnzFbNIszwy8Ni+nMi54mhTcvaFw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A3F39F8016D; Wed, 16 Jun 2021 00:39:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 96819F80171; Wed, 16 Jun 2021 00:39:51 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9CEEAF8016C for ; Wed, 16 Jun 2021 00:39:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9CEEAF8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="A++O9Vvn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y4wZEyfA" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A49B55C018B; Tue, 15 Jun 2021 18:39:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 15 Jun 2021 18:39:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=f2gn9UHXuaQi9VRk/NVthPD7rSg BJOO3nqkzPfXlP7E=; b=A++O9VvnEAsR4q74jfqdIW+6V7C44iNxSXt+XblUeR/ mygiNFBgYrFqmsal3rQ7ZwGP58LTDblE0Dt931gyIHHka/57gvok/sbA/zm5LuEl ziCTLx/7Fi39ZgX2YeHOcoR10WNaxD2wsOXmau2IoWJ6aBTgMmywVXSGDF0HFYtj lXI2bDAaZdeePZhGoS3dbhPys1Z5xtewA0KJLtLF7n+NTMyBdbnDeP3yl37CrEzh RbhNvF/q1A+246IztXcx0y3L0AeROglBa1Lc0l58OTZT5K3Huk3+nbH16umTzn91 z2iBQwXc1fcAbAFtuB9spRaL5/ifdaLPURkfv+7MI8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=f2gn9U HXuaQi9VRk/NVthPD7rSgBJOO3nqkzPfXlP7E=; b=Y4wZEyfAt9osHhIvUU46Hu p9CNxo6Yyc2mPwsk0OI5iKhOCqMNUdkIH3uLla9q9kEwlgN5M6/fD+JyHyLW0/JI NkfKGkg1hOB88FFMJ7be+rVDXRCxe8rZC8ntcQOTC0joJVKRVI9e6FyZeX5CrE8g I9SIYiyT+aqA/kfhS8KW4hvW44GoldR48qRsBfg3hLu4jAGccmY4nh2tDk/PVVif qapajDNE9X9YPaszc9hs5cXBQ8QxPE9yP6kTEf6vqS7bO7JNNfzQOAnz2z5e7bzo Tj3sBSAp5Q+pIETDBaR8cnQgD6tQwuWgaHfUnWVo6EQGONMbE+NXj04tlsgGtbqg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvkedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefvrghkrghs hhhiucfurghkrghmohhtohcuoehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjh hpqeenucggtffrrghtthgvrhhnpeelhfeugedvjefgjefgudekfedutedvtddutdeuieev tddtgeetjeekvdefgeefhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Jun 2021 18:39:36 -0400 (EDT) Date: Wed, 16 Jun 2021 07:39:33 +0900 From: Takashi Sakamoto To: Colin King Subject: Re: [PATCH][next] ALSA: bebob: Fix bit flag quirk constants Message-ID: Mail-Followup-To: Colin King , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210615142048.59900-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615142048.59900-1-colin.king@canonical.com> Cc: alsa-devel@alsa-project.org, Clemens Ladisch , kernel-janitors@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi, On Tue, Jun 15, 2021 at 03:20:48PM +0100, Colin King wrote: > From: Colin Ian King > > The quirking bit-flags are currently set as contiguous integer enum values > and so currently SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC is zero and so > he quirking never getting set or tested correctly for this quirk. Fix this > by setting the quirking constants as shifted bit values. > > Addresses-Coverity: ("Bitwise-and with zero") > Fixes: 93cd12d6e88a ("ALSA: bebob: code refactoring for model-dependent quirks") > Signed-off-by: Colin Ian King > --- > sound/firewire/bebob/bebob.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h > index c06579d9380e..4d73ecb30d79 100644 > --- a/sound/firewire/bebob/bebob.h > +++ b/sound/firewire/bebob/bebob.h > @@ -76,8 +76,8 @@ struct snd_bebob_spec { > }; > > enum snd_bebob_quirk { > - SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC, > - SND_BEBOB_QUIRK_WRONG_DBC, > + SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC = (1 << 0), > + SND_BEBOB_QUIRK_WRONG_DBC = (1 << 1), > }; > > struct snd_bebob { > -- > 2.31.1 Nice to catch it. Indeed, I overlook it... Acked-by: Takashi Sakamoto Thanks Takashi Sakamoto