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=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 5AF7EC433DB for ; Sun, 28 Feb 2021 08:14:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2966C64E54 for ; Sun, 28 Feb 2021 08:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230412AbhB1IOW (ORCPT ); Sun, 28 Feb 2021 03:14:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:43836 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbhB1IOT (ORCPT ); Sun, 28 Feb 2021 03:14:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id F07BAAB8C; Sun, 28 Feb 2021 08:12:54 +0000 (UTC) Date: Sun, 28 Feb 2021 09:12:54 +0100 Message-ID: From: Takashi Iwai To: Colin King Cc: Jaroslav Kysela , Takashi Iwai , Pierre-Louis Bossart , Wai Yew CHAY , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits In-Reply-To: <20210227001527.1077484-1-colin.king@canonical.com> References: <20210227001527.1077484-1-colin.king@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Feb 2021 01:15:27 +0100, Colin King wrote: > > From: Colin Ian King > > Currently the mask operation on variable conf is just 3 bits so > the switch statement case value of 8 is unreachable dead code. > The function daio_mgr_dao_init can be passed a 4 bit value, > function dao_rsc_init calls it with conf set to: > > conf = (desc->msr & 0x7) | (desc->passthru << 3); > > so clearly when desc->passthru is set to 1 then conf can be > at least 8. > > Fix this by changing the mask to 0xf. > > Fixes: 8cc72361481f ("ALSA: SB X-Fi driver merge") > Signed-off-by: Colin Ian King Applied, thanks. Takashi