From patchwork Sat Mar 17 15:28:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10290865 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 C485C60385 for ; Sat, 17 Mar 2018 15:29:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B788328F75 for ; Sat, 17 Mar 2018 15:29:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC65429118; Sat, 17 Mar 2018 15:29:30 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable 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 5F2EA28F75 for ; Sat, 17 Mar 2018 15:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753528AbeCQP2r (ORCPT ); Sat, 17 Mar 2018 11:28:47 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:34444 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930AbeCQP2f (ORCPT ); Sat, 17 Mar 2018 11:28:35 -0400 Received: by mail-lf0-f65.google.com with SMTP id l191-v6so19513896lfe.1; Sat, 17 Mar 2018 08:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=4aBEW7xtCIBGXlySGOVt+9c4i6EPAuNug1VeEKlKFqU=; b=u998PTCJfz0PDMBBPQfel3JJzotA5J8fMrFrg7AlmX9087V6WiU1nHCeHXEcP1C2Xi 4m5XxUCX+yB779Ko4ajl2p0fEi372lVmCeAsV10hCyUjAChpxPS7G7vj990Cwipews43 oGwkQlg7Ma33xAqPV484as44KH1Rh20iXjAvLvsmxPr+0ZilTQzrZrOtxbwo0n/uvfk+ IO85H0tSTEwff8yLldLP22WA4wYdaHwTM5icQEB5JDLvExKSpKqDE79gRJKNzaiRVlMu OEE/O4rIyYA2FHkWlL1XlxfviHVKawGrwOgy7W59nKrw7OM/F1zi8nVi7qVpAwpNbOHm VdkQ== 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:in-reply-to :references:in-reply-to:references; bh=4aBEW7xtCIBGXlySGOVt+9c4i6EPAuNug1VeEKlKFqU=; b=INySZmaybaDOUTQiS8rilwRBFNJMGbZUutJ9Vno5iQo/f0pRuZ3mGk35wc6520T2kl BWP68tx1wLOtDVOxLybFFTC+Jyr+07pgDH9qJL5Psay9RphSqZe/Q5M97ZWiwCTqNn7q 1joPxcws/uwWM+Sf1a3nJyLVND4UqQ5pnBvqho3UxahtG/UWGvBdxL6by/2+Jg60BwDe G24F2B0nspXkeOQYHPvrfBxLYQ4BkfvehlPiKixwcteAwHaPO8PqUNcwYVWnIYlywK6u GfpFJ7CAjEVpBEqGhceZgekpu+bsoxsrlcH8rkdlauePx6w6cXFPETFx0GPcb25v5apP mVFA== X-Gm-Message-State: AElRT7GXjyiXbg4OTIVJ6qisFpf4tFvNrGD+PFJXZxr7UpO+9OHy14Z0 lYBIcguV1ZirN8WFqZ+ZfXE= X-Google-Smtp-Source: AG47ELsglqxCLTDjalkRSP3ND7l9lu3J7fQ3g8s4QSJMrQp9N2LY/Fe2FO18eIeyasbEDdnG7AWUaQ== X-Received: by 10.46.122.15 with SMTP id v15mr4134462ljc.141.1521300514021; Sat, 17 Mar 2018 08:28:34 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-55-234.pppoe.spdop.ru. [109.252.55.234]) by smtp.gmail.com with ESMTPSA id a142-v6sm2388276lfb.11.2018.03.17.08.28.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Mar 2018 08:28:33 -0700 (PDT) From: Dmitry Osipenko To: Mauro Carvalho Chehab , Hans Verkuil Cc: Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/5] media: staging: tegra-vde: Silence some of checkpatch warnings Date: Sat, 17 Mar 2018 18:28:12 +0300 Message-Id: <9ec5460f88ac716d84cc626aa9e8d0a3c2e6acf3.1521300358.git.digetx@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make all strings single line to make them grep'able and add a comment to the memory barrier. Signed-off-by: Dmitry Osipenko --- drivers/staging/media/tegra-vde/tegra-vde.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c b/drivers/staging/media/tegra-vde/tegra-vde.c index c2ff2071b23c..14899c887d58 100644 --- a/drivers/staging/media/tegra-vde/tegra-vde.c +++ b/drivers/staging/media/tegra-vde/tegra-vde.c @@ -368,6 +368,11 @@ static int tegra_vde_setup_hw_context(struct tegra_vde *vde, tegra_vde_setup_iram_tables(vde, dpb_frames, ctx->dpb_frames_nb - 1, ctx->dpb_ref_frames_with_earlier_poc_nb); + + /* + * The IRAM mapping is write-combine, ensure that CPU buffers have + * been flushed at this point. + */ wmb(); VDE_WR(0x00000000, vde->bsev + 0x8C); @@ -542,15 +547,13 @@ static int tegra_vde_attach_dmabuf(struct device *dev, } if (dmabuf->size & (align_size - 1)) { - dev_err(dev, "Unaligned dmabuf 0x%zX, " - "should be aligned to 0x%zX\n", + dev_err(dev, "Unaligned dmabuf 0x%zX, should be aligned to 0x%zX\n", dmabuf->size, align_size); return -EINVAL; } if ((u64)offset + min_size > dmabuf->size) { - dev_err(dev, "Too small dmabuf size %zu @0x%lX, " - "should be at least %zu\n", + dev_err(dev, "Too small dmabuf size %zu @0x%lX, should be at least %zu\n", dmabuf->size, offset, min_size); return -EINVAL; } @@ -863,8 +866,7 @@ static int tegra_vde_ioctl_decode_h264(struct tegra_vde *vde, macroblocks_nb = readl_relaxed(vde->sxe + 0xC8) & 0x1FFF; read_bytes = bsev_ptr ? bsev_ptr - bitstream_data_addr : 0; - dev_err(dev, "Decoding failed: " - "read 0x%X bytes, %u macroblocks parsed\n", + dev_err(dev, "Decoding failed: read 0x%X bytes, %u macroblocks parsed\n", read_bytes, macroblocks_nb); ret = -EIO;