From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E42CD35202A; Thu, 18 Jun 2026 11:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781783169; cv=none; b=qRPE6yfWS8U5LnwDFrCnqVHvMXcpHERL9HuU2k2Jbme5Q0PLmdj++FLPx9coUwCCe+za+o58m+W3LCD3bI3KibNqFqz5JMZheubx3R/WTeKK9W9JJjmkznJRkOGjN4NlXwNsk0/nec6f8rlpomswVhDEFAdwpcIdhA7XZ8eHLVk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781783169; c=relaxed/simple; bh=zBOxcc15XlTx9hZEwn04/icC6SbcUPCa+Fc3jTXc0OM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kbWt42Grl+Kc53JKRqYd9447c3emYmszYHuzXx2wd6E7R4RNts5dKjNGFkRLEfnrbMWgT3kZVmS7sHlDw4xzoEaXGrObYCoG39vKSmAvvEfSOSDRq63MrlbxUNvSmdv1vf+S+w+UeazPY/iwmgv+kZIR4cVqR0Dq7jQZ0V+EAQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=g+DnJLHq; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="g+DnJLHq" Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B24F741; Thu, 18 Jun 2026 13:45:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781783130; bh=zBOxcc15XlTx9hZEwn04/icC6SbcUPCa+Fc3jTXc0OM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+DnJLHqxrGKLmcVbuqnA4giZZUpAPBGWHatK6JJSVaHjpOO4GGDYDnRWDjDEicSn uBmk18TKECSFoE+uGDj/h8P7jR70L1qP5ygdTDCy3OptNv5BxoOF5UROdkAoTpgxHt nUKKR4Nxt5gN9Z5lUJFTHBHme9XQ97xc6BVc1H/I= Date: Thu, 18 Jun 2026 14:46:03 +0300 From: Laurent Pinchart To: Vladimir Zapolskiy Cc: Elgin Perumbilly , "sakari.ailus@linux.intel.com" , Tarang Raval , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans Verkuil , Hans de Goede , Mehdi Djait , Sylvain Petinot , Benjamin Mugnier , Bryan O'Donoghue , Himanshu Bhavani , Heimir Thor Sverrisson , Jingjing Xiong , Svyatoslav Ryhel , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 2/3] media: i2c: add os02g10 image sensor driver Message-ID: <20260618114603.GA3345533@killaraus.ideasonboard.com> References: <20260424092554.26130-1-elgin.perumbilly@siliconsignals.io> <20260424092554.26130-3-elgin.perumbilly@siliconsignals.io> <421ae63a-88c6-4e81-8478-7f581357676b@linaro.org> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Thu, Jun 18, 2026 at 02:06:20PM +0300, Vladimir Zapolskiy wrote: > On 6/18/26 09:22, Elgin Perumbilly wrote: > > Hi Vladimir, > > > > Thank you for the review. > > > > I have addressed all of the comments except for two, where I am not entirely > > sure about the requested changes. Could you please take a look at the points > > below and let me know your opinion? > > > >> On 4/24/26 12:25, Elgin Perumbilly wrote: > >>> Add a v4l2 subdevice driver for the Omnivision os02g10 sensor. > >>> > >>> The Omnivision os02g10 is a CMOS image sensor with an active array size of > >>> 1920 x 1080. > >>> > >>> The following features are supported: > >>> - Manual exposure an gain control support > >>> - vblank/hblank control support > >>> - vflip/hflip control support > >>> - Test pattern control support > >>> - Supported resolution: 1920 x 1080 @ 30fps (SBGGR10) > >>> > >>> Signed-off-by: Elgin Perumbilly > >>> Reviewed-by: Tarang Raval > > > > ... > > > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >> > >> Please sort the list of includes in alphabetical order, also you > >> may consider to shrink the list by removing quite many inherited > >> includes. > > > > Some maintainers prefer the "include what you use" approach, like Andy, > > so I added all the headers that are directly used. Should I now remove > > any inherited includes? > > Yes, here opinions may vary, that's why I asked for sorting and to Sorting is a good idea. > consider to remove some of the redundant headers. In my personal opinion > this type of excessive information is not needed, especially if it is > justified only by probable and far future trivial clean-up work. I typically ask for a "include what you use" approach too, to avoid build breakages. It's not only a matter of future work, but indirect includes can also vary based on the kernel configuration (and the architecture). > >>> +#include > >>> +#include > >>> +#include > >>> +#include > >>> +#include > > > > ... > > > >>> +static int os02g10_set_framefmt(struct os02g10 *os02g10, > >>> + struct v4l2_subdev_state *state) > >>> +{ > >>> + const struct v4l2_mbus_framefmt *format; > >>> + const struct os02g10_mode *mode; > >>> + int ret = 0; > >>> + > >>> + format = v4l2_subdev_state_get_format(state, 0); > >>> + mode = v4l2_find_nearest_size(supported_modes, > >>> + ARRAY_SIZE(supported_modes), width, > >>> + height, format->width, format->height); > >>> + > >>> + cci_write(os02g10->cci, OS02G10_REG_V_START, mode->y_start, &ret); > >>> + cci_write(os02g10->cci, OS02G10_REG_V_SIZE, mode->height, &ret); > >>> + cci_write(os02g10->cci, OS02G10_REG_V_SIZE_MIPI, mode->height, &ret); > >>> + cci_write(os02g10->cci, OS02G10_REG_H_START, mode->x_start, &ret); > >>> + cci_write(os02g10->cci, OS02G10_REG_H_SIZE, mode->width, &ret); > >>> + cci_write(os02g10->cci, OS02G10_REG_H_SIZE_MIPI, mode->width, &ret); > >>> + > >>> + return ret; > >> > >> Just "return 0" here, and remove the local variable. > > > > Could you clarify why this should return 0? The local ret is passed to all > > cci_write() calls so that any write error is propagated. Returning 0 here > > would appear to suppress those errors and always report success. > > My bad, yes, here please leave 'return ret' as is, I was confused and > misleaded by initialization of the local variable to zero, which is > redundant, and I'd suggest to remove this initialization. -- Regards, Laurent Pinchart