From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932429AbbDHO5L (ORCPT ); Wed, 8 Apr 2015 10:57:11 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:36266 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932253AbbDHO5I (ORCPT ); Wed, 8 Apr 2015 10:57:08 -0400 Date: Wed, 8 Apr 2015 10:57:04 -0400 From: Tejun Heo To: Quentin Lambert Cc: Bartlomiej Zolnierkiewicz , Mikael Pettersson , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] ata: remove deprecated use of pci api Message-ID: <20150408145704.GL10582@htj.duckdns.org> References: <1428496450-11244-1-git-send-email-lambert.quentin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428496450-11244-1-git-send-email-lambert.quentin@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2015 at 02:34:10PM +0200, Quentin Lambert wrote: > Replace occurences of the pci api by appropriate call to the dma api. > > A simplified version of the semantic patch that finds this problem is as > follows: (http://coccinelle.lip6.fr) > > @deprecated@ > idexpression id; > position p; > @@ > > ( > pci_dma_supported@p ( id, ...) > | > pci_alloc_consistent@p ( id, ...) > ) > > @bad1@ > idexpression id; > position deprecated.p; > @@ > ...when != &id->dev > when != pci_get_drvdata ( id ) > when != pci_enable_device ( id ) > ( > pci_dma_supported@p ( id, ...) > | > pci_alloc_consistent@p ( id, ...) > ) > > @depends on !bad1@ > idexpression id; > expression direction; > position deprecated.p; > @@ > > ( > - pci_dma_supported@p ( id, > + dma_supported ( &id->dev, > ... > + , GFP_ATOMIC > ) > | > - pci_alloc_consistent@p ( id, > + dma_alloc_coherent ( &id->dev, > ... > + , GFP_ATOMIC > ) > ) > > Signed-off-by: Quentin Lambert Applied to libata/for-4.1. Thanks. -- tejun