Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp372137pxa; Fri, 14 Aug 2020 06:42:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlQtdiH/i9p2YpIrKSVQ3p4ZXrlzVSxUMnM2rO6P38y4TMlhtdGXsmNxP2rqVZz88Owc18 X-Received: by 2002:a17:906:7698:: with SMTP id o24mr2575090ejm.182.1597412577108; Fri, 14 Aug 2020 06:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597412577; cv=none; d=google.com; s=arc-20160816; b=RG7jdlbzMV+a/x1HYjmw+qzru8iEPSLlqk4d+4eQTo8zR0XuyExmpx/CoLF3GU/m/n xlxLwUgLuVTOsAqRr5K2S5Cn59QqZjUFDGLLKm/SgtY7Ws0FmBWbnn0Z3onmG5nbyADx fCEJkFzN6Td2Ly17cF5HUGlH5j2gQkPZU4mtHwXi4Ra1nGV/XjgF2uA7V1hH0xLoQus2 eYEuw7kaqZioFP77D3MwyD/F0k25TSvXdPVWoNMaoTducWFv+KZWr/9KucUWxDsXevwn 1WhMT7qiqj0zK2VUd+dj/nhjaaYDO+TeXYyZUvzv6x9+JbtNvdHvqa6vxyGXUhHJ6Kea SDZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AjbqgwUwuVpm7e8nXkiTquhB+p1fOt3/PXcTVHNSTyY=; b=vjD23sLxIvE887I3D31TYY4TTWVkJRioNeoMzV1n2z/NuBRUgJHTKtU3hatgW8iIxZ WbLMTjxI9eDY1xfL4PA4UAUVFqSWxxWHSi9Yjefg7azVowCOmC8pR5tEPCA3eavjOR7j AVwdDB8GziTXnz5CLU92MHPYP+sJ/Re+NZ8i/QTHNMc4swneaMzhYsWHUggzPNv9BvAE X8KpcleyvZutBsHEua4UHr6NAW9Huh8VUb7TYKJIutdaonWxKzBf17b81FDwyoZH8HVy zJoV69hdjFdTIp6XxYQGTe203WU6T5OQOB3YJhvHIUIMEXT1wT6ROr7QaVhJg3OShHt7 Mrnw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov24si5355708ejb.229.2020.08.14.06.42.34; Fri, 14 Aug 2020 06:42:57 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728891AbgHNNiC (ORCPT + 99 others); Fri, 14 Aug 2020 09:38:02 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43430 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728275AbgHNNh6 (ORCPT ); Fri, 14 Aug 2020 09:37:58 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 68E7529A825 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Jonas Karlman , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Jernej Skrabec , Ezequiel Garcia Subject: [PATCH v3 16/19] media: rkvdec: Drop unneeded per_request driver-specific control flag Date: Fri, 14 Aug 2020 10:36:31 -0300 Message-Id: <20200814133634.95665-17-ezequiel@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200814133634.95665-1-ezequiel@collabora.com> References: <20200814133634.95665-1-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the drivers makes no distinction between per_request and mandatory, as both are used in the same request validate check. The driver only cares to know if a given control is required to be part of a request, so only one flag is needed. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rkvdec/rkvdec.c | 6 +----- drivers/staging/media/rkvdec/rkvdec.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 7c5129593921..cd720d726d7f 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -55,23 +55,19 @@ static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = { static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = { { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SPS, .cfg.ops = &rkvdec_ctrl_ops, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PPS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX, }, @@ -615,7 +611,7 @@ static int rkvdec_request_validate(struct media_request *req) u32 id = ctrls->ctrls[i].cfg.id; struct v4l2_ctrl *ctrl; - if (!ctrls->ctrls[i].per_request || !ctrls->ctrls[i].mandatory) + if (!ctrls->ctrls[i].mandatory) continue; ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl, id); diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h index 2fc9f46b6910..77a137cca88e 100644 --- a/drivers/staging/media/rkvdec/rkvdec.h +++ b/drivers/staging/media/rkvdec/rkvdec.h @@ -25,7 +25,6 @@ struct rkvdec_ctx; struct rkvdec_ctrl_desc { - u32 per_request : 1; u32 mandatory : 1; struct v4l2_ctrl_config cfg; }; -- 2.27.0