Received: by 10.223.185.116 with SMTP id b49csp4220416wrg; Tue, 13 Feb 2018 15:07:02 -0800 (PST) X-Google-Smtp-Source: AH8x225ApyTZIB1fmTbijPJun2N1LWFWExPaqGRI+4L4txi4O360XnshlL9Vgtip0RC8gv2usX3z X-Received: by 10.101.76.204 with SMTP id n12mr2190912pgt.15.1518563222722; Tue, 13 Feb 2018 15:07:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518563222; cv=none; d=google.com; s=arc-20160816; b=eiy3u8JpGV625Daj5/bvzYOgf+P2XpdUZC9rKJadGzlkCg+I+AJlTsBWjTv6w3tfDJ MUzrqBV12XoIef7JTkDh4K/9OIpxO/+Z8VQsmziWMO0oK1hHXkpuz5k6+11sWOEDd6SB LIdW3OjZVA+5ExqbabSXiLVzKBiAgdwXA4u+wPAXVEFQUAjWRJ6Ey3B6QGcwoHLtyuU5 /0+1Wl9RmzgXCIuoFqnJXl6XwLOpdx0dca06YXgCo9vyPFRBKUZ1ZKTA27KbpjPe2jtf vipoUsw+0sQbhemrFT5cuEGnbDWKzwyVmb6/mVWHEdc45qIaje7+qJxFVomYKd6n9jd0 w2zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:to :subject:from:arc-authentication-results; bh=lBiO0AeYByq3XWHJ/y9YPCrDATG/KxEr7+dVZwEdaCc=; b=g8SzXB7OZW698rrYG6VXHwSoS/BL4vditdgPRb6/xYBg4+3AfMyMDm8NfbfTXsBacf KIgRHVAC130GcRi9p6JAjTWUaQoIevOBMmYj5xSSyKE+VBmtBkvF9ZF30Wj2hEQDhEcs /aTVOQcJrYu2rqnh+YhwHh37Ws44kE0cpEo0c5sNR+mdQ/hwBCz/L84X1nXWHglEUx3Z RS4NuK3kyxITSCdWKW364b9AFDBFjqi00bQxmdiNQPGyqX8R1cII5Tx81NcmbhxOYiRC uoYWSRVjl/Js47Sac4ct0iFYwxXR1HR4ZEa32JVZ5SwDc+KWEoVgwSx5KwNldNe3FeeD 5BIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6-v6si1084145pli.790.2018.02.13.15.06.48; Tue, 13 Feb 2018 15:07:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966092AbeBMXFT (ORCPT + 99 others); Tue, 13 Feb 2018 18:05:19 -0500 Received: from vps-vb.mhejs.net ([37.28.154.113]:53252 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965942AbeBMXFS (ORCPT ); Tue, 13 Feb 2018 18:05:18 -0500 Received: by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1eljdV-0002hk-0c; Wed, 14 Feb 2018 00:05:17 +0100 From: "Maciej S. Szmigiero" Subject: [PATCH v3 2/5] ALSA: emu10k1: use dma_set_mask_and_coherent() To: Jaroslav Kysela , Takashi Iwai Cc: linux-kernel , alsa-devel@alsa-project.org Message-ID: Date: Wed, 14 Feb 2018 00:05:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have been calling dma_set_mask() and then dma_set_coherent_mask() with the same value, but there is a dma_set_mask_and_coherent() function that does exactly that so let's use it instead. Signed-off-by: Maciej S. Szmigiero --- Changes from v1, v2: None in this patch. sound/pci/emu10k1/emu10k1_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index a0a4d31ded53..11e868f569d6 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1871,8 +1871,7 @@ int snd_emu10k1_create(struct snd_card *card, emu->address_mode = is_audigy ? 0 : 1; /* set the DMA transfer mask */ emu->dma_mask = emu->address_mode ? EMU10K1_DMA_MASK : AUDIGY_DMA_MASK; - if (dma_set_mask(&pci->dev, emu->dma_mask) < 0 || - dma_set_coherent_mask(&pci->dev, emu->dma_mask) < 0) { + if (dma_set_mask_and_coherent(&pci->dev, emu->dma_mask) < 0) { dev_err(card->dev, "architecture does not support PCI busmaster DMA with mask 0x%lx\n", emu->dma_mask);