Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE27EC433F5 for ; Thu, 6 Jan 2022 09:34:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237395AbiAFJeD (ORCPT ); Thu, 6 Jan 2022 04:34:03 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:43960 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236552AbiAFJeC (ORCPT ); Thu, 6 Jan 2022 04:34:02 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4E3AF21117; Thu, 6 Jan 2022 09:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1641461641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0zxIfZmibHX/exQ0Rrvi3hxwdxSFLGsv3o1M5NyM+Tk=; b=n5LD3yzGprslziATi+axrddjcCrvMseufaFwcmmUO595kc4qdEBQUNg+SW3faFf0Ob1tf/ vcGieSCvkNUXRWFt4vvirHLKfX9B5NAPtP4xLdAImCrOcQ3l9glXNFN+4268HEkHxX7tha I41ZFK+I9VEt+u0+2cUKEF5MWIqSLDI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1641461641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0zxIfZmibHX/exQ0Rrvi3hxwdxSFLGsv3o1M5NyM+Tk=; b=Vzodz3N+QvYbmJrobQp7Ax8IHbyzWRnBC7qh8ML7LjWlgkLJr+RaH1mEOOrJ8c4B7IsNQf kUMv+BEXDilkceBg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 23021A3B81; Thu, 6 Jan 2022 09:34:01 +0000 (UTC) Date: Thu, 06 Jan 2022 10:34:01 +0100 Message-ID: From: Takashi Iwai To: Jiasheng Jiang Cc: perex@perex.cz, tiwai@suse.com, leon@kernel.org, broonie@kernel.org, joe@perches.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: intel_hdmi: Check for error num after setting mask In-Reply-To: <20220106084110.2691207-1-jiasheng@iscas.ac.cn> References: <20220106084110.2691207-1-jiasheng@iscas.ac.cn> 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 Thu, 06 Jan 2022 09:41:10 +0100, Jiasheng Jiang wrote: > > On Thu, Jan 06, 2022 at 04:18:01PM +0800, Takashi Iwai wrote: > > Well, 32bit DMA mask practically never fails on x86 (and other > > architectures, IIRC). It's fine to add a sanity check, but it's > > better to be mentioned that it never fails. > > Actually, I have already found many place check the 32bit DMA mask. > For example: > snd_ad1889_create() in `sound/pci/ad1889.c`, > snd_vortex_create() in `sound/pci/au88x0/au88x0.c` > tegra_pcm_dma_allocate() in `sound/soc/tegra/tegra_pcm.c`. > Therefore, I think there must be some reason that 32bit may fail. > So, to make the system more robust, it should be better to add the > sanity check. Yes, as mentioned, it's fine to add a sanity check, but it's rather for consistency of the code, not actually fixing any real issue. At least it's better to rephrase the commit message for avoiding confusion for readers. thanks, Takashi