From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lb3-smtp-cloud6.xs4all.net ([194.109.24.31]:39992 "EHLO lb3-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965879AbbBDOkc (ORCPT ); Wed, 4 Feb 2015 09:40:32 -0500 Message-ID: <54D22F4F.5000302@xs4all.nl> Date: Wed, 04 Feb 2015 15:40:15 +0100 From: Hans Verkuil MIME-Version: 1.0 To: William Towle , Jean-Michel Hautbois CC: linux-kernel@lists.codethink.co.uk, Linux Media Mailing List , Guennadi Liakhovetski , Sergei Shtylyov Subject: Re: [PATCH 4/8] WmT: m-5mols_core style pad handling for adv7604 References: <1422548388-28861-1-git-send-email-william.towle@codethink.co.uk> <1422548388-28861-5-git-send-email-william.towle@codethink.co.uk> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On 02/04/15 15:14, William Towle wrote: > > Hi Jean-Michel and others, > > On Thu, 29 Jan 2015, Jean-Michel Hautbois wrote: >> First of all, this subject puzzles me... What means WmT ?? > > That's just my initialism, to differentiate my work from that of > colleagues'. I'll submit without those in due course (and SOBs). > > >>> - fmt = v4l2_subdev_get_try_format(fh, format->pad); >>> + fmt = (fh == NULL) ? NULL >>> + : v4l2_subdev_get_try_format(fh, format->pad); >>> + if (fmt == NULL) >>> + return EINVAL; >>> + >> >> Mmmh, Hans probably has an explanation on this, I just don't get a use >> case where fh can be NULL... So can't see the point of this patch ? > > There isn't currently a case where fh can be NULL, but we do > introduce them into rcar_vin_try_fmt() in the places where we add > v4l2_subdev_has_op() tests, which I am hoping to clarify. > > I have seen Guennadi's suggestion regarding wrapper functions, and am > also looking at the patchset Hans mentioned. In particular, the > description of "v4l2-subdev: replace v4l2_subdev_fh by > v4l2_subdev_pad_config" stands out as relevant. FYI: I've rebased my branch to the latest media_tree master. It's available here: http://git.linuxtv.org/cgit.cgi/hverkuil/media_tree.git/log/?h=subdev2 (the last patch fixing adv7180 conflicts will of course be properly merged in the final version). I might have time tomorrow to work on this a bit more. I won't accept wrapper functions: this mess has gone on long enough and I want to see a proper solution where the old non-pad functions are removed so everyone uses the same APIs. Regards, Hans > > ...Thanks all, I will let you know how I get on. > > Cheers, > Wills.