Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752885AbdFLUgW (ORCPT ); Mon, 12 Jun 2017 16:36:22 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56142 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbdFLUgV (ORCPT ); Mon, 12 Jun 2017 16:36:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 835C86041C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ohaugan@codeaurora.org Date: Mon, 12 Jun 2017 13:36:20 -0700 From: Olav Haugan To: Russell King - ARM Linux Cc: catalin.marinas@arm.com, will.deacon@arm.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64/dma-mapping: Fix null-pointer check Message-ID: <20170612203620.yrdb3pnrm6xt6nub@codeaurora.org> References: <20170610194110.27712-1-ohaugan@codeaurora.org> <20170610220354.GY4902@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170610220354.GY4902@n2100.armlinux.org.uk> User-Agent: NeoMutt/20170428 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 715 Lines: 19 On 17-06-10 23:03:54, Russell King - ARM Linux wrote: > On Sat, Jun 10, 2017 at 12:41:10PM -0700, Olav Haugan wrote: > > @@ -149,6 +140,11 @@ static void *__dma_alloc(struct device *dev, size_t size, > > bool coherent = is_device_dma_coherent(dev); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > This re-introduces an instance that you say you're getting rid of... > The ARM64 version of is_device_dma_coherent() checks for !dev already...But anyway I will completely remove the !dev checks in the alloc/free functions since as Catalin pointed out it is coverted elsewhere. -- .Olav The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project