Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp101349pxv; Wed, 7 Jul 2021 21:32:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+DbZVTU1cMHqlX4hDrcHEnmT8H4kcN2ALnrVnUqDcXzIDkYypJUyzly2abJXO3JqnllO3 X-Received: by 2002:a05:6638:3819:: with SMTP id i25mr18560345jav.44.1625718769409; Wed, 07 Jul 2021 21:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625718769; cv=none; d=google.com; s=arc-20160816; b=h1AsV3K4yq6eKAxT64SfW+ZSP9xEn7cLrBMwUagDHxqNMcVQHX8Vo6W9+MVRHqyA2O 9SiFTzEITkPiB0hZo01+zqv7tjen73/pwFRWNNJQBFolVu3L5pBgN2szdjOwmJqrImvJ UnSlYb+qXIdjwmr9tlt0iV8sT8g/Z9XhNI8VlQek5lEzkTtRR6Pik2sqw3qYswVygued yWhG56svD9JxYew2Jf4H6oAg5RUpWBqToHUHSsN3oLDlgSJrt0Hc9F1V6LzTll0El9xs ZNbZNBvo6biT1UleY9Kjb+XeqYRp1HyhEcJ92cb6U9Vq/uc4EDJ3jIg/C8xm5oCIfF5b 6MEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=BAkXVvOCEDEolug96+8r+nkKBVWiRQP+BqE7MPt1gKM=; b=L36tNqriLU/MStegnR9xDJxwwE+Y9X3quXlNJowr1Zq1BR8PfyjRzyUAHoj+AzIzE4 kS2MC9VI+m/BdCbqPTVv0qkGP+S49qqW1BQgOAvOLvEr3fRWzWJwb2kjS60hBYKZua61 xzFtXjA5+NNqIXzVbe5BVxCJyqakZ1/a6Ca1zCmozJPaoPGUL4BnMcf2lJ+gus3HVPM0 jy2AP2MpMaj5I9wjXarl+p/RK7jTQ+9SdZ0UbqIU3L5wBNyDMIvuLW1aNiTOJVSD1XmJ Ld3sRzzEE4V1egOdhVuGR3XGECw9Pep2kyqdolTVdd8oJ3I6YTzT37lTy2uw1tcpch76 pY7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 v18si1012409ioh.67.2021.07.07.21.32.12; Wed, 07 Jul 2021 21:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbhGHEd2 (ORCPT + 99 others); Thu, 8 Jul 2021 00:33:28 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:32056 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229553AbhGHEd1 (ORCPT ); Thu, 8 Jul 2021 00:33:27 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d71 with ME id SUWk2500421Fzsu03UWk09; Thu, 08 Jul 2021 06:30:45 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 08 Jul 2021 06:30:45 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: mani@kernel.org, hemantk@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] bus: mhi: pci_generic: Simplify code and axe the use of a deprecated API Date: Thu, 8 Jul 2021 06:30:37 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The wrappers in include/linux/pci-dma-compat.h should go away. Replace 'pci_set_dma_mask/pci_set_consistent_dma_mask' by an equivalent and less verbose 'dma_set_mask_and_coherent()' call. Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 --- drivers/bus/mhi/pci_generic.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c index bb0326883470..dd3199de07e2 100644 --- a/drivers/bus/mhi/pci_generic.c +++ b/drivers/bus/mhi/pci_generic.c @@ -510,18 +510,12 @@ static int mhi_pci_claim(struct mhi_controller *mhi_cntrl, mhi_cntrl->regs = pcim_iomap_table(pdev)[bar_num]; mhi_cntrl->reg_len = pci_resource_len(pdev, bar_num); - err = pci_set_dma_mask(pdev, dma_mask); + err = dma_set_mask_and_coherent(&pdev->dev, dma_mask); if (err) { dev_err(&pdev->dev, "Cannot set proper DMA mask\n"); return err; } - err = pci_set_consistent_dma_mask(pdev, dma_mask); - if (err) { - dev_err(&pdev->dev, "set consistent dma mask failed\n"); - return err; - } - pci_set_master(pdev); return 0; -- 2.30.2