Received: by 10.223.185.116 with SMTP id b49csp6325429wrg; Wed, 28 Feb 2018 07:36:12 -0800 (PST) X-Google-Smtp-Source: AH8x227YOEpl8l6J96FfFrS4W+5P7G6RcO2EOGDq0DcCTuxYa26rlVVY6iwHS0DmeEbSUiiSbSAx X-Received: by 2002:a17:902:7883:: with SMTP id q3-v6mr18293388pll.361.1519832172418; Wed, 28 Feb 2018 07:36:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519832172; cv=none; d=google.com; s=arc-20160816; b=th43YbegCeXJctHrDiFj3XbcM3cv/Qeh012BvhiVdPxMbdGse5cJXPYetLieL0fmNJ D4Pmh9hql64gsTpHvJBMgUW4ObeUgM5L7HCJ0ELNsLLwVKujjVDYcrWr10NrOCMs9kW3 LgQ8gYIe8H0W2cHhnpwhczEWQ4eka23UQzZQ1RgV7utkhWqcuOY84ZXO+/R3j5GYh9GS aXiRCtfNXG6/Rm5kKRsUe9L1pU+DD77vEFm5kgGyhUfVkwTUMEB9O6lYHhsX+0q0zfQ5 TT0ivi+6LK9TYk94NuZ53h44eLsoMlH35T5T3ZiNFgNhtC0+hlrOW5cVRBqGGkRl28w5 lg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=AypA8cZcQtnsQY9USEAzR7TYdTfwTadKm9SVPgbO9TU=; b=H8q9ZPqLdADoVSbHT5FycTd8oOvksiuo21K19ClkV51AVVhkmpSnV5Pk1CA3Qvj3O7 M63khEIaGvtSZeONsIxIFt6Tm02ZfIwiakQ91K4r2xmg5RQj6QkbAfM3A7pr46zBPgjv QSM/lhsnfoZHNTTULFUxKgaJnpVOTFn5ciJYY+8CnW+GIdoAG+lkV6vdFSRlgLYQ4UMM uXSfR72ITIiG3XKzLSu7+Lxr5ZKBzVgXkBq0tQp4kgEywt5ZcBu2QfvT1uhAfYO1bd1n QmAvVehC/qwXi9I8XLm2DDfMlDaAFs9loZ+trmvxVShjNMTvEIGKwdurmm/ndSrtdKOa LQ0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si1442163pld.586.2018.02.28.07.35.57; Wed, 28 Feb 2018 07:36:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933034AbeB1PcX (ORCPT + 99 others); Wed, 28 Feb 2018 10:32:23 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:33314 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752869AbeB1PWi (ORCPT ); Wed, 28 Feb 2018 10:22:38 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yd-0006Xc-VV; Wed, 28 Feb 2018 15:22:16 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yc-0008MQ-Tb; Wed, 28 Feb 2018 15:22:14 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Christoph Hellwig" , "Martin K. Petersen" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 008/254] scsi: dma-mapping: always provide dma_get_cache_alignment In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Christoph Hellwig commit 860dd4424f344400b491b212ee4acb3a358ba9d9 upstream. 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. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen [bwh: Backported to 3.16: Also delete the conflicting declaration in ] Signed-off-by: Ben Hutchings --- --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -181,7 +181,6 @@ static inline void *dma_zalloc_coherent( return ret; } -#ifdef CONFIG_HAS_DMA static inline int dma_get_cache_alignment(void) { #ifdef ARCH_DMA_MINALIGN @@ -189,7 +188,6 @@ static inline int dma_get_cache_alignmen #endif return 1; } -#endif /* flags for the coherent memory api */ #define DMA_MEMORY_MAP 0x01 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h @@ -85,9 +85,6 @@ dma_supported(struct device *dev, u64 ma extern int dma_set_mask(struct device *dev, u64 mask); -extern int -dma_get_cache_alignment(void); - extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction);