Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp534568lqp; Fri, 5 Apr 2024 00:47:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXgMbqtAlXxblTPsCHE8sPKQbCrLvBoTeon+DNcKVeAXQKOrcg0Bt1I7lbApmC8TfLwnJmAnMVYUuv6j/UhWqLs2MAVdN0zjPAQEIxYg== X-Google-Smtp-Source: AGHT+IEpAvzMlRpLlm+S/hHYbeQW3GFmZSuPb9pyrAXN/3nwYtClpG21hpEY2Di44gD+9TPxhOqL X-Received: by 2002:a50:9313:0:b0:56e:241c:325d with SMTP id m19-20020a509313000000b0056e241c325dmr446998eda.8.1712303253273; Fri, 05 Apr 2024 00:47:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712303253; cv=pass; d=google.com; s=arc-20160816; b=WLQAcggHtTBQlIfdXRn2bzGmxb0daJLKUIF0PsORtKpV37znehfxabBZWUnKuHiNBe axlo8QEEpBQePl6LOGdQ80+cRNTNlCXNofSVwmtPNYXMKpC8iD3Ruvjz8ZCAjmLex7lK 2BXSBlnANtQ91HYVfjVgNYGMZL5lJHzX+KWoURotEJJ8vd1IXwibMoZC8FYh10KI6XTY 5RuuIwWhap6pVCzHp1yAWGlj7Yh9azIkauIxgrObhFYj63gH43FpI084xUljP2q7te+2 w39NPrccyuj4t+jF9qU1O9yVW8H8FUbwJu2ImWA5i+BLk3h9ZVqkL6yZ+1JP1E+dwqws 1dFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7++/ztIz/hTa+TXzbNPpItS8PqkiLz9qd/xmbL8Ftrk=; fh=P1EtKtw+tQMtOYvg+tsVJdF0UDhTYh88qffdB3Px3bQ=; b=ghRM3SThOCWYYIuaf4lGUDVQ8Q3B1BaSlsDOxQul6z7WdFEwT4YTHahacrtt7jcn2O OTXuCqVFUCXahqfsC7/X5eoVay+GYc+pejm10tctGb5V2PyUxzwrmo/x9lO6061LVlMY JEj3l+bONMuquFA1KrBLVKvP1bnXrpy7gKiG9uq6zbL6qGwUvtJhOhqLgIuXRsVhLjY0 Mhv6lgk7CDWBw5W+B+p4uzUdHLoY54+ml57cqOuTLmCOtnc3SZjvhsPJedYVjqz8Jfku k+J+YeiZX1Gcrow1jWQSowD8r7cCk4q/Y6Z7Bqhq9+cXzVUTdgslOCjM7aJtD7Hp+PEx U5EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KQmioRG7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-132586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y6-20020a056402440600b0056e32c889desi204872eda.561.2024.04.05.00.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 00:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KQmioRG7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-132586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D25C81F227AB for ; Fri, 5 Apr 2024 07:47:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1B9E13DDBF; Fri, 5 Apr 2024 07:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KQmioRG7" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44A5D12D20D for ; Fri, 5 Apr 2024 07:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303224; cv=none; b=CyLGgA8KDLZjrcn7Anz4CWwir8J56zkecxHivEq8wDs4A54Ot05YyBOqO4bs656BmidxgdNpn/wYln0batFZiiyMe0lNeq1DNaYj0S14Gmhm0wG+AnYBUiJoDEeF8aES+WFZjOgqj2G8DU0EDhK7f5XfKujw8XqtLn7GPDB3qYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712303224; c=relaxed/simple; bh=sAja2W8tdOD+sRzkzExkWlXBX/F6AdCmTbElyysLym4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iEWlnbMPoL2548cqeL+x0RH19fU7MZ+VOdbixbrZFGk7uAFPHMMDwVZbSXaDmsLPZ05w6EU7w/srka8ZKa3yapKgN8NzBMrd3veQ6zGsQyI7pDx+W22B778A1fVb4Orzh1E+5JYzP4wdkuw0Ht5KqajwnDb7zVtjCwReH7PULJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KQmioRG7; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4162b7f18b6so9595895e9.3 for ; Fri, 05 Apr 2024 00:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712303221; x=1712908021; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7++/ztIz/hTa+TXzbNPpItS8PqkiLz9qd/xmbL8Ftrk=; b=KQmioRG7KkUTiQ+SHOD1OkFfoUdBREICXLkp7bBcEXFq/89TZkj9/OUjP5Hb+M+ceO n/IY7fvYOcBhgQF0ybdfGP1CGyEgb4eTXLHjjVB/aCTIXi8z+rEkCqINu5z66tVD9sRo yqrzgQW2wzuDOOHwCFvt8kL8po45fBjfMiqjJ3GjI3bdYzuZQQ+njH5cwavVvHZbN3Id V7fFy4SJMrCT2KOTRFJQwCygJrYpCMI9yPTJnqRJ1H+H9GzaaPNGPocoTlxjtIJitJma OHLGJx25I9aenEpL3E+nsIFisg91MeBdcCqngg9M2zbMfHsGQ99f1xn4Ze67X8aBmQKt 6N7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712303221; x=1712908021; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7++/ztIz/hTa+TXzbNPpItS8PqkiLz9qd/xmbL8Ftrk=; b=wcladdo/fl1/4zNovr15PjCX3Izhul8STYXXG3OiParcyVBwBPAfpdGYdYyty3dtrR xiMS2Wk9JbaCLyDpWjhOKYiIvYux2iQuwhVXMrkE1uVGuU+t1xOCbdCayJ66g6kg2lA6 1GBM50M9IJcad3HUiIgKDy+uB6wRUOXFNvOsHj6M/PsC0Nd9fTwZFFzjGBn8sKSgg7o+ In0W9sgWDO/pSYKFMAvRhIYqIBY24NnE9m43/Xr/yeCECNCnYOzHRBVoTRYt3/BW6JFo xKjhxnscjsB5hY4ZQhrb9U6FaTmdV55ve4xUT2GXZw0urClR2kYld74njWmmK7Bfmfa0 Z2Aw== X-Forwarded-Encrypted: i=1; AJvYcCW9FqCe3a2cr+S40tqtuM9cbPK/GMSWNCREsnzaiaciZOg/dI3p3HaZEfuGCSRZyhJDD8RHfx58eGlpUYik1ea8hkTZKD3ufnEYHPZd X-Gm-Message-State: AOJu0Yy5H6ldXz1oBcr8T433qU1C1u4g8jeniXyUTQqVfkfEqdm2ITWh C+W5+iBExe5u44HI2M6rSHTVWhGx1f/Q7nfgl+R0Sf+r8TBNzfD9 X-Received: by 2002:a05:600c:19d1:b0:412:dcab:7c79 with SMTP id u17-20020a05600c19d100b00412dcab7c79mr530879wmq.10.1712303221502; Fri, 05 Apr 2024 00:47:01 -0700 (PDT) Received: from ?IPV6:2a06:c701:737b:ef00:2bdf:f41a:ebd1:fb2c? ([2a06:c701:737b:ef00:2bdf:f41a:ebd1:fb2c]) by smtp.gmail.com with ESMTPSA id v9-20020a05600c470900b0041568e91c41sm5440953wmo.41.2024.04.05.00.47.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 00:47:01 -0700 (PDT) Message-ID: <9f9d1d2b-dd8c-4325-abb4-4933d7e709ce@gmail.com> Date: Fri, 5 Apr 2024 10:46:58 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/6] staging: pi433: Remove duplicated code using the "goto" error recovery scheme. To: Dan Carpenter Cc: gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, andriy.shevchenko@linux.intel.com, robh@kernel.org, felixkimbu1@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240402111414.871089-1-ikobh7@gmail.com> <20240402111414.871089-6-ikobh7@gmail.com> <068f3705-9f9b-4d61-be50-a131b9598703@moroto.mountain> Content-Language: en-US From: Shahar Avidar In-Reply-To: <068f3705-9f9b-4d61-be50-a131b9598703@moroto.mountain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02/04/2024 19:46, Dan Carpenter wrote: > On Tue, Apr 02, 2024 at 02:14:13PM +0300, Shahar Avidar wrote: >> pi433_init had "unregister_chrdev" called twice. >> Remove it using goto statements. >> >> Signed-off-by: Shahar Avidar > > Your commit message needs to mention all the other changes you made, > especially the bug fix. I feel like you're doing too many changes > really. Just use the gotos to clean up but don't re-order the calls. Thanks again for your inputs. I've reverted some of the changes & split the 5th patch. > > You need to add a Fixes tag. > I've added the "Fixes" tag, so as the "Reported-by" tag, naming you. >> --- >> v2->v1: >> Followed by Dan Carpenter's comments: >> - Remove empty "fail" goto tag. >> - Reorder pi433 init & exit calls so they have reverse order. > > Keep the init calls the same. Re-order the exit calls. It's a bit of > a gray area if you can re-order the exit calls in this same patch. Do > it in a separate patch just to be safe. > >> - Add "unreg_spi_drv" goto tag. >> - Check "debugfs_create_dir" return value. > > No. This is wrong. Debugfs function are not supposed to be checked. > https://staticthinking.wordpress.com/2023/07/24/debugfs-functions-are-not-supposed-to-be-checked > Great blog post again. I'm learning. >> - Update "if" statments for consistency. > > I like this cleanup, but it's not worth the effort. Just leave it > as-is unless you really really need to change it. Do it in a separate > patch. Reverted. > > What qualifies as One Thing Per Patch is a bit of gray area. Greg tends > to want things split up into tiny patches. You have to know your > maintainer. > > regards, > dan carpenter > -- Regards, Shahar