Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1092730ybi; Thu, 30 May 2019 11:26:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQEPgFrcbAdI5Qtnsgehs/0nTy4Varu4R+8hDcE+uKVdb5JKjSBaUQfASxeAt7aXM9Jxwy X-Received: by 2002:a17:902:b905:: with SMTP id bf5mr4997154plb.155.1559240819551; Thu, 30 May 2019 11:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559240819; cv=none; d=google.com; s=arc-20160816; b=XWT9YvlUSGyFm6PtEiD7g6qqsjgqgAtN2T4dDaC6KMDrCgM3woPo/Pfm9vrrIEP7CS LdomqiSlfDYe+6u/AtkbRAjtypi7JzMr0LNjtP8wLUZ1a0TDGY+fTOV5q9IotENPauz9 w4MMEPLJOSWwZUL51jmtDOpyKpmlfI8igRHnDx92+c5FzySDAfOg9WmrXhFsleDwqBjK r5NlATCFu16STGvEKHqXXR59eduiD5lhtddwSqiNIjhW6NYGHxKSSAwbjoerAtFj4yaU hfY1HLswY49KVJEUh6Tirjvy3VcnIBwwh/Jndn0ygbqRNEEDbAKJFj8vuEukPxxF6ptZ vbgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=Lj5sJkyXzswdfKKQsKOyyjcnCowmI0P42DY17LEeBDI=; b=xSp+UcSvM+VDcQtAcUGfoIgJQ6SRuKkcFPMX0OwiZ/+d+zB2S7yWFGiS7m+5+3yTCT aiLsmNAXrEHCvg35W90W3Sn5mpYdPRuiQeqRoVML1lKnYY7p59fW3BA/yRMDPOtFzb5g kiSV7qiyVoIR9eIQydfRpIPRaEm+DcGh0EyjVmbWqPKjgWP075avcmD73Q83taJiYfr9 HeEOvknAtJTYSJ54BnUjeFUysTy1vxx37aAM/rykFOzNeu3EOhB17CcXQoQDvKVYi2FS U6mNBVHGWH9dWhyCmMNrcbA/DoMD1h3o3mGQ3Uc/iyqBPWANtpz23LriObkbn0f8QPI3 /ZtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AB/gDn1o"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si3742564pgh.163.2019.05.30.11.26.43; Thu, 30 May 2019 11:26:59 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b="AB/gDn1o"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726538AbfE3SZj (ORCPT + 99 others); Thu, 30 May 2019 14:25:39 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44982 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726461AbfE3SZi (ORCPT ); Thu, 30 May 2019 14:25:38 -0400 Received: by mail-pf1-f193.google.com with SMTP id c9so1222592pfc.11 for ; Thu, 30 May 2019 11:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=Lj5sJkyXzswdfKKQsKOyyjcnCowmI0P42DY17LEeBDI=; b=AB/gDn1oV3/ItKH83SwUe0OJ7ImMOhnavPB5tK3/AgwaY4iZ8QxtKelbDYhKQbfvpp QW9S6bHqK/tlh/llsKuxLiyZtF+JkAUuvKFbwe1MQGDdxXRzo4hzCvdzEWSJkb2bEdEm kbRUfxuhF5fzN/n7nNX0vasy/A3f95vThuoeCO32FBXNxzlEdaxBHxfdjQu9e7G3JlTG +kiEFzsf28+JqisDCE1CH5v4Lw1Jac0BNEmDSZSL+Aphn+dB6xpXtdmzodJ+bbHgOCA0 psdCiAPbkR4MdgEfve7lvKXXWYVZs0z9KC7x1kDrAaA5/EXCxL9iVeaV2MOqDcX0xF/u e5IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=Lj5sJkyXzswdfKKQsKOyyjcnCowmI0P42DY17LEeBDI=; b=CrsliwwinMl2Dr2EDPPVBCZbTVonPHSBF9ZAAZcH9hCtsbcQ86FtAOJB/ukUwRdeJF im4ud6f4K0U7s2EqGOR1hbrleILR0ISMlRRWLcs3iyBE4P3185NPBf0pdbcVIxpHsJJM gIg/MfNaISN/XzX89UDyDAT2VUdrluFccTzILU1Q6Fx7+1rHpJYYAk7GcCGQcl+lbuyw peL3LwzZX9tPmAVpuqy3itrZskf24P1TlpisBTljNxqbQMqoS89jLyewM0/Qd5NjzpSc 65dcCO0t+XcM4/kuP+5jXFWmNEnMU539txH1EMvbWHMC13q6Zgr66jFT/VA8ONB6eRc/ h9BA== X-Gm-Message-State: APjAAAX4ARRuDflEVfqGULMEOS/322t7weooYCBoZjHABTNy/f2PLrxP 1Qf8uSeS/gUYreaLoniiHRk= X-Received: by 2002:a05:6a00:43:: with SMTP id i3mr5089670pfk.113.1559240738062; Thu, 30 May 2019 11:25:38 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id n127sm2786600pga.57.2019.05.30.11.25.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 11:25:37 -0700 (PDT) Date: Thu, 30 May 2019 23:55:32 +0530 From: Hariprasad Kelam To: Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Huang Rui , Hariprasad Kelam , Oak Zeng , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu: Remove call to memset after dma_alloc_coherent Message-ID: <20190530182532.GA8370@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes below warning reported by coccicheck ./drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:63:13-31: WARNING: dma_alloc_coherent use in ih -> ring already zeroes out memory, so memset is not needed Signed-off-by: Hariprasad Kelam --- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c index 934dfdc..d922187 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c @@ -65,7 +65,6 @@ int amdgpu_ih_ring_init(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih, if (ih->ring == NULL) return -ENOMEM; - memset((void *)ih->ring, 0, ih->ring_size + 8); ih->gpu_addr = dma_addr; ih->wptr_addr = dma_addr + ih->ring_size; ih->wptr_cpu = &ih->ring[ih->ring_size / 4]; -- 2.7.4