From patchwork Mon Jan 20 09:53:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 23369 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0899218CB for ; Mon, 20 Jan 2014 09:54:04 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id vb8sf25545942obc.2 for ; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=qxU7xk5DN210NNXT/FuFxY8btiUSoo1TVTL8dxdCGPQ=; b=Re/skcq+LMJz2RJVjj4dKVgCcC9o8OhpnZYviRB+Lw6LhJk7w8usu791dtNrduG2Vr tEX4grAqpxzVcj8x3qjvgE8qDKrE3ijhfiE9VSTs4z7Yj7oVFMeqIt6oQEVEQfYC0Hpq Ra08tklGYJVpH9zuTWPN/Ty0dK0Sz3uELH4urvG/XQSSojzaRNLesBPX5qPtkQu6J8P2 v9MoterFGXgAMfnX3894S/FEPVfrE3buwIvzd8zFMiMtr4RLIDWapsfo9/w0IPpairZn LiWqBcx/WJovhXz+yMi6Dn7j+v21TsWGlTyQ+jprzk7HfRGvejTglc4dtHlaenbNOeMn BPuQ== X-Gm-Message-State: ALoCoQlCHhqT4Cp2sO0Mb64xixxjM4R5KM1YAyBq1ime8fvjw7bk8q8RYI+HE+lQVbmpM/N6cxJm X-Received: by 10.182.213.5 with SMTP id no5mr6401702obc.15.1390211643913; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.102 with SMTP id a93ls966604qga.33.gmail; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr10180197vec.17.1390211643776; Mon, 20 Jan 2014 01:54:03 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id kl10si120286vdb.64.2014.01.20.01.54.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 01:54:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p5so2685446vbn.16 for ; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-Received: by 10.52.30.77 with SMTP id q13mr8351313vdh.18.1390211643671; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp49797vcz; Mon, 20 Jan 2014 01:54:03 -0800 (PST) X-Received: by 10.194.63.228 with SMTP id j4mr13673518wjs.34.1390211642646; Mon, 20 Jan 2014 01:54:02 -0800 (PST) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by mx.google.com with ESMTPS id e7si337097wjw.75.2014.01.20.01.54.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 01:54:02 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.177 is neither permitted nor denied by best guess record for domain of zhangfei.gao@linaro.org) client-ip=74.125.82.177; Received: by mail-we0-f177.google.com with SMTP id x55so6483961wes.8 for ; Mon, 20 Jan 2014 01:54:02 -0800 (PST) X-Received: by 10.180.89.193 with SMTP id bq1mr9280841wib.22.1390211642224; Mon, 20 Jan 2014 01:54:02 -0800 (PST) Received: from [172.16.10.4] ([213.122.173.130]) by mx.google.com with ESMTPSA id n3sm1248956wix.10.2014.01.20.01.53.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 01:54:01 -0800 (PST) Message-ID: <52DCF234.9050102@linaro.org> Date: Mon, 20 Jan 2014 17:53:56 +0800 From: zhangfei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Patch Tracking Subject: Fwd: [PATCH] dmaengine: k3dma: fix sparse warnings References: <1389670663-16075-1-git-send-email-zhangfei.gao@linaro.org> In-Reply-To: <1389670663-16075-1-git-send-email-zhangfei.gao@linaro.org> X-Forwarded-Message-Id: <1389670663-16075-1-git-send-email-zhangfei.gao@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , -------- Original Message -------- Subject: [PATCH] dmaengine: k3dma: fix sparse warnings Date: Tue, 14 Jan 2014 11:37:43 +0800 From: Zhangfei Gao To: Vinod Koul CC: dmaengine@vger.kernel.org, Zhangfei Gao Fix sparse warnings: drivers/dma/k3dma.c:480:20: warning: Using plain integer as NULL pointer drivers/dma/k3dma.c:820:1: warning: symbol 'k3_dma_pmops' was not declared. Should it be static? Signed-off-by: Zhangfei Gao --- drivers/dma/k3dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) for_each_sg(sgl, sg, sglen, i) { @@ -817,7 +817,7 @@ static int k3_dma_resume(struct device *dev) return 0; } -SIMPLE_DEV_PM_OPS(k3_dma_pmops, k3_dma_suspend, k3_dma_resume); +static SIMPLE_DEV_PM_OPS(k3_dma_pmops, k3_dma_suspend, k3_dma_resume); static struct platform_driver k3_pdma_driver = { .driver = { diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index e26075408e9b..a1f911aaf220 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -477,7 +477,7 @@ static struct dma_async_tx_descriptor *k3_dma_prep_slave_sg( dma_addr_t addr, src = 0, dst = 0; int num = sglen, i; - if (sgl == 0) + if (sgl == NULL) return NULL;