From patchwork Fri Jul 6 13:02:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 10511657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 19D246024A for ; Fri, 6 Jul 2018 13:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A058285EC for ; Fri, 6 Jul 2018 13:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1FA128617; Fri, 6 Jul 2018 13:02:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87416285EC for ; Fri, 6 Jul 2018 13:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933048AbeGFNC3 (ORCPT ); Fri, 6 Jul 2018 09:02:29 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45743 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932870AbeGFNC2 (ORCPT ); Fri, 6 Jul 2018 09:02:28 -0400 Received: by mail-wr1-f68.google.com with SMTP id u7-v6so4128186wrn.12 for ; Fri, 06 Jul 2018 06:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=SuY4oqOr4l1XJc3N4NfyN3WyVnP/hZUVrmexOuLxNfE=; b=Xm1jncoTDUofdVpGHFdloNHyHPuxhVV8ufcLcpeRTH3p4ZQ7uwGIyI1HsoF5BzoUQv klV7KeLhT0E7/UCuFgVjyqZPVpd2q3xV4L3aIAf6MO3/1Pv5CpDv9UVgBX71XK9MvfGZ 7ELQoNs+wRo8kkp2ZzrBZicDjkQ4RmHilTp1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SuY4oqOr4l1XJc3N4NfyN3WyVnP/hZUVrmexOuLxNfE=; b=gIwdHrjwqi69Tpy124S8ydJTDBnK3tTewrQgdirRmkZyQNYyLJuu+pirwoPUTGjCws AgOpZKhzj9TbHBWYLUz8/zhiJ7oesQB8QDGP74LdTO7/hG9DVW978Ut9sIRcKSYB1T1+ 6kkaX1yFwkCR0LQPSE+/6lCxmkJrB3b4tbrYjYhrXA4DPxGBpBjYDplXx4huSr+BgVIg 9tvIgf7oh0uLzdn9gZtJ0NrTUsD6fzXz3zvK4YoYUTJAb0NoKDCHirpChJ/J55MQWscv ZgJHx5zxaZPnwwh4N6v1QT+Rz67BR6+iJOm5riv7o53ABmf2pTmm+/QQ6KHeuPJ5TpdA DpRw== X-Gm-Message-State: APt69E3tlEbw+m67t1riYzSY75ji5MHKeJHkUEWgmEc+wk2CA3+DTMgO VKz3br4HdLYK405lTwo3ZWz+Qg== X-Google-Smtp-Source: AAOMgpcTPEMoa2o5IRk5L5+IKLxgfl9NdNPABdNasMx6i4V52WxPWUpA+bpo7v8xaZb7ul0BRClKeQ== X-Received: by 2002:adf:ecc6:: with SMTP id s6-v6mr8006515wro.160.1530882147061; Fri, 06 Jul 2018 06:02:27 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.214.65.221]) by smtp.gmail.com with ESMTPSA id b16-v6sm9764123wrm.15.2018.07.06.06.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Jul 2018 06:02:26 -0700 (PDT) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: vkoul@kernel.org, dan.j.williams@intel.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH] dma: stm32: replace "%p" with "%pK" Date: Fri, 6 Jul 2018 15:02:20 +0200 Message-Id: <20180706130220.21957-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The format specifier "%p" can leak kernel addresses. Use "%pK" instead. Signed-off-by: Benjamin Gaignard --- drivers/dma/stm32-dma.c | 4 ++-- drivers/dma/stm32-mdma.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 8c5807362a25..379e8d534e61 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -594,7 +594,7 @@ static void stm32_dma_start_transfer(struct stm32_dma_chan *chan) chan->busy = true; - dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan); } static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan) @@ -693,7 +693,7 @@ static void stm32_dma_issue_pending(struct dma_chan *c) spin_lock_irqsave(&chan->vchan.lock, flags); if (vchan_issue_pending(&chan->vchan) && !chan->desc && !chan->busy) { - dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan); stm32_dma_start_transfer(chan); } diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index 9dc450b7ace6..06dd1725375e 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -1170,7 +1170,7 @@ static void stm32_mdma_start_transfer(struct stm32_mdma_chan *chan) chan->busy = true; - dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan); } static void stm32_mdma_issue_pending(struct dma_chan *c) @@ -1183,7 +1183,7 @@ static void stm32_mdma_issue_pending(struct dma_chan *c) if (!vchan_issue_pending(&chan->vchan)) goto end; - dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan); if (!chan->desc && !chan->busy) stm32_mdma_start_transfer(chan); @@ -1203,7 +1203,7 @@ static int stm32_mdma_pause(struct dma_chan *c) spin_unlock_irqrestore(&chan->vchan.lock, flags); if (!ret) - dev_dbg(chan2dev(chan), "vchan %p: pause\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: pause\n", &chan->vchan); return ret; } @@ -1240,7 +1240,7 @@ static int stm32_mdma_resume(struct dma_chan *c) spin_unlock_irqrestore(&chan->vchan.lock, flags); - dev_dbg(chan2dev(chan), "vchan %p: resume\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: resume\n", &chan->vchan); return 0; }