From patchwork Wed Oct 15 20:32:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38791 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBF7A20C4E for ; Wed, 15 Oct 2014 20:33:01 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf1267966wiv.10 for ; Wed, 15 Oct 2014 13:33:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=EPbuQY2y4wToQ2D96yVtGyVC3CMFuHLopKyq73T6AuI=; b=d12gT+osKj/T0qmrwbeykLJjEVPrBUMYN7U9dHbDrayfuGGGwkn5DCPiCMarh82KnW I3OmUeJlE/ego0U5zBce13A0UzEMF0PPC++BOQ9AkW6EBD8ZXN6om+K1AEM6E4P5ow9H W1i2/lpF6qEq+H+YEQb/GswyZm3cObhp6zmsE2gFBLp//BY7luYJHbjE9RCvzA1av/l6 NffGjUwXAVc9ItqXVa6obfTn03BcUeGENQ7eI9WPk6huhS3CQJUOkZjN8GJZPyvi7gkS T4twEAb7j7GyH7j7cs4k5skf1FkWUjZs68WNPpXoy67yHFRIkMeNOaaf4Ga77n57xgFm CJHA== X-Gm-Message-State: ALoCoQlENf0tAkidmxGIXlz62kFWhYpp8b3YqCWJ6QGpc94Th0RCjdMU6Hr4DmBnWQXnvcdY8Hkq X-Received: by 10.180.36.176 with SMTP id r16mr1828923wij.7.1413405181060; Wed, 15 Oct 2014 13:33:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.97 with SMTP id s1ls96943lag.81.gmail; Wed, 15 Oct 2014 13:33:00 -0700 (PDT) X-Received: by 10.112.44.229 with SMTP id h5mr5612877lbm.86.1413405180867; Wed, 15 Oct 2014 13:33:00 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx.google.com with ESMTPS id q13si31948123lal.108.2014.10.15.13.33.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 Oct 2014 13:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so1728360lab.26 for ; Wed, 15 Oct 2014 13:33:00 -0700 (PDT) X-Received: by 10.112.167.38 with SMTP id zl6mr14917245lbb.34.1413405180727; Wed, 15 Oct 2014 13:33:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp680114lbz; Wed, 15 Oct 2014 13:32:59 -0700 (PDT) X-Received: by 10.70.54.227 with SMTP id m3mr15656041pdp.66.1413405179144; Wed, 15 Oct 2014 13:32:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gs8si15185383pac.40.2014.10.15.13.32.58 for ; Wed, 15 Oct 2014 13:32:59 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751350AbaJOUcx (ORCPT + 27 others); Wed, 15 Oct 2014 16:32:53 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33869 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbaJOUcw (ORCPT ); Wed, 15 Oct 2014 16:32:52 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9FKWV5t024394; Wed, 15 Oct 2014 15:32:31 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9FKWVLI009378; Wed, 15 Oct 2014 15:32:31 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 15 Oct 2014 15:32:30 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9FKWUEL011637; Wed, 15 Oct 2014 15:32:30 -0500 From: Felipe Balbi To: Greg KH CC: Linux Kernel Mailing List , Felipe Balbi , Marek Szyprowski , Arnd Bergmann , Michal Nazarewicz , Grant Likely , Laura Abbott , Josh Cartwright , Joonsoo Kim , Kyungmin Park , Andrew Morton Subject: [PATCH] base: dma-coherent: fix device_init initialization Date: Wed, 15 Oct 2014 15:32:20 -0500 Message-ID: <1413405140-17777-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , commit 7bfa5ab (drivers: dma-coherent: add initialization from device tree) added support for dma coherent pool for DeviceTree. Unfortunately that commit introduced a new build warning because of a wrong type on the definition of ->device_init(). This patch fixes it. Cc: Marek Szyprowski Cc: Arnd Bergmann Cc: Michal Nazarewicz Cc: Grant Likely Cc: Laura Abbott Cc: Josh Cartwright Cc: Joonsoo Kim Cc: Kyungmin Park Cc: Andrew Morton Fixes: 7bfa5ab6 (drivers: dma-coherent: add initialization from device tree) Signed-off-by: Felipe Balbi --- drivers/base/dma-coherent.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 55b8398..d3695a8 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -276,7 +276,7 @@ EXPORT_SYMBOL(dma_mmap_from_coherent); #include #include -static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev) +static void rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev) { struct dma_coherent_mem *mem = rmem->priv; @@ -286,11 +286,10 @@ static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev) &mem) != DMA_MEMORY_MAP) { pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n", &rmem->base, (unsigned long)rmem->size / SZ_1M); - return -ENODEV; + return; } rmem->priv = mem; dma_assign_coherent_memory(dev, mem); - return 0; } static void rmem_dma_device_release(struct reserved_mem *rmem,