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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0820DC47DD9 for ; Wed, 28 Feb 2024 13:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S95BCWLk7xXAQrylsDo2z00yvLHsjOZ9NCnPy19w1T0=; b=BGy1SCRcYVMnRo 32mCP/FAmBInoM3DDhW9ixCBnWCGTblwVOUcFBr8XgwjirhSerF/Ljga5CbS/F2vFPAfw+OfACmnx i1bqVMOUjWq9Dlro5I/HWiwO3dVqdlf3R4iA9Aa0TZx0KXcgFBlz17ROzW0/KVRgXaxQ2rlW0WU1u CJFcnjviUzL3sdeuxOD8jXlma41eV7rhkVxqZR0XF0daW5IGWq7nIFXQ5OnEsZxcGSPFlxoQ/R9VF 8IkE7OS1cky3JrP9ybMgC5144pC2ZuBspMdrEhiOBOXtrqa2qyXiblrdhJFb5aW06zZ7E6rQ+KcFI Tg4ffaFTwN32O9Hva89Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfK96-00000009VRc-1iz1; Wed, 28 Feb 2024 13:38:52 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfK92-00000009VQM-3XZj for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 13:38:50 +0000 Received: from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi [89.27.53.110]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E8272B3; Wed, 28 Feb 2024 14:38:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1709127513; bh=9L/WArr+jbZ+dLvbzeoxB0IrvGQgJwXUQ6aC4idN5D0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h3VTok+zTYvQKTpNbUHZt/7WIMkca+g2lCK7Q+UDYp0kz5kVvETQjmJd9LcoW5zs1 v8Kmu9rQjvkoLhsFmhL/bw/536mtD+JZ4ec+fD0iWclm1W7z1++izZkI8ixbjVnxk8 JVslvs6J+GqccIIRnwF2NoMdGSOeUA1EZfcJLago= Date: Wed, 28 Feb 2024 15:38:47 +0200 From: Laurent Pinchart To: Kieran Bingham Cc: Jacopo Mondi , Sakari Ailus , Daniel Scally , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nayden.kanchev@arm.com, robh+dt@kernel.org, mchehab@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jerome.forissier@linaro.org Subject: Re: [PATCH v2 3/5] media: mali-c55: Add Mali-C55 ISP driver Message-ID: <20240228133847.GA9863@pendragon.ideasonboard.com> References: <20240214141906.245685-1-dan.scally@ideasonboard.com> <20240214141906.245685-4-dan.scally@ideasonboard.com> <170912697659.1011926.1657561990919797055@ping.linuxembedded.co.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <170912697659.1011926.1657561990919797055@ping.linuxembedded.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_053849_049837_9D48E1BA X-CRM114-Status: GOOD ( 18.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 28, 2024 at 01:29:36PM +0000, Kieran Bingham wrote: > Quoting Sakari Ailus (2024-02-28 13:11:39) > > On Wed, Feb 28, 2024 at 01:50:14PM +0100, Jacopo Mondi wrote: > > > > > +const struct mali_c55_fmt *mali_c55_cap_fmt_next(const struct mali_c55_fmt *fmt, > > > > > + bool allow_raw, bool unique) > > > > > +{ > > > > > + if (!fmt) > > > > > + fmt = &mali_c55_fmts[0]; > > > > > + else > > > > > + ++fmt; > > > > > > > > fmt++, please. > > > > > > Can I ask why ? (here and in the next occurrences you have reported) > > > > It's much, much more common and using that form makes the code easier to > > read. The rest of the driver primarily uses variable++, too, AFAIR. > > > > So you should use ++variable only when you need it. > > I don't think this is a hot path, but I'll never forget my C tutor > telling us how ++i is more efficient than i++ somewhere to do with the > opcode ordering, and not having to make a copy [*1] > > Though I bet any clever optimising compiler could spot this anyway. > > [*1]. Whatever plausibility there is based on a 20 year old memory and > should be verified elsewhere. In C I wouldn't expect any practical difference. C++ is a different matter, as the prefix and postfix operators can have different implementations. -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel