Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3794776pxu; Mon, 30 Nov 2020 10:22:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5hOBYhzgKUbUQWCXv+QbxHADDBmmowpo1DpLrzY4lu1gJhTy64xjYYMHGEfcpjeBeJzao X-Received: by 2002:a17:906:4881:: with SMTP id v1mr21292137ejq.465.1606760524276; Mon, 30 Nov 2020 10:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606760524; cv=none; d=google.com; s=arc-20160816; b=qT6Vaw8FJuJxlPBh/9gzEnrQJKurEtuDkj+5sDAAu9lpTJdFMW3CX2MZpj4odjpp9h 5FmU3daJvFsV3Wr7fMrpm+b/MSCow/5VhvCdWiMr8nLGl1CJuxoQJ8nxgZKxKd1NNlJu yTyMtGJ+RxxLYyau0ERS3TkGVtU018/TY8iAAa2dIqifWebRBkZlWKgLxMAJgibpx33i sciF7nSMd+x1zYKNaQmj7KPiat+1xjnm8uBxspMlnvAj8XS/dDlgLQ675g/eIF1hPCXg n+H8PQe4XkKv4pLgj0i2CM18h+AryRkifZ9IMcFPY5lODczDxAIWpSPPJp6A7lZL+Pu3 5E4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :newsgroups:cc:to:subject; bh=vENks4Y1dbafWvHdw6UyxjCikIHCCRfXlZwf2hGOQEQ=; b=q1WODK+O/pU80q0K3Ugk0b1QHmJ7Ht7B5T7R92PefTEEj5aXaSyTtPDwj6MU2kwxck vnfBcvTwVcwsg4oxVYtmOtXC3oESqrdi26/zrOHENlS8oEWUhbvso4Khp0jI9a60lRpv sgyCKKq6+GJdMqXxnFfbtH/KjitH0ck2yzVHOV9EtKZDSAyD85c4ayvC8TzmQz69wV5W PQJSDlbd7gxAyi4pmb5SAjfqUIUiIA+qexBNglu8rMYnz87vB2PRC6vDoNm8T0gP1hLY YugFdshvvWb1IZ6SozAlYO6eVg68hixZdnKUoIGohv36Knmdbk/Z7OotDuYtpyJ7kGy2 GUTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si13593855edp.318.2020.11.30.10.21.27; Mon, 30 Nov 2020 10:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729654AbgK3SUz (ORCPT + 99 others); Mon, 30 Nov 2020 13:20:55 -0500 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:27092 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727182AbgK3SUz (ORCPT ); Mon, 30 Nov 2020 13:20:55 -0500 Received: from [192.168.42.210] ([81.185.173.102]) by mwinf5d73 with ME id yiK82300D2CvH0103iK8vB; Mon, 30 Nov 2020 19:19:10 +0100 X-ME-Helo: [192.168.42.210] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 30 Nov 2020 19:19:10 +0100 X-ME-IP: 81.185.173.102 Subject: Re: [PATCH] mlxsw: switch from 'pci_' to 'dma_' API To: Heiner Kallweit , jiri@nvidia.com, idosch@nvidia.com, davem@davemloft.net, kuba@kernel.org Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Newsgroups: gmane.linux.kernel.janitors,gmane.linux.kernel.wireless.general,gmane.linux.network,gmane.linux.kernel References: <20201129211733.2913-1-christophe.jaillet@wanadoo.fr> From: Christophe JAILLET Message-ID: <35052891-4d32-19f0-e991-2aad009917e9@wanadoo.fr> Date: Mon, 30 Nov 2020 19:19:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Le 29/11/2020 à 22:46, Heiner Kallweit a écrit : > Am 29.11.2020 um 22:17 schrieb Christophe JAILLET: >> @@ -1817,17 +1817,17 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) >> goto err_pci_request_regions; >> } >> >> - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); >> + err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); > > Using dma_set_mask_and_coherent() would be better here. > >> if (!err) { >> - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); >> + err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64)); >> if (err) { > > This check isn't needed, see comment at definition of > dma_set_mask_and_coherent(). > Hi, Correct, but I didn't want to mix several things in the same commit. This one is dedicated to automatically generated changes done with coccinelle. I plan to have another set of such clean-ups once "wrappers in include/linux/pci-dma-compat.h are gone" However, if it is prefered to have only one patch, I can resubmit. CJ