Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2705074rwb; Fri, 11 Nov 2022 13:28:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf78+8LvN8em1kPb5mr6PJwXnSLcol7jhC1OLQ/SWMFl+vy9CsGckSFF8Ndr3TOHVzAwsB4W X-Received: by 2002:a17:90a:3cc4:b0:212:e52e:dfeb with SMTP id k4-20020a17090a3cc400b00212e52edfebmr3726897pjd.227.1668202118656; Fri, 11 Nov 2022 13:28:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668202118; cv=pass; d=google.com; s=arc-20160816; b=WRJhlo55YmLbFgHazj4BBKSqpwDe6OVWINpp7jS6EMYRX8i3OloPyvj7RaEVinsdLn Nz5lc7klLg/XGqO7jPYXPNTLa0zIxllOUiUu/M5hHADWMeFUoGQKYvhhdHpYq9Kh9oqW ArF1U6pqEA63J3zkizbRlGhnCQSWenBU/EFLgRVTqM3fHyLGlHooPKW0qsOzYEokSIFO j+YQiWN7yCLgsP4hLCpXX0DLKhoqkAZD8K7xWUmujISndw6MuxnPi+SphnArEXoYeifi ytubsa++mIhqXzD2ixbg2O0ry4uNsKCksu9E2cU+wX++epBpaVzwD7l3qDmOvhPPksIz Y+kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LqeaIvzF3E4QocGyD6uVMqLxFSDHdJcGyp7GpJMTECg=; b=dZke88ACUDhDzMxzdIgY4NkNzZgIAx3dBYhWE3lqfRerTiHFCRkxTL02SDDEofsfx6 1XnuGu9bF1LnlC9kmLkSDWtQeyxqDF14Gw16AKoV83CO3FRSMhdW0z4CoBBo1wqVqto6 TG9Ounhd5V9sQm5b1hAR6ZM5LDHSav84nmqZlmoSruyZF8Eb8mESt3q/1tE0vuUFtCg8 ROLYhVGVP93ODxq07QJsx6KAb99OFdZxIY8hiVh9Nx4SIvPseMEhLs2L0NTiVLC4tcoC T+2QbO7hMfRxn+AvLs/9iRAKOCOXyufR7MECxXMJqEEesqc4l7esTYzohh6/NXT/zLO+ 5o3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=VR87xCsf; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a63b44d000000b004707d555c19si3576880pgu.105.2022.11.11.13.28.27; Fri, 11 Nov 2022 13:28:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=VR87xCsf; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234237AbiKKTq3 (ORCPT + 90 others); Fri, 11 Nov 2022 14:46:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233886AbiKKTq1 (ORCPT ); Fri, 11 Nov 2022 14:46:27 -0500 X-Greylist: delayed 17040 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 11 Nov 2022 11:46:26 PST Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F7F0814C8; Fri, 11 Nov 2022 11:46:25 -0800 (PST) Received: from hillosipuli.retiisi.eu (82-181-192-243.bb.dnainternet.fi [82.181.192.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sailus) by meesny.iki.fi (Postfix) with ESMTPSA id EF7E4205E4; Fri, 11 Nov 2022 21:46:22 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1668195983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LqeaIvzF3E4QocGyD6uVMqLxFSDHdJcGyp7GpJMTECg=; b=VR87xCsfjrCBXeLraA2Y/tzT0CcYjCd3y4f0ma2d9zbysDJImCvhfC8WCPuMBBowZ+ttWV jzVYy2SQ0O/klT8mIQOe9K8Jh91SQ6onN13JeVzi7fSetdJa63bUgm0/hWglqhL3eHnd3a y7mONW2UsTpClUUmWEnP7kIq1uT1umM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1668195983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LqeaIvzF3E4QocGyD6uVMqLxFSDHdJcGyp7GpJMTECg=; b=BaAuZxrTBqM1SaxwNzFT2Bfgtik/y3mQtd9KYX05kUBfJ7jLcY2SPqTg0HxAuh3ImZql3T UQxq6KqlnhjgyIguJjWINYQaVKGrrww8Ya1Cpzj9MlddyYGkha/8byfnGofEUBfsuq/Vmc OP+tVabDuwC+Y9/c4sRJ241cXFp5sS4= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1668195983; a=rsa-sha256; cv=none; b=Y7wCReQexC9GavD6JsJRbFuTxOXU38neW4npJ2cLvwq0JemZR9xgF7nmh1U0xDCL6lEUII U4ibSurvLe0arIg0Vo/IVbd/w9atQRZgPtp7hrTmiYyDrvLYY7BJGoI3UUOANQFOS/gOEa QxCuqWnheiSSXpY1d06XrOogQi3mm1A= Received: from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.eu (Postfix) with ESMTPS id 797AF634C98; Fri, 11 Nov 2022 21:46:22 +0200 (EET) Date: Fri, 11 Nov 2022 21:46:22 +0200 From: Sakari Ailus To: Andy Shevchenko Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tianshu Qiu , Shawn Tu , Bingbu Cao , Mauro Carvalho Chehab Subject: Re: [PATCH v1 2/8] media: ov2740: Replace voodoo coding with understandle flow Message-ID: References: <20220726120556.2881-1-andriy.shevchenko@linux.intel.com> <20220726120556.2881-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 11, 2022 at 05:30:09PM +0200, Andy Shevchenko wrote: > On Fri, Nov 11, 2022 at 05:02:22PM +0200, Sakari Ailus wrote: > > Hi Andy, > > > > On Tue, Jul 26, 2022 at 03:05:50PM +0300, Andy Shevchenko wrote: > > > Besides not being understandable at the first glance, the code > > > might provoke a compiler or a static analyser tool to warn about > > > out-of-bound access (when len == 0). > > > > I've never seen one. > > > > However the same pattern is repeatedly used by many, many drivers and > > addressing just one doesn't make much sense. > > > > The proper way to fix this would be to have a set of common CCI (Camera > > Control Interface) functions that all drivers could use, and then switch > > the drivers to use them. > > > > This isn't currently a great fit for e.g. regmap but perhaps something > > light on top of regmap-i2c could do the trick? > > So, then we can skip this one, right? Yes. > > > The rest of the set seems good to me. > > Thank you for the review, can you apply them, or should I send a v2 with > dropped first patch? Already done. I'm still doing more testing before pushing. Thanks! -- Sakari Ailus