Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp312086pxf; Thu, 18 Mar 2021 00:18:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXos1RtcshAMxkxD8cZfkQMM54XDefrd7SerymuCaBWG5oswyW6un1+1Jz96cWWjHSRx/L X-Received: by 2002:a17:906:ac6:: with SMTP id z6mr39027674ejf.505.1616051904937; Thu, 18 Mar 2021 00:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616051904; cv=none; d=google.com; s=arc-20160816; b=Bnj4F4Dxe5u/4Tv2/nQZjqZPaBMi3d/LVbcoz5/9r/fO9aezMd6YHKbG+DJzCIkioq r2AKHw9QQbE8uAEsoDthF8jlkR4KYRGm73TycGKygTo8JXvLMlWPT/BSYADVKflvjOkS l2n5L2PAPcVPY+bVgCPQzDsfbjXJX+qEtZYk0YZOmODDm7Mdder8OJUzq5/IvOd2NizY hGPF/8nwMq3e0gO24crz28nDDpkPheqVeXQ/Wx47ZzLp2QkCiIW9uGk0v6k5dK9a7mwS 0vZ71tJna+k6QbwPfFNDDgPh48LP0wdXsCI7MXuRlY4UcjkBU5S2ZGAFkC88HRmKuI0x koJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=lh4ncnKzrsO1O+pyW3ae3E8r/aFbjztV9kxgx87clhM=; b=TNcDTzMapYxJJiFK6+E7B8oN3yosU+d3WHQiVRz/EqFZ+Ve/SEucyZ+ChLOB3nUdOw taabMHPoZqILcam7g29FT2apkzylhlhUrwlhuSCRCXyOMaTRmPcqvxA7kL1xdE5Mvd3E fyPqKdtOkqPdTloTgak63T7Ee1BwZlVoXTw2+/Xl5RJbQpEkgSl8Er+eckIkJnsH37gD euEjKq7ZYCIt/36ASBRfPzrEH3J020hv/e9ujkPCCcOcMl0+g4gl5ew7/UjFEsf2mmei DkS6x78VaH6kFXZFTdhwdBJ95nJSEjtQ/OUwSg1KK/lJRl7vHI0I+30T4DOTsdQWntDk g7KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=KBbaSKWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go18si903769ejc.187.2021.03.18.00.18.02; Thu, 18 Mar 2021 00:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=KBbaSKWy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229564AbhCRHRF (ORCPT + 99 others); Thu, 18 Mar 2021 03:17:05 -0400 Received: from lb2-smtp-cloud7.xs4all.net ([194.109.24.28]:48723 "EHLO lb2-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhCRHQe (ORCPT ); Thu, 18 Mar 2021 03:16:34 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud7.xs4all.net with ESMTPA id MmtRlHbuHDUxpMmtUlhxUg; Thu, 18 Mar 2021 08:16:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1616051793; bh=lh4ncnKzrsO1O+pyW3ae3E8r/aFbjztV9kxgx87clhM=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=KBbaSKWyUtw4FkAfko5Gg7aKP5LX8tlPcEl/fVOHrftzwC8Ir84VJiOIgxCHJ94TC Z/xE+b/a4o46Vmk2cil3T0hj70NWjUaC4LXpfbcYsnlArzB0Lu8cabjvSTLQReJ6pS qvbvgyH0esnOWfZzJXWjrCIZJewdZ3FZOXSeE2xntrr1IombalpGAu0asqm68mMA6u 13eXOXT13WhV3pEVzy6ZHBtWfeOg5SRVfFVRBC6KQ+EpEMVTqfm0RVvRVxuQjURWBV ykjKAI4RXoOslNXToz5tKCs6ybnXAlNP8UZXyT2JZ19IiTFKbn+fpvtHi1Th2Txjh+ Wf8ow+a5QXmng== Subject: Re: [PATCH v6 05/17] media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL To: Ricardo Ribalda , Laurent Pinchart , Mauro Carvalho Chehab , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Mike Isely References: <20210317164511.39967-1-ribalda@chromium.org> <20210317164511.39967-6-ribalda@chromium.org> From: Hans Verkuil Message-ID: <72477f88-b5ec-6896-3c79-ab92ffa0bad2@xs4all.nl> Date: Thu, 18 Mar 2021 08:16:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210317164511.39967-6-ribalda@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfCABKwoQ6xuldTzhZ3wPGBg95XGdKawUTq1gCdrshztX96OmIA7vHQXM6YEr3hCPQcXNRnbcc/ON3zC8BcEpuPChBoOY3zeVpbJnOkRTnUvzr69qskI2 Awc6pG08ac3jCcPLeNbl3IZQMc2OXFUXCQ0j+FTzWfEPx6KzDkrxFnK24pSz5hBlorALOKs2mwF5CRKiTwrROfD0h+5FFV4YbuSIOiqIFAeUYVi7e0ZKFnsY viQlyodWOwheB03cwVxtMOp6eG06I+Z6I7l0FOvnMSEuHkw933sq3NacqpOygx+eTkUAYC/IQIESkOGXNk6Mdls4zv+CT3MjDLAKWykUhEh4CY4RQdyIWJd8 DnkhSh5XzOl71EPTPILlERL9NxadEelUBMPiJlkkzMZGt89hsKfYmDnHkAWzKEYh3zfp24mPAy4Jd2SAFBHuEtmTN0nvAwSgLMFrktKSL+xxk6uRgj8= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/03/2021 17:44, Ricardo Ribalda wrote: > The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is > written. > > Cc: Mike Isely > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil Thanks! Hans > --- > drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c > index 9657c1883311..c04ab7258d64 100644 > --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c > +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c > @@ -640,10 +640,6 @@ static int pvr2_s_ext_ctrls(struct file *file, void *priv, > unsigned int idx; > int ret; > > - /* Default value cannot be changed */ > - if (ctls->which == V4L2_CTRL_WHICH_DEF_VAL) > - return -EINVAL; > - > ret = 0; > for (idx = 0; idx < ctls->count; idx++) { > ctrl = ctls->controls + idx; >