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 2902DC27C53 for ; Wed, 12 Jun 2024 05:52:21 +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=xu6qvgKjDbbrX0YieinjCnM1/XJxdkg3zPM9JY4YbrM=; b=ViXXm6sMpQrj2uAPoc/g/1qh6x VQ2eCszOmNTv+spBY3L6656xCWZ4mMnhHjswCqs5lMW9uUl8zoQ+yCZjceI85DjL08TLAY5lugqrn jCMVixzXl4w0GpppgJuSzQ8E+l6NVnrL93f3QFrIGD49aOOVLQigyUnGpHw4gp9iWo5CCoQEICzdW 2myX/N6lArIJJ7GSrViv1rcQ5DGnuDIEPHEqGm56t4V4DVZQwAaBA7ckZQd3m5KdDuF8P0JRw7OOG YXtw1ifO5OrJSOdPZFnTj2stfKMIwsIm+/ldMfQHU84tonpBonZaVVV7CJFri7vYzpxbq8GQ9yWX7 yKwfnZ+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHGu0-0000000BCLa-1UDF; Wed, 12 Jun 2024 05:52:08 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHGtx-0000000BCKY-2tlK for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2024 05:52:06 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52bc035a7ccso2104272e87.2 for ; Tue, 11 Jun 2024 22:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718171523; x=1718776323; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xu6qvgKjDbbrX0YieinjCnM1/XJxdkg3zPM9JY4YbrM=; b=Fq35fxYqHFqQLQpjTe4P4mBIhuv5S4xhAWTl9x+DHJ4qctiTC2Njs5P3M+sxglBe+F CDOk6jRV6jvA7hc77jtJ6FcQ8mSUT75YkGrYnfujx4DpmQPlTGsB4Ol4HxNCbVjGvIPk a6Xng03v2O43D5QtNwiVfKenfVIEjMd9ZbHdBe9w5ngZrgjkjsGkYBqN5kR3iJQ0G0eH syPJWqkx4zZMSgwWavO11747pWy4v7a+Unwi9ToOVnUiUBkdyruMk7rRQBxOUV9WoSP5 rKVEC0YJvybxP+oQOnHJqc+FHkoavHVYeAHMYNZHsMsVQDP8o3MJHPVDP1tmJLIgENs5 ClAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718171523; x=1718776323; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xu6qvgKjDbbrX0YieinjCnM1/XJxdkg3zPM9JY4YbrM=; b=rmBJWqdfVaPVU5aUsOq06JixtqsdS1Ohrfrae7tG67QA3rl2jELKslqKHs3vw5m0zs RPnRi0kkktOpIt6iZCrV03bxHUHjgRFgECoJo3iWEimd4acwItxGg1yFQKQtNSu4lKFf GA0A6Q4aFaV7BS0QUM49kdVnHStqLjEwGIovqRhLDJxFfKdHH8DSISrJkcAzmxUEwGCC qlJ+IdZhc5Ihwdns/nQhWPRwjkG6NHJ6h6CXtJee9cQbOBLyk9C0AiUoe2Iyx7lte7Pf dEBZvRQmlKUsKzrK16tJU0Lg0nQrNdpKlUFRTvCzMXrlGftjjDVNBUUa2f9OY7JtH5M1 rGwQ== X-Forwarded-Encrypted: i=1; AJvYcCVzd+8rjQ37qDdx5EPp2V0XBbxdmPTzJrMvVxArNTMqzektefhP85kNdqnE0tkGJxKP0tVOVYUiN/x3nN2p9o7I1vfYkFXth2QgBsqrPuhQjghUA0w= X-Gm-Message-State: AOJu0YyXBTuA8LjDfjMwDplKyr9DanNGrDyDx7bYDECg9OA7WpcSoo0z w80aGDdI9yUg/i3XQqHKgZ9BKxbjHqlaFfHNW3O0jErMC35l0mn28AUwD0Q2x2c= X-Google-Smtp-Source: AGHT+IEMv2WQXJmHy+VtqH/aJvnGmRbaK8iEAZEr9i2rlYc4Tt6nVmQ8wQ7fMKuercu2cza5UfG45g== X-Received: by 2002:ac2:4344:0:b0:52c:89ff:10bf with SMTP id 2adb3069b0e04-52c9a406871mr304623e87.67.1718171522911; Tue, 11 Jun 2024 22:52:02 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422874e74c7sm11430045e9.47.2024.06.11.22.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 22:52:02 -0700 (PDT) Date: Wed, 12 Jun 2024 08:51:57 +0300 From: Dan Carpenter To: Laurent Pinchart 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: <96339b9a-e523-4009-b907-3b9502bbe9b0@moroto.mountain> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240611212347.GG10397@pendragon.ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_225205_753063_A770B032 X-CRM114-Status: GOOD ( 18.59 ) 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 12:23:47AM +0300, Laurent Pinchart wrote: > 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. Hm... I guess I only hate backwards gotos (ones that go up instead of down). To me this one is kind of like a goto unlock. It's slightly more complicated than just an unlock because we add a completion as well... I don't have strong feelings about it, I was just interested. regards, dan carpenter