From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5909ACDB47E for ; Thu, 12 Oct 2023 12:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fon7LfeIRNdAMU26aZg3Qh6JlP0kByLCX3wkNWbc2C8=; b=eHl+5ehhNIQHNO 9xPjayY9lBKu2UGWikazgG4P2PIcDBMD1kdj+DI+c00xMcIJrAuD9iCtf4nypAVP/ATC7pHxu87OY lguIIXo10uE/KY5SX3jAisUuQGmY68/U7lfgqhFYw3q08Qix2aLcFMn8HnwjCq+E1XhsPO72Dpigh qwfP+v8LZvwXRoPPG6WdWBkpz/YLELvKdWbBB1jfcP/+iUkL17Z/LdhC3IOjZiRvUESYQDMMKkBJS S3cb3hYhFU3/WUVLZ628GJbD2dx/y+0mFGRIbt5ko878BbQqeknv/JOHUAd6+5wSnlJ2JCfFinkdN cis6Gpfj6Iedn+/URReA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qquWX-000w3L-1i; Thu, 12 Oct 2023 12:10:41 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qquWU-000w1E-21 for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 12:10:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697112637; 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=27M+MIAmpe+L/2HgaOkMQYAzM+WcqJam0R6eMp8zZVc=; b=d9fZMn82TsDRKeuyRto1FzvCexgkxrZ/zh4oU1BccmE/5pNO7VVqXFwCSaD+G0NbhP0ag6 mdjaH1z0xIdwV1MBgByf0saD4vw1GaD93Ye2jvz0R5/hnf+JwKzwMo+5O3lcKybRVdbY7b ojYRthqmh3xXfP8FxyOX4u3bDMcPMc4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-yNvbS6B7OnuRd1BoNwALww-1; Thu, 12 Oct 2023 08:10:16 -0400 X-MC-Unique: yNvbS6B7OnuRd1BoNwALww-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9bd7c682b33so68011566b.3 for ; Thu, 12 Oct 2023 05:10:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697112615; x=1697717415; 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=27M+MIAmpe+L/2HgaOkMQYAzM+WcqJam0R6eMp8zZVc=; b=SXvC71/SfckoUr3lXMMihlHgc9VRvED1TCVTsVUxSKuNx3RmNTS2yT9ROIy4XztGhh IpweUpwjYrSIEENQIDs/U0uVBUj7Yxt/7VjMD3H6lUpsrM6Skn0gSU3B3j1loN6avV5f CEyxUvKW5WnBVT7rVUOandlT+6K5/ogmHgoVxybKhALLji2BI1NGIwgK2wYD1DRDX9jA ggMdp4uUL04dum75wmnO97LKNuaymIIowOXFOC5K9BDwGDQiUEUP6agcwM1OQ5N4I2yW 1JOdigxMnWUSLoN/n1PTlk3QZllbg55GvD6iBXSVw7ovaU6R9miuYyYwXlxpb9Z1TNOq ygiQ== X-Gm-Message-State: AOJu0Yzr2zdf9siH9JC8QUGPXIDe5K8BjwYqvOXhmKAF4Om8sQq5CNhS c3H5OHL4EqNA3OUzsLnK0OTL2EUX+qcoQLdEkR1iiegk/cYtQrZlOROvCmiDkmbyIsSIiuvzjYG 85y1DDtvNovDkxhlV1pgEIlNF5LcpCVWU5K0= X-Received: by 2002:a17:906:1092:b0:9bd:8cfd:e588 with SMTP id u18-20020a170906109200b009bd8cfde588mr1625677eju.27.1697112615680; Thu, 12 Oct 2023 05:10:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkVyuhaskOIIVNVit9o80c6O2JAINjoNgAy46RiSAkOYOLUZ42tscH4PSdUZo1OCucR3X4XQ== X-Received: by 2002:a17:906:1092:b0:9bd:8cfd:e588 with SMTP id u18-20020a170906109200b009bd8cfde588mr1625662eju.27.1697112615307; Thu, 12 Oct 2023 05:10:15 -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 la18-20020a170906ad9200b0099cd008c1a4sm11019663ejb.136.2023.10.12.05.10.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 05:10:14 -0700 (PDT) Message-ID: <7ad450c4-78df-ed5c-a05d-5dca8201d081@redhat.com> Date: Thu, 12 Oct 2023 14:10:13 +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 16/56] media: atomisp: Use vb2_get_buffer() instead of directly access to buffers array 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-17-benjamin.gaignard@collabora.com> From: Hans de Goede In-Reply-To: <20231012114642.19040-17-benjamin.gaignard@collabora.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US, nl X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_051038_733680_30ADF374 X-CRM114-Status: GOOD ( 18.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 10/12/23 13:46, Benjamin Gaignard wrote: > Use vb2_get_buffer() instead of directly access to vb2_buffer buffer array. > This could allow to change the type bufs[] field of vb2_buffer structure if > needed. > No need to check the result of vb2_get_buffer, vb2_ioctl_dqbuf() already > checked that it is valid. > > Signed-off-by: Benjamin Gaignard > CC: Hans de Goede > CC: Mauro Carvalho Chehab > 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 a8e4779d007f..a8a964b2f1a8 100644 > --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c > +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c > @@ -1059,7 +1059,7 @@ static int atomisp_dqbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer > if (ret) > return ret; > > - vb = pipe->vb_queue.bufs[buf->index]; > + vb = vb2_get_buffer(&pipe->vb_queue, buf->index); > frame = vb_to_frame(vb); > > buf->reserved = asd->frame_status[buf->index]; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel