Received: by 10.192.165.156 with SMTP id m28csp1586687imm; Tue, 17 Apr 2018 01:45:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+aIGUu21EpGEZtmW0B1LvRUugQHhHNpV50HrxtilnKI6dQ1BprX6dB+dXmMxhU52jLgfBZ X-Received: by 2002:a17:902:2f84:: with SMTP id t4-v6mr1287097plb.24.1523954743090; Tue, 17 Apr 2018 01:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523954743; cv=none; d=google.com; s=arc-20160816; b=LBbFa7aCdbu65bQ3Des2kPNv1/JUAnBOv2/vXD/OipRYXgw+2/I0y6Jrd569cnS4H9 SQW8Balnio5Cn89+8MGkc3T9Gj7S6iONh3Cbx2D0hRinuafieNXa6USbVj907FptwWxi /KLxSGwiNKDvSnHHvjiN6Srn2jE4s6B/u89aJLe/KIgy5J2//TEeO7vZS9TW7kzfmeUB XlOGLlo9HtRPmcAyAMtGcJZhG7qCOXLgSwdUv0iQ3yBmH/aEIf4kMUajZWO+WxZl7Rxm HLbf+ty8rMi/KSND37QBGeVzVPDE39EshoMDQJdMXmgG9WesYp63WMoACAswQQklQwFK viNg== 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 :arc-authentication-results; bh=XO9X3MQ5TdzGoSNKWwt8TvKW+YVTKYzI+4ojAA18lG8=; b=bcFseaUTj/TEUbUx2dNXxoBGXT7bSZXRQLLMBMbwxn/l2d1EELQ3MQuzfOFlkuWOZh 5a5ZODEV0A90ep1gHjop3Gab4lByhOv8nvd5z33Ozw++UcSuhg+18LTmvOanloQjx9EO 9pJIjfCO6q7jGl+NLLu3zbAwZtgdN+2jom0QkGGr2+NqGhKdoxBX0DIgqEST05UXX1ab w4hrL6hvF38OsqgD+fp8PCD9XQ4m6ZJuFshDMVCsDrr4Ghl/5cXsHWmObDNQBsXgdTBK nry5DDxGjmWsku6uK8JcVILCjrp05RLSqNgVlr23DzDU2hvardMej4zDKgf7EUhQmymr lo8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lKaPXGw/; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si3822480pfi.289.2018.04.17.01.45.28; Tue, 17 Apr 2018 01:45:43 -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=@chromium.org header.s=google header.b=lKaPXGw/; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752082AbeDQIoa (ORCPT + 99 others); Tue, 17 Apr 2018 04:44:30 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:40322 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751252AbeDQIo2 (ORCPT ); Tue, 17 Apr 2018 04:44:28 -0400 Received: by mail-ua0-f194.google.com with SMTP id c9so2101651uaf.7 for ; Tue, 17 Apr 2018 01:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XO9X3MQ5TdzGoSNKWwt8TvKW+YVTKYzI+4ojAA18lG8=; b=lKaPXGw/m79IMxHKYnx6lWT6AgMaStnKatyOL1avAhm1rJUH1naYaLVv7lb4AHPTnD FQW3DMnLHUyswMrlEtXrpq5AUUOObo0i5pAt5UoDyH9A2rSmLVZpL0zXgQb/ZIxUFmiE TpgY7h36L0XCdfTkMdX1gPBMnhrEBcPcXUCCw= 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=XO9X3MQ5TdzGoSNKWwt8TvKW+YVTKYzI+4ojAA18lG8=; b=dDIiRJJ2h99ujMtL+GJQZcAiGsxRE1Xt3I8hwFt0dgN86PA4zLMzSUjr5nTv8uZyTW DuHgTad7npcDlqdv3NjX2uPkBHLhDTIUFSLYiU6mN6WVtBFoCEi4fIAVr8Py+Z1/tOEf PbtVUSoAqa1XY5nm4aCGbnT0MCS5pHYpKc05YFme12o671a5VqUTAek1Cad1m0F/dw+p EdMaOw1BEhCBEBcDfrZsSh0QTcmMK8MXGzyK1nu9FOLQE0CknC5pjwMr63kowRV70eAs fTLleCvmgXMr3rOgV059xLJNjP5g71Lsj685Jq969kMh7bdEdg2E5wizLjMrc63+UYsq 9ZNA== X-Gm-Message-State: ALQs6tATv+5raweT59IWvnI2cdOPjlQbKOdv/A6HUiapbCMwAntGL/sa xrZkkLd+JUYG9zBgfHDHbwkN+zf1PFI= X-Received: by 10.176.79.25 with SMTP id n25mr737485uah.172.1523954667837; Tue, 17 Apr 2018 01:44:27 -0700 (PDT) Received: from mail-ua0-f175.google.com (mail-ua0-f175.google.com. [209.85.217.175]) by smtp.gmail.com with ESMTPSA id 133sm5999243vkp.2.2018.04.17.01.44.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 01:44:25 -0700 (PDT) Received: by mail-ua0-f175.google.com with SMTP id g10so11938906ual.6 for ; Tue, 17 Apr 2018 01:44:25 -0700 (PDT) X-Received: by 10.159.48.199 with SMTP id k7mr733738uab.71.1523954664780; Tue, 17 Apr 2018 01:44:24 -0700 (PDT) MIME-Version: 1.0 References: <20180308094807.9443-1-jacob-chen@iotwrt.com> <20180308094807.9443-9-jacob-chen@iotwrt.com> In-Reply-To: <20180308094807.9443-9-jacob-chen@iotwrt.com> From: Tomasz Figa Date: Tue, 17 Apr 2018 08:44:14 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 08/17] media: rkisp1: add capture device driver To: Jacob Chen Cc: "open list:ARM/Rockchip SoC..." , Linux Kernel Mailing List , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Mauro Carvalho Chehab , Linux Media Mailing List , Sakari Ailus , Hans Verkuil , Shunqian Zheng , Laurent Pinchart , =?UTF-8?B?6ZKf5Lul5bSH?= , Eddie Cai , Jeffy , devicetree@vger.kernel.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , Chen Jacob , =?UTF-8?B?6ZmI5Z+O?= , Allon Huang 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 Jacob, On Thu, Mar 8, 2018 at 6:49 PM Jacob Chen wrote: > From: Jacob Chen > This is the capture device interface driver that provides the v4l2 > user interface. Frames can be received from ISP1. Thanks for the patch. Please find my comment inline. [snip] > +static int > +rkisp1_start_streaming(struct vb2_queue *queue, unsigned int count) > +{ > + struct rkisp1_stream *stream = queue->drv_priv; > + struct rkisp1_vdev_node *node = &stream->vnode; > + struct rkisp1_device *dev = stream->ispdev; > + struct v4l2_device *v4l2_dev = &dev->v4l2_dev; > + int ret; > + > + if (WARN_ON(stream->state != RKISP1_STATE_READY)) > + goto return_queued_buf; We jump out with ret unitialized here. For reference, it triggers a compiler warning for me. Note that rather than initializing ret at its definition, I'd recommend adding an assignment before the goto statement. This will still let the compiler issue warnings, without assuming that the default value is correct. Best regards, Tomasz