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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 604C0C64E7B for ; Mon, 30 Nov 2020 13:49:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D206920727 for ; Mon, 30 Nov 2020 13:49:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oo7W5D5o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D206920727 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mLDx+R852Gsj0hUjMBMOgjIHhSDNEOJVWcpJ8n2dIIY=; b=oo7W5D5oluUxb66OFCtEDUJ9R WsPo62umFbxIgrzn5WVxqxV+lfhu2im+6djrR4CxmG2ab9zRwzWGYG67Q3EjpS3TcrJsLGpyQaIQd pOkWsU3JWkUpbc1vjNf1dE434smkpzFuJi5cB9v9EEeOvdFywp2Y/8h3WaPQ44YJDQAIx0iWuGwK2 m5d+PTWBNlo3TMRHjbNfApsavs4FmMC0RXePWCntISYGH2zcZLYmCyB0Wqoj5/6piyBJ6F9oBHM1c EfIgpTYWwDGkZq/d5tnDCXNz+2kMgPBUR04tndpIfnhHdaYTzht4hsk1jAPg8brYXHgK+C6UT1Ndw U31bfc30Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjjXJ-0006EI-Iz; Mon, 30 Nov 2020 13:48:13 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjjXH-0006D0-0d for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 13:48:12 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A133A20006; Mon, 30 Nov 2020 13:48:05 +0000 (UTC) Date: Mon, 30 Nov 2020 14:48:04 +0100 From: Paul Kocialkowski To: Sakari Ailus Subject: Re: [PATCH v4 2/2] media: i2c: Add support for the OV5648 image sensor Message-ID: References: <20201128143350.531460-1-paul.kocialkowski@bootlin.com> <20201128143350.531460-3-paul.kocialkowski@bootlin.com> <20201130092802.GU3940@paasikivi.fi.intel.com> MIME-Version: 1.0 In-Reply-To: <20201130092802.GU3940@paasikivi.fi.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_084811_151969_BF3DCAAD X-CRM114-Status: GOOD ( 17.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Hans Verkuil , Rob Herring , Thomas Petazzoni , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: multipart/mixed; boundary="===============3115939355001830440==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3115939355001830440== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CRkzk4adFE2kMeBa" Content-Disposition: inline --CRkzk4adFE2kMeBa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Sakari, On Mon 30 Nov 20, 11:28, Sakari Ailus wrote: > Hi Paul, >=20 > Thanks for the update. I have a few comments on the driver, too. Thanks for the review! [...] > > + ret =3D ov5648_write(sensor, OV5648_GAIN_BLUE_MAN_L_REG, > > + OV5648_GAIN_BLUE_MAN_L(blue_balance)); >=20 > return ... >=20 > Same below (and above). Well I don't think that makes any functional difference, right? My personal preference is to have explicit checks even at the end of functi= ons for symetry and alignment with other blocks. If it's okay, it'd like to keep it as-is. But if that's against kernel codi= ng style guidelines, I won't argue more. [...] > > + /* Gain */ > > + > > + ctrls->gain_auto =3D > > + v4l2_ctrl_new_std(handler, ops, V4L2_CID_AUTOGAIN, 0, 1, 1, 1); > > + > > + ctrls->gain =3D v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 16, 10= 23, > > + 16, 16); > > + ctrls->gain->flags |=3D V4L2_CTRL_FLAG_VOLATILE; >=20 > Note that ctrls->gain may be NULL here. Please move after the handler's > error check. Same for link_freq and pixel_rate. You're right, this is not very safe, I'll fix it. [...] > > +static int ov5648_remove(struct i2c_client *client) > > +{ > > + struct v4l2_subdev *subdev =3D i2c_get_clientdata(client); > > + struct ov5648_sensor *sensor =3D ov5648_subdev_sensor(subdev); > > + > > + clk_rate_exclusive_put(sensor->xvclk); >=20 > This seems to be extra now. Good catch, that's indeed a mistake! Cheers and thanks, Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --CRkzk4adFE2kMeBa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAl/E+BQACgkQ3cLmz3+f v9GHhAf8CLLaWEXbSysD7y5nk1maTTqdd5IRG0Y1IEIzEZI9RSDhumcq+i8ug3sc zxQuUnXASqk2Cd+gP9+gOdMEKXPG6MIi5rwPvdbQcgvYN8ueDvQcuzF+bWim3aQ9 LIbdS9QJgNmSwuC1r6yzQb1nDizd3pcJ5kLHcrX7BCq8MgAu1bTO7ifB8jKU00RY cHV5G4FfNz9iDPeDpxQ2RFsEHSPqYN0dd1vXG0a6YYsWfhVw4fuZeXN/DxcBQhV7 NKo0ORcHSrjVTcRSVloT6CB6pKWJ3xgGt8Ls/lcXxF/7dlNg3pvVAMMHLpSTowpj t+atTLuKufo/bs9A7/FM+ING5S+ndA== =ATUE -----END PGP SIGNATURE----- --CRkzk4adFE2kMeBa-- --===============3115939355001830440== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3115939355001830440==--