From patchwork Tue Nov 21 13:23:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10068033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0BAE602B7 for ; Tue, 21 Nov 2017 13:23:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5306295DB for ; Tue, 21 Nov 2017 13:23:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA0F1295DE; Tue, 21 Nov 2017 13:23:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D213295DB for ; Tue, 21 Nov 2017 13:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbdKUNXt (ORCPT ); Tue, 21 Nov 2017 08:23:49 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:51753 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbdKUNXr (ORCPT ); Tue, 21 Nov 2017 08:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5WoJvWbQMxLwTLwNiSYnZXk1aAoMe9lMc8KQgxLfXzM=; b=u+dYHmWhgZTZSP4shPv5x0NSE +lz544jQK2O7k+mkQWc1KIQgHXMbiZLhICe+ng3/pSADDaKWzJSb/c/6/VLS2CD9kq6pJPKGc5crH QCxDWVxH9tZ1k7gUGV/f6b7imLkeQ8wKmAnZ+b7F3DSeFqe4jJn2nu6GCimtGpXw3iNbsmCCsLuBv sw4p/lsExhntUH9JfBzvEqi9Qc15dMsPgqql+d18e3G7275S41BSprYPkgRiqkrXAAicT0li3coXj 4yiHm/41r2NuUeoLKTSm+4gUlAjyKiLlPol1Ke0NkbCd6Nj7Km3sx0uWvsQr9WzVCoxWFfuz1YpXn O49rGtKoQ==; Received: from clnet-p099-196.ikbnet.co.at ([83.175.99.196] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1eH8Wf-0007RS-NB; Tue, 21 Nov 2017 13:23:46 +0000 From: Christoph Hellwig To: "Martin K. Petersen" Cc: Huacai Chen , linux-scsi@vger.kernel.org, iommu@lists.linux-foundation.org, stable@vger.kernel.org Subject: [PATCH 1/3] dma-mapping: always provide dma_get_cache_alignment Date: Tue, 21 Nov 2017 14:23:37 +0100 Message-Id: <20171121132339.1702-2-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171121132339.1702-1-hch@lst.de> References: <20171121132339.1702-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide the dummy version of dma_get_cache_alignment that always returns 1 even if CONFIG_HAS_DMA is not set, so that drivers and subsystems can use it without ifdefs. Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index e8f8e8fb244d..81ed9b2d84dc 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -704,7 +704,6 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size, return ret; } -#ifdef CONFIG_HAS_DMA static inline int dma_get_cache_alignment(void) { #ifdef ARCH_DMA_MINALIGN @@ -712,7 +711,6 @@ static inline int dma_get_cache_alignment(void) #endif return 1; } -#endif /* flags for the coherent memory api */ #define DMA_MEMORY_EXCLUSIVE 0x01