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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD388C433F5 for ; Thu, 7 Apr 2022 05:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240847AbiDGFYj (ORCPT ); Thu, 7 Apr 2022 01:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237688AbiDGFYf (ORCPT ); Thu, 7 Apr 2022 01:24:35 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A360119250 for ; Wed, 6 Apr 2022 22:22:35 -0700 (PDT) Received: from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 43FB0499; Thu, 7 Apr 2022 07:22:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649308952; bh=lm/82HxnVmCNwXVBuAC6hsJxDHCU91WqEz8pMnWVOaA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=utwN4zqIPxiNnNIk5pM4K+PNe9+AHJoK3yEbdz1uJB42lKgDWSIYIeox1kGu1lEzp SVbGMPh8rXKKL2Jyh/i4QarLjw5SrToTrj8EBlUttNNq0ShTkf+d09M8ToYtdYnOum 6z7S2ySk3t6uJUh956dB0nTWVESrSLVYTgzDJPUk= Message-ID: <8790d418-a00d-8c7b-6798-4c0dc6f42087@ideasonboard.com> Date: Thu, 7 Apr 2022 08:22:29 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v6 3/8] media: subdev: add v4l2_subdev_get_pad_* helpers Content-Language: en-US To: Hans Verkuil , linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, Jacopo Mondi , Laurent Pinchart , niklas.soderlund+renesas@ragnatech.se, Mauro Carvalho Chehab , Pratyush Yadav References: <20220324080030.216716-1-tomi.valkeinen@ideasonboard.com> <20220324080030.216716-4-tomi.valkeinen@ideasonboard.com> From: Tomi Valkeinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On 06/04/2022 16:52, Hans Verkuil wrote: > > > On 06/04/2022 15:36, Hans Verkuil wrote: >> >> >> On 24/03/2022 09:00, Tomi Valkeinen wrote: >>> The subdev state is now used for both try and active cases. We should >>> rename v4l2_subdev_get_try_* helpers to v4l2_subdev_get_pad_*, but due >>> to the size of that change lets add temporary wrapper helpers which can >>> be used in drivers that support active state. >>> >>> Signed-off-by: Tomi Valkeinen >> >> Reviewed-by: Hans Verkuil >> >>> --- >>> include/media/v4l2-subdev.h | 10 ++++++++++ >>> 1 file changed, 10 insertions(+) >>> >>> diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h >>> index 1bbe4383966c..b9587a265b32 100644 >>> --- a/include/media/v4l2-subdev.h >>> +++ b/include/media/v4l2-subdev.h >>> @@ -1042,6 +1042,16 @@ v4l2_subdev_get_try_compose(struct v4l2_subdev *sd, >>> return &state->pads[pad].try_compose; >>> } >>> >>> +/* Temprary helpers until v4l2_subdev_get_try_* functions have been renamed */ >>> +#define v4l2_subdev_get_pad_format(sd, state, pad) \ >>> + v4l2_subdev_get_try_format(sd, state, pad) >>> + >>> +#define v4l2_subdev_get_pad_crop(sd, state, pad) \ >>> + v4l2_subdev_get_try_crop(sd, state, pad) >>> + >>> +#define v4l2_subdev_get_pad_compose(sd, state, pad) \ >>> + v4l2_subdev_get_try_compose(sd, state, pad) > > Actually, wouldn't it be better to rename the try helpers and > add #defines for the old names? > > I think I prefer that. Yes, that's a good idea. Tomi