Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp146041ima; Fri, 1 Feb 2019 00:50:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7VYDPZzfERMRCwie6AdQQFh65xEG2Ss/y1iju1d5xxhbClpJn1odRLrzvD+NltEMhyiEQZ X-Received: by 2002:a17:902:4464:: with SMTP id k91mr38922015pld.13.1549011047903; Fri, 01 Feb 2019 00:50:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549011047; cv=none; d=google.com; s=arc-20160816; b=hE3iBKgRZOdLEy2wqbLjtFpiAsqM7q/Ff4QBYktWdSGhTzgt7gCzuiemFUWaG/rZ6P nFmtrpn/+cdCSc4KJ2gg+yxoyv9gBVCvXIIev8aNvE93XQKCXT7qaOnY2Ad2anyWDao9 NUksl3kYHa9BbxPlAyLgIQbCaxPzO80ifArVnwD0thR3JsqzFIdV9+xhIrPFALCkJmOI 5YE3W3YVzHXJqy/0vMUUvTxMwfwE9UONiLc5Wv59uT5E0fyabNNLCZYbFnX2+xci8aja OGKWJpRkYCS03NMB2lcLzT6XvhrT+voP8Fd+CAiZCeJVLEtTmqMCyZ+tUmBevCkHxJqM lNTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vFVj9ie43Q3lmzqIFn/+BVDNHfVtWH69joI8VNV7eGY=; b=K47nZKNcr56VJw20e7y9JQ4mIso9jFSCLyfnwIuT0Y76zgOl88meER7WMcHx9w15Qi JXhZBcy60p4JI7EZtguykyEuPPAAudAhihVZiET1QjJd/XIHff6x/0sQuYKnS3/lMTA1 5df+myoOfUOIjsKzeydyDy1Y7bpz434+iMNqIf68ZlEK+Pf3bU4HXkZIaYxrgPtcMxyv MEhUYhhn1gGuIcDGQt3MrGan0lFYJxuAPQrqnkWsTn/TsV6ePiV18OE6NRMvcg5pjMTC yqzlBZQny2/WxSSx2nZBnqEyJC7V8Hy0MVostBrlYuaa577BeamiJN5hKgao+fLgNWa9 hm+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nRBVC2pl; 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 f18si6768342pgl.457.2019.02.01.00.50.32; Fri, 01 Feb 2019 00:50:47 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nRBVC2pl; 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 S1729271AbfBAIsJ (ORCPT + 99 others); Fri, 1 Feb 2019 03:48:09 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48256 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbfBAIsI (ORCPT ); Fri, 1 Feb 2019 03:48:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vFVj9ie43Q3lmzqIFn/+BVDNHfVtWH69joI8VNV7eGY=; b=nRBVC2pl+rCCsMy+n+9XnD2uF wEl3PTHWfXPqlhp9MlSUZhy7KaakPrWpz1my7Di7fRobseglQSogNHf3ODzkaNNcD56mUeTopM15x k/mpyqkvZ+km1qvdcEUOtNA4U2EOgfTTBeuingnClxvKqbhOBccrbJICSaS/mvG0zHblgBZtlKEL5 PSy4hm0ze9jsu3GLVEyLYqehoPuc1avLZDaFmLOTx1Tp9hMZPjrDv06l/H8CNtKHxLCcDP4GRlYuO wvXWlXk97aAGG5LtMZr3RAE+jBhvLnCeTNgyxEYXPik0M2qutITAQDu0JCtAqGPXCyfxFAx4/dWHv 7sujePILg==; Received: from 089144212163.atnat0021.highway.a1.net ([89.144.212.163] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpUUV-0001MY-3l; Fri, 01 Feb 2019 08:48:03 +0000 From: Christoph Hellwig To: John Crispin , Vinod Koul , Dmitry Tarnyagin , Nicolas Ferre , Sudip Mukherjee , Felipe Balbi , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org Cc: iommu@lists.linux-foundation.org Subject: don't pass a NULL struct device to DMA API functions Date: Fri, 1 Feb 2019 09:47:43 +0100 Message-Id: <20190201084801.10983-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We still have a few drivers which pass a NULL struct device pointer to DMA API functions, which generally is a bad idea as the API implementations rely on the device not only for ops selection, but also the dma mask and various other attributes. This series contains all easy conversions to pass a struct device, besides that there also is some arch code that needs separate handling, a driver that should not use the DMA API at all, and one that is a complete basket case to be deal with separately.