From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8076C282D8 for ; Fri, 1 Feb 2019 08:51:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96BD320811 for ; Fri, 1 Feb 2019 08:51:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="nRBVC2pl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbfBAIsI (ORCPT ); Fri, 1 Feb 2019 03:48:08 -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-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@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.