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 7E067C27C79 for ; Tue, 18 Jun 2024 01:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc: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=0QU7WRshp9pBpMa2reRaJ8DfRYg4gmaN/JKjLs39hPE=; b=CZ5YL1nV8gs36urzmKBOwO2SyJ 4DiDpjQmj3JGWbIIF6K3D/u3XBZx3NjNk9Rnh/SIDcvuTlu3ICEnqu4ApiySQOcWclTEUPO9nATBu joMcNBZ+kfjf81vrEjc9dX0E7zW67EpfPQbyWm26GpnIUydI+FiG2JGpqc+DP5fD5cXfny/TLYiXZ kYAHPvxnFqikDZy+6lnsDaOR/YfMYHzXme1N3VB2QdYpis4LMB+Prekr+l6Py95GXv6OgQ3xdwswu OZKpFxv7pV/7PRNLGzQKBo4wQxfOx5kP9J69yjwR0A5AeDe3VTVm+oMTw0EKo67TNmt2AZ6KEbKDp nRo7DGDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJNQs-0000000DA2Q-0vLQ; Tue, 18 Jun 2024 01:14:46 +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 1sJNQo-0000000DA0c-2bbY for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 01:14:43 +0000 Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CBBFA7E1; Tue, 18 Jun 2024 03:14:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718673263; bh=LpKGdcyMCbqIMJ8dif2EM/QbCokrPjd/dBDjqDCknDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l8LeyYtKBybPLH6+86JBl8RIYu4HBnuxcxBYDHtfd+UldnI+JivNZdDwSDHSkv1gV hLqlbOG917G5mXS7eHsdfKXWAIZdIUXA1TducAyIPytn516Mdj/fi5kjH6JNyYoud+ F3Itr6rwK6MQHTd4p/Ypx4BtJYxvm9PL/jIRE5oY= Date: Tue, 18 Jun 2024 04:14:18 +0300 From: Laurent Pinchart To: Stefan Wahren Cc: Dan Carpenter , Greg Kroah-Hartman , Florian Fainelli , Umang Jain , linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V2 07/10] staging: vchiq_arm: Reduce indentation of service_callback Message-ID: <20240618011418.GF21998@pendragon.ideasonboard.com> References: <20240610210220.95524-1-wahrenst@gmx.net> <20240610210220.95524-8-wahrenst@gmx.net> <01190bf2-c698-423a-b587-c80ce5d92bb8@moroto.mountain> <20240611212347.GG10397@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240617_181442_820916_FB1B39A9 X-CRM114-Status: GOOD ( 15.73 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 12, 2024 at 07:16:16AM +0200, Stefan Wahren wrote: > Hi, > > Am 11.06.24 um 23:23 schrieb Laurent Pinchart: > > On Tue, Jun 11, 2024 at 09:04:28AM +0300, Dan Carpenter wrote: > >> On Mon, Jun 10, 2024 at 11:02:17PM +0200, Stefan Wahren wrote: > >>> The service_callback has 5 levels of indentation, which makes it > >>> hard to read. Reduce this by splitting the code in a new function > >>> service_single_message() as suggested by Laurent Pinchart. > >>> > >>> Signed-off-by: Stefan Wahren > >> To be honest, I liked the version of this patch which Laurent didn't > >> like. Even after pulling this code into a separate function, I'd still > >> support flipping the conditions around and adding the goto... > >> > >> Laurent, you really didn't like the goto? > > I won't nack it, but I really think gotos seriously hinder readability, > > with the exception of error paths. > > > so at least you both are fine with the split approach here (assuming the > Dan's comment will be fixed in V3)? Fine with me. -- Regards, Laurent Pinchart