Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp655630imm; Wed, 10 Oct 2018 02:03:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60pnilVfJnX7FctgCID3RmnzPfVVig1+BTjVScefZdL9Epk20jW+yrhiO+mfjM/opjLdtCx X-Received: by 2002:a63:1a1c:: with SMTP id a28-v6mr28428704pga.157.1539162234365; Wed, 10 Oct 2018 02:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539162234; cv=none; d=google.com; s=arc-20160816; b=afUn5Ma71JPO0wMNdNhwvoGMa4uBFoaepbZNe5rWJKEuBbUTMNC76ZGFa+pcpSm7Du 7/5jy9toXNwnpsWYnev4JbWa7G6tqxTwf5hr9S6Do1K793TGUlF3f6lfz5ual9yQmVSS UOZjZNrGzSTGQBLKzDlRbIGhkywTYZKobr+URCe13j+POfoz9AFN5dUn5nTDbEb3pWoX sDRGsu8Bo7XIEwYBrIfshr68PCLjywSMVFuYhdUkO5MqTgMxQAoEB01XjMM/4fsP7qZT icOeRvXjcdmZCY7MBeBAONwcIS5DSs8Kz57EuP7Yl4HMvQQVq2yKoEnePIssfxjmU2hG FKDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=joyn6OLBg1f4D+Fifxa/SS4Ke79l5wLNhvUf6HfLSis=; b=DqHfrcMb/plFAqsCO19MlyOWVj3m+BBYm1g6divdLDxhIaxHAQMNVSkqpmot/GktQS aKRUe7l5hStgJ/gQ0Uk9pxdZpL4sByRxfpCiJHKeWYMylIbmGEx+MWShOzheGvwSN8Zj emXjC3qzbFlluYdaev78tmWKqAlrhMofBZ3lBqeDc6tHTu3jfdxHdWr23qDgeF1DbePL 55AbKdGf1o0/PQ2kdredPRM1oyXrQVfKkK3u70EWVcGslN17Zbce4Vd8ngiUT+nAOshy bssB+GqLc+uKIC9bYt3FAP96NhO+Zh+AEMu5XldLJD/h9MbPqatkCwtCHkGnw/i8FShY ztXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UwzqO7dL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u38-v6si22795595pgn.106.2018.10.10.02.03.39; Wed, 10 Oct 2018 02:03:54 -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=fail header.i=@gmail.com header.s=20161025 header.b=UwzqO7dL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbeJJQXC (ORCPT + 99 others); Wed, 10 Oct 2018 12:23:02 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42788 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbeJJQXC (ORCPT ); Wed, 10 Oct 2018 12:23:02 -0400 Received: by mail-lj1-f196.google.com with SMTP id y71-v6so4151006lje.9; Wed, 10 Oct 2018 02:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=joyn6OLBg1f4D+Fifxa/SS4Ke79l5wLNhvUf6HfLSis=; b=UwzqO7dLXaqGsobplb0rRenHcymcWD4t0o/wLYke1IE5ecHCzgaE4iY+GsfUTF+n7L BudA0/q5lMD8Y9t1A1Iy2/yzawrWgZmw6CU8gNVGVmFifPZ39+2Rg1aQFkKu7yfccP2l EMhCNFegmYEuTK3e/Eox9SiCKC+Kjd2b8nODMY284WUNvN7gGmA5PiHnpYcsPNpZta0M ynwl+LMhMYW7uIjei+JdBM7p+CuZ37+LJRIZv0JtsO+oKYgF2htYdtXGHBBn2Cr5UHw9 2pp7uKSNegWGr5y0E1w+qgd1I2UTH+D818xRFQUclIWuuHhlR4rJ9rlsfg2QnqICPM4m yazA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=joyn6OLBg1f4D+Fifxa/SS4Ke79l5wLNhvUf6HfLSis=; b=spqODZSIwRxTLuF03BBngadbSydEyjTsVf7LLXcscIKyA5qg/Z4aNTvyOvb3VgPfLO suSKo4gkNiDA0UnTmXEfna8UD8dwf+nRbPYiPJ/XHMXJSG9XWsJvRBiu1g/o8rWlOgRd JP61fVnYdsQ9VH/QpfVg3FPtX6s8uGv6LsnENITISLFov8vUgJ1CX4NbUSG/D0OrdUTc sm2lz604p5ENCPqfs0WcoA4K0+Pj++7Bo5mopq+1z+tCgUDxBuRXmS/hzPfRQQVI4p4v rW+nGn00ga7O3Q9gBru1yTw10DQjT7bpUOyRoKA3TAIkjbXtzWC/RekiCb9IVWhVMnrv to6w== X-Gm-Message-State: ABuFfohVWgAG7/A0aZFPNTLSwTHBqkMt61dz/joOl/9LdKWqpraBRwkC Sr0NaRkB9r4feYUXfFdGE5/8WVDB10o= X-Received: by 2002:a2e:4751:: with SMTP id u78-v6mr9503679lja.72.1539162106471; Wed, 10 Oct 2018 02:01:46 -0700 (PDT) Received: from localhost.localdomain ([5.57.50.195]) by smtp.gmail.com with ESMTPSA id q2-v6sm2150078lfc.67.2018.10.10.02.01.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 02:01:45 -0700 (PDT) From: Emil Renner Berthing To: linux-rockchip@lists.infradead.org Cc: Emil Renner Berthing , Rob Herring , Mark Rutland , Heiko Stuebner , Mark Brown , Enric Balletbo i Serra , Brian Norris , Douglas Anderson , Shunqian Zheng , Nickey Yang , Klaus Goger , Randy Li , Chris Zhong , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Huibin Hong Subject: [PATCH 1/7] spi: rockchip: initialize dma_slave_config properly Date: Wed, 10 Oct 2018 11:00:32 +0200 Message-Id: <20181010090038.20834-2-kernel@esmil.dk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181010090038.20834-1-kernel@esmil.dk> References: <20181010090038.20834-1-kernel@esmil.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huibin Hong The rxconf and txconf structs are allocated on the stack, so make sure we zero them before filling out the relevant fields. Signed-off-by: Huibin Hong Signed-off-by: Emil Renner Berthing --- drivers/spi/spi-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index fdcf3076681b..185bbdce62b1 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -445,6 +445,9 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs) struct dma_slave_config rxconf, txconf; struct dma_async_tx_descriptor *rxdesc, *txdesc; + memset(&rxconf, 0, sizeof(rxconf)); + memset(&txconf, 0, sizeof(txconf)); + spin_lock_irqsave(&rs->lock, flags); rs->state &= ~RXBUSY; rs->state &= ~TXBUSY; -- 2.19.1