From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757189AbbDPKWW (ORCPT ); Thu, 16 Apr 2015 06:22:22 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48706 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754002AbbDPKWM (ORCPT ); Thu, 16 Apr 2015 06:22:12 -0400 Date: Thu, 16 Apr 2015 12:22:05 +0200 Message-ID: From: Takashi Iwai To: Quentin Lambert Cc: Thibaut Varene , Jaroslav Kysela , Jaya Kumar , linux-parisc@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] ALSA: remove deprecated use of pci api In-Reply-To: <1429107018-8552-1-git-send-email-lambert.quentin@gmail.com> References: <1429107018-8552-1-git-send-email-lambert.quentin@gmail.com> 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/24.4 (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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 15 Apr 2015 16:10:17 +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 Thanks, applied to for-4.2 branch. Takashi