Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8328604ybi; Thu, 6 Jun 2019 10:20:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVmp7A5LLtN7ARJsNfS1NvxdQ2bR4PjyVT4hZptD/ylAL51nOimQQBBsGUbJeAhnbso7PP X-Received: by 2002:a17:902:6ac6:: with SMTP id i6mr37340471plt.233.1559841655300; Thu, 06 Jun 2019 10:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559841655; cv=none; d=google.com; s=arc-20160816; b=xfGtEiFJCp5b+ZhlhOoLXc+uyyCVOC4tHbzHeTUG484fZAfFez+FwjCsSAzvrjRm8y W6WNa+ckHfXLQydt2vr7DDGxO+Yrvs2c0YJWSJf3rS13lRtgNvS0phor4WZyrpdd3aF7 shHgPACsFa+x9hipGQP4R6E50osM8wQ7Gz7KzONNr1vcXbbSzYlE2ICtvjVjgf50kS33 ah+DpeYDpZU66P6wms0hHIoxkvCQ9pnLPc/SUsudBgtEdnEk9s5hVV21UVcM6Fn1BJId 9Lk0UHhok82WwunhU5DExQL9e5NHl3B4bmIGhFqH52o4r2QIjBy9EvXJkDiWqSF1l+oN QUtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QoGog8a3Wrsj5HuFdAVlHcSa7d9sUGcrDi4SC/3qBKY=; b=l8r4/idEyj2km6/bdabCWhsnJHh/ujQoEbfCb4sYKvSe5KyTYIeoogA5HZZTy7Oyvx wfGmUETMEE55IBsRcPUZgsqw8Oyltp1iQaLzLG7v7UI31mipnuZbX/ZVEK4ND09/CxZb 4J6fpx9xhZF1YRWvf2GWWPLiGIydIGN19m7Vainh+GRO6sNLvNFjW249OPRBktH5H8w3 zydlDtbiXEVkt9wgg3TirayHL3kMVVSiJAXhCN75LbS7rT2j1OrT75oHL4aDCj1z7vz9 vk+58DhGmrRTXxENd7xe7aMg39tsqpcWJv6jZzCe7aJuiTJq5dlKq/gYJNvSdHYhda4W SQ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=khY7Hzsl; 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 x1si2332711pfx.152.2019.06.06.10.20.38; Thu, 06 Jun 2019 10:20:55 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=khY7Hzsl; 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 S1727821AbfFFNYZ (ORCPT + 99 others); Thu, 6 Jun 2019 09:24:25 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54367 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbfFFNYW (ORCPT ); Thu, 6 Jun 2019 09:24:22 -0400 Received: by mail-wm1-f68.google.com with SMTP id g135so2443436wme.4 for ; Thu, 06 Jun 2019 06:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QoGog8a3Wrsj5HuFdAVlHcSa7d9sUGcrDi4SC/3qBKY=; b=khY7Hzsl2mrL6XdXHgajw/IBA9cQipqEFv5h6jaAjYz/mPADIrsyBZAwk9MD2Zn0vB A6Tj3bVkdGPNk12lhKNwEYMDYFBUgDkNMOEqgnXpubbQg5OHgFE8Zvq8vkdKU/e/3az4 0M3o5ceFu7NZxuZAGuO65bv1Q/XaxqZNsN4WwlCclCVWWCIzvZmFf3MJcLBW/vzlxEoU 8tRlUsRzCu9eIj5PEBcIaDt9NEIXyHGJRjDdMhwl0T7ydGec7lnUQwmBJUf4EXCx6ujj X4lWk+dBys6IcpmxdtXXx3eO9h+S75BsDnZWgeZvYyPRF6CvL5RlvZpInusxsfYIkV27 J+ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QoGog8a3Wrsj5HuFdAVlHcSa7d9sUGcrDi4SC/3qBKY=; b=XabJfcDp/qXOwrE34FMPDc4nckSU6Ty9J9crNSvAjJwx2b9yjx/ZqpmzJ1RPj3YYRE KolafSeu7BvuyIprwxr8xvjR9nFFD4ahY161t0BVMO6D3Mhj/ef0/oF/bs4r1LKbq8yE eawexPExKpXCGLVU11U5KwsEw7JoIwitOi6MyvO2DQYyxyh/qMPnohk+7rNUF1DFMVqm mFqZj6vyjdCVf5W4nDL1pABd+0fSZOe959dX+DhRS6YzmIwki2WiOveKzpMe1UPc629C H7aogE0agGU6xX/0Ble7zCQoRjAr+5y8+cVwznuFdRI4lwHE1oNUrRz20rNvW4OVsfmm OzPQ== X-Gm-Message-State: APjAAAUXfsapsseQClKtx3fHdpvudfsWi3yBIHlksEW/nIEilEt1b5kY If8qdhN3Xb8TeJP0m3KvSFeRR9hPn/n5zYw9+TWNXA== X-Received: by 2002:a1c:c706:: with SMTP id x6mr24472351wmf.162.1559827460800; Thu, 06 Jun 2019 06:24:20 -0700 (PDT) MIME-Version: 1.0 References: <20190605161858.29372-1-mjourdan@baylibre.com> <20190605161858.29372-3-mjourdan@baylibre.com> In-Reply-To: From: Maxime Jourdan Date: Thu, 6 Jun 2019 15:24:09 +0200 Message-ID: Subject: Re: [PATCH v8 2/3] media: meson: add v4l2 m2m video decoder driver To: Hans Verkuil Cc: Mauro Carvalho Chehab , Hans Verkuil , Kevin Hilman , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, On Thu, Jun 6, 2019 at 2:32 PM Hans Verkuil wrote: > > While preparing this series for merging I came across the following checkpatch > and sparse warnings: > > checkpatch: > > CHECK: Alignment should match open parenthesis > #159: FILE: drivers/staging/media/meson/vdec/codec_mpeg12.c:83: > + ret = amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, 0 }, > + (u32[]){ 8, 0 }); > > HV: I think this doesn't need changing, this is easier to read. > > CHECK: Alignment should match open parenthesis > #968: FILE: drivers/staging/media/meson/vdec/vdec.c:185: > +static int vdec_queue_setup(struct vb2_queue *q, > + unsigned int *num_buffers, unsigned int *num_planes, > > CHECK: Alignment should match open parenthesis > #1755: FILE: drivers/staging/media/meson/vdec/vdec.c:972: > + core->regmap_ao = syscon_regmap_lookup_by_phandle(dev->of_node, > + "amlogic,ao-sysctrl"); > > CHECK: struct mutex definition without comment > #1949: FILE: drivers/staging/media/meson/vdec/vdec.h:85: > + struct mutex lock; > > CHECK: struct mutex definition without comment > #2085: FILE: drivers/staging/media/meson/vdec/vdec.h:221: > + struct mutex lock; > > CHECK: struct mutex definition without comment > #2116: FILE: drivers/staging/media/meson/vdec/vdec.h:252: > + struct mutex bufs_recycle_lock; > > CHECK: spinlock_t definition without comment > #2120: FILE: drivers/staging/media/meson/vdec/vdec.h:256: > + spinlock_t ts_spinlock; > > CHECK: Alignment should match open parenthesis > #2247: FILE: drivers/staging/media/meson/vdec/vdec_1.c:108: > + amvdec_write_dos_bits(core, VLD_MEM_VIFIFO_CONTROL, > + (0x11 << MEM_FIFO_CNT_BIT) | MEM_FILL_ON_LEVEL | > > CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt > #2313: FILE: drivers/staging/media/meson/vdec/vdec_1.c:174: > + udelay(10); > > CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt > #2354: FILE: drivers/staging/media/meson/vdec/vdec_1.c:215: > + udelay(10); > > CHECK: Alignment should match open parenthesis > #2413: FILE: drivers/staging/media/meson/vdec/vdec_ctrls.c:19: > + sess->ctrl_min_buf_capture = v4l2_ctrl_new_std(ctrl_handler, NULL, > + V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 1); > > > sparse: > > SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/codec_mpeg12.c > /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/codec_mpeg12.c:201:25: warning: symbol 'codec_mpeg12_ops' was not > declared. Should it be static? > SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c > /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c:417:5: warning: symbol 'vdec_vb2_buf_prepare' was not declared. > Should it be static? > SPARSE:/home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c > /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c:85:5: warning: symbol 'vdec_1_stbuf_power_up' was not declared. > Should it be static? > /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec_1.c:85:5: warning: no previous prototype for 'vdec_1_stbuf_power_up' > [-Wmissing-prototypes] > /home/hans/work/build/media-git/drivers/staging/media/meson/vdec/vdec.c:417:5: warning: no previous prototype for 'vdec_vb2_buf_prepare' > [-Wmissing-prototypes] > > Can you fix these issues? > Sure, preparing a V9. I'll add sparse to my list of tools to use before sending a patch. Maxime > > Regards, > > Hans