Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp261741rdg; Thu, 12 Oct 2023 05:11:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBhxmgNtmzYP3i/NKaskSZ4D0IhlVrs7XoBuch0EIcmOoF4g5zWxdF4Q6Xvci2WAuZ+E1z X-Received: by 2002:a05:6a00:2e23:b0:68a:59c6:c0a6 with SMTP id fc35-20020a056a002e2300b0068a59c6c0a6mr32084709pfb.24.1697112703800; Thu, 12 Oct 2023 05:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697112703; cv=none; d=google.com; s=arc-20160816; b=iEwcx1yk//GKggsMobiVgO4y3Gi8PGcaU29gUP4vXOExdsxa4XP0G+PLscMY1xROb1 3Kuxg7OAR8Tzle3wF1Y91V1HhpTSURdCxan41MSIHrcalbfsnIXR0xDAIXPKbkM6dXva H7DstT9RoUlVfijGOspBfiY3WlsRhYAjGnbhRaXHJUWUko9mosz6ey66JwTpG0T4TxTO u6PMXSuIAAgcMaXTBkd/XEGCd4XsXoJMWW2z+Liy/oL0NYDVYLF6DK3aMj9KKG7AtdHA bVkhrdR0VoUfs2lBiq6KLLiLYBNxCEaN11q+fqnMR2T6egJPevi9mRdcOV83EoMFHtgM BULA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=e0nmqy59jy/rGMIg2W3+5Ft0g6PXLLlnoefzeVrsrTs=; fh=DLl9VAizyXmC5yFG9UPmaxtfGpNLUmEPpXNlwUXivOo=; b=kLcGhRYQOnmIAyGNQ0eXzWggQh8al7KLhY8hnbkbqAMpj4YZJJ+wGQff89Hh9wOA8m CRLTJNMfLDlVrcZuFcdsHRi2TWfpBaZc/PZAkRvPyI4UG2STVAM0G8Na7UMNZfuU22Jj VK+CcoiXkstuGzb0GnnbkJPk5VDApNCRddy+blRLQ7NHFZ2BNO1K5Zd3tDjfFXdvD+ro u2kAMyiMsQzPInpXxNlWmr7/ZnYYx8wvyYNiX4cRqg214r6y3293OFsqS5d/rRuT7xnx p1NqtILCt/cz8LDj+hGPpp3dhEuC1BQNgfAhdtMkc91KWRn0fXXzICabP6W4On5a1mwR 3M8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SrCSLvre; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id r20-20020a6560d4000000b0059b70e69eddsi2024324pgv.300.2023.10.12.05.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:11:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SrCSLvre; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 28082822D563; Thu, 12 Oct 2023 05:11:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347219AbjJLMLX (ORCPT + 99 others); Thu, 12 Oct 2023 08:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343918AbjJLMLQ (ORCPT ); Thu, 12 Oct 2023 08:11:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119AEC4 for ; Thu, 12 Oct 2023 05:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697112628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e0nmqy59jy/rGMIg2W3+5Ft0g6PXLLlnoefzeVrsrTs=; b=SrCSLvreBIdBuPQM/ha4E3z3Kz37BfdrQ3thw0VpnxSanDR3ndvLBJ71x8TJhN+DJy8VHq yAGxBmUT9ArOJPrCPC4epac2kdYtpBbaCVMExKLLQv2h4+JZPC2dFCd/fgdGOPWIXyPBH9 v0ofpKPvkaib8MrgB921PlXT1F/HfzA= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-2r8Tkj9bMkKwV1_Rc6gWxw-1; Thu, 12 Oct 2023 08:10:27 -0400 X-MC-Unique: 2r8Tkj9bMkKwV1_Rc6gWxw-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-9a5d86705e4so68684966b.1 for ; Thu, 12 Oct 2023 05:10:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697112626; x=1697717426; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e0nmqy59jy/rGMIg2W3+5Ft0g6PXLLlnoefzeVrsrTs=; b=xBFir/Zb+mB/TlHW2sqbGnH15PtCnsUL9vmix05PyC5qHqvyIKo8qrMRuHv4koxGAz Y4K7nK1p+xQogIGgy1uaaOvV33kCIdc+3o4Uhetfi/G9CqG9JaaHJEJq1ydM6CBmijAO iDkqVfChOrsZ/d/qam+um0q7y4qDh5uATy5SphCQBEIXyBiwsVeOm8LP4UTGITIt0bRA S2es2/3/VLYgGVXdQRjEJZVinZbJhFha/6OKM11VV6opdHbDJK2cdb13ErdsDn9an2mb u9JVa6unwlxpwzJZs+onsM3CYgWV3p4RFEAHtbWEamfI73TcyM5HrrwK7EW98+s5lCDo SZ2g== X-Gm-Message-State: AOJu0YyjcZcHBFwquYEh3BLeR62mUR3Kpq76VWQL/SKD3j3z6s72ksTd 9RHU1mEnL5IZwHsCssmd3qEtVLtM9+FQ5AVCC/vM75VtB3ooOJpk+WvmNlPnbY3mv91CDPGbPQf vz1pCQIohHs4H9hcYn55MCS/t X-Received: by 2002:a17:906:cc13:b0:9b6:50d3:2a75 with SMTP id ml19-20020a170906cc1300b009b650d32a75mr19703364ejb.48.1697112625899; Thu, 12 Oct 2023 05:10:25 -0700 (PDT) X-Received: by 2002:a17:906:cc13:b0:9b6:50d3:2a75 with SMTP id ml19-20020a170906cc1300b009b650d32a75mr19703329ejb.48.1697112625566; Thu, 12 Oct 2023 05:10:25 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id x26-20020a170906711a00b0099329b3ab67sm11000199ejj.71.2023.10.12.05.10.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 05:10:25 -0700 (PDT) Message-ID: Date: Thu, 12 Oct 2023 14:10:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v11 17/56] media: atomisp: Stop direct calls to queue num_buffers field Content-Language: en-US, nl To: Benjamin Gaignard , mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, kernel@collabora.com, Sakari Ailus References: <20231012114642.19040-1-benjamin.gaignard@collabora.com> <20231012114642.19040-18-benjamin.gaignard@collabora.com> From: Hans de Goede In-Reply-To: <20231012114642.19040-18-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:11:41 -0700 (PDT) Hi, On 10/12/23 13:46, Benjamin Gaignard wrote: > Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. > > Signed-off-by: Benjamin Gaignard > CC: Hans de Goede > CC: Sakari Ailus Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c > index a8a964b2f1a8..09c0091b920f 100644 > --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c > +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c > @@ -1028,7 +1028,7 @@ static int atomisp_qbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer > struct atomisp_device *isp = video_get_drvdata(vdev); > struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev); > > - if (buf->index >= vdev->queue->num_buffers) > + if (buf->index >= vb2_get_num_buffers(vdev->queue)) > return -EINVAL; > > if (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING) {