Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp809534ybe; Fri, 13 Sep 2019 06:43:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxB/Eozyetz1gFQeYtBoM0RCoi27NkT242oWv6a4XP2+dva1CulZVQ+hs3YqLVrsSvi2QsU X-Received: by 2002:a17:906:5e09:: with SMTP id n9mr30490808eju.143.1568382228041; Fri, 13 Sep 2019 06:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568382228; cv=none; d=google.com; s=arc-20160816; b=t9p/KPxnxJTVsmRKLWoF3b7nSoBpNd/bocR7L+7VHPGita5Bmnp0gyPO8ycfsdIEpU S6KZqPAg7H3yL2tDUf23AS0tleA4BIW5+4fddDoamJbl8ng9jaYBLf7mBGyqjwai32iG wD4GkCpI3UcxjbQogTKj8j8NfKPR3OEsOSJm8l4ktZ4Q/kM7JciPyYlaZ+MXZr5rzUnK EvW6v0Qjzr96WUWDhV6AgfZgsaILkslG4irTsdIDEJ2ZIBf77DMsoNiGIevlp/ToanRS UTPb9BWCVUTW8EyNil4Ou6SLGm6MVC8pGUbBjYdMPkJEUnUvDcQPkMWxA33P0uyqJwB9 60sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CmbLJ7PpeDku490Wh6BDSiCQHPLlezHiiaAQg2qYXnM=; b=SUT4NCqdGk70The+/zXUK2H/Bd+fLPtIx7LNSOsPPOvhtapiiTYLNZ2qh4hlpC6fUW ZqVjV0r4oY1tetQnOW/kKIaWzbz6ccPRwrIgRBtyEd/WLFVYPTIfxiSByE3/JoTNG0/+ npLy4am9DriNxonKwgVUlc256mWPf2s0ad6V3l/GDee7r5rsn89DY8pJ5VA1QKCoIZxz MYMFICSx3WgKEIpMlISuwdXcj2HY/p8afOKlrKSJBZPqWVPmBNw07T0K8ZE0Kqc8+TeL aPD3KBhaV9FLa7majHGSSZ7KEexRTD/B7oHNjS3sejlckjxCx+uZxezMXEdk2g8rcUb1 Wk1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ykropRZ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k39si17380362edb.52.2019.09.13.06.43.22; Fri, 13 Sep 2019 06:43:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ykropRZ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389605AbfIMNlN (ORCPT + 99 others); Fri, 13 Sep 2019 09:41:13 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:39778 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388927AbfIMNlN (ORCPT ); Fri, 13 Sep 2019 09:41:13 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8DDfC2S094105; Fri, 13 Sep 2019 08:41:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568382072; bh=CmbLJ7PpeDku490Wh6BDSiCQHPLlezHiiaAQg2qYXnM=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ykropRZ7yh9+HQIZLNa/QCkM2+GpbxSbalY1PmG3fVmd7eUs8o4RKcb/iLoCDRomv 3NSwYybEJKvT31v+qM4Lv/iNDy3Flh6T7Cum0lMY3V6PAwkDtUC5CwzrICmGsHHo1Q E/nBVNc3iwXqOn/8EPCh6FzuoljdW0yj0XmKvUm0= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8DDfCF1054907 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Sep 2019 08:41:12 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 13 Sep 2019 08:41:11 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 13 Sep 2019 08:41:11 -0500 Received: from ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with SMTP id x8DDfBKY013552; Fri, 13 Sep 2019 08:41:11 -0500 Date: Fri, 13 Sep 2019 08:43:17 -0500 From: Benoit Parrot To: Hans Verkuil CC: Prabhakar Lad , , , Subject: Re: [Patch 08/13] media: am437x-vpfe: Maintain a reference to the current vpfe_fmt Message-ID: <20190913134317.afnflvebna3xv35o@ti.com> References: <20190909162743.30114-1-bparrot@ti.com> <20190909162743.30114-9-bparrot@ti.com> <8b3d5c23-6784-fb1c-5e14-f3759b10aa0b@xs4all.nl> <20190913133245.6rvajfhlghbocuf4@ti.com> <693c483f-5342-ab0a-7023-222f06bd011e@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <693c483f-5342-ab0a-7023-222f06bd011e@xs4all.nl> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hans Verkuil wrote on Fri [2019-Sep-13 15:34:28 +0200]: > On 9/13/19 3:32 PM, Benoit Parrot wrote: > > Hans Verkuil wrote on Fri [2019-Sep-13 15:14:45 +0200]: > >> On 9/9/19 6:27 PM, Benoit Parrot wrote: > >>> Keep a reference to the currently selected struct vpfe_fmt * object. > >>> By doing so we rename the current struct v4l2_format * member from > >>> fmt to v_fmt. > >>> The added struct vpfe_fmt * reference is set to "const" so we also > >>> constify all accesses and related helper functions. > >> > >> This explains what you do, but not why you do it. > > > > Hmm ok I'll rework this a bit. > > > >> > >> And I think fmt vs v_fmt is *very* confusing naming. > > > > Well in this case v_fmt stands for "v4l2_fmt" and depending on the function > > I was using fmt to either mean a vpfe_fmt pointer or a v4l2_format pointer > > so tried (and apparently failed) to make it clearer which was which. > > Well, v_fmt could refer to either v4l2_format or vpfe_fmt, so that prefix > doesn't help me :-) > > Since 'fmt' was already defined in struct vpfe_device as v4l2_format, I'd > just keep that rather than causing code churn by changing it. And come up > with a better name for when you refer to a vpfe_fmt struct. Fair enough. > > Regards, > > Hans > > > > >> > >> I'd keep fmt as-is, and come up with a different name for the vpfe_fmt > >> pointer. ref_vpfe_fmt? > >> > >> Regards, > >> > >> Hans > >>