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 2CDDFC27C65 for ; Tue, 11 Jun 2024 21:24:25 +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=P5/cf087lsonFq3Z/OHIQo5HeRrhl59vRbLzq1kztO8=; b=Dj0P8B1FzV+kpXZWE58wsbnMJ6 /rRwblteUAeuQt/gGaDQxPaTjNMFxPVmcEY6BxrkhGQf28oDfITS9ouuSiinWAPK396/6wzt5YW3Y iDtch83Qc+/jqePEPvuDvSlOFkAnu+kxEaGjjM9eBJJ+Rr3Ico/OdYrekXi/CuzEC5ADuLYLbcZJd k2nqjBjcjvv5aubklvhq+d0vJf7z6F+zy5BbKBbqRtWjGcteynRQ6hMYxEMlysa5+8GehDHk3B4WA hc6dB5WXn/V4/zQEsdgLREj+LZo/QL0d0944jBmbncr8K75CTAAhjXg44evE54m4h6HOgjprZH6iA Y+omAXhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sH8yS-0000000AGy7-0VGn; Tue, 11 Jun 2024 21:24:12 +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 1sH8yO-0000000AGwl-2etN for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2024 21:24:10 +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 1B388512; Tue, 11 Jun 2024 23:23:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718141034; bh=lu7lClR9KWRTI2nX+R6kZClhinE3tAQOfyYA/krpgeI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p0NG1hjhn9fzYGOSIIV7y8bu/ypesq6oP8OQRAV2lHOVTEpdybfjQ8Rto6dnOThY9 ROdjY+E8TIZ0Du+39WLtcJyaXDH3VUnTl/v3mQzwVDHIvxDUESX8ee7anOMywRC/YE YObsf+ejpWok04H0MrtTtZ0GyDv8lQMipOxgokA0= Date: Wed, 12 Jun 2024 00:23:47 +0300 From: Laurent Pinchart To: Dan Carpenter Cc: Stefan Wahren , 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: <20240611212347.GG10397@pendragon.ideasonboard.com> References: <20240610210220.95524-1-wahrenst@gmx.net> <20240610210220.95524-8-wahrenst@gmx.net> <01190bf2-c698-423a-b587-c80ce5d92bb8@moroto.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <01190bf2-c698-423a-b587-c80ce5d92bb8@moroto.mountain> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_142408_834780_FFB67175 X-CRM114-Status: GOOD ( 12.09 ) 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 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. -- Regards, Laurent Pinchart