public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Shahar Avidar <ikobh7@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
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
Subject: Re: [PATCH v2 5/6] staging: pi433: Remove duplicated code using the "goto" error recovery scheme.
Date: Fri, 5 Apr 2024 10:46:58 +0300	[thread overview]
Message-ID: <9f9d1d2b-dd8c-4325-abb4-4933d7e709ce@gmail.com> (raw)
In-Reply-To: <068f3705-9f9b-4d61-be50-a131b9598703@moroto.mountain>

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 <ikobh7@gmail.com>
> 
> 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 <dan.carpenter@linaro.org> 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


  reply	other threads:[~2024-04-05  7:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 11:14 [PATCH v2 0/6] staging: pi433: Remove duplicated code using the "goto" error recovery scheme Shahar Avidar
2024-04-02 11:14 ` [PATCH v2 1/6] staging: pi433: Rename struct pi433_device buffer field to tx_buffer Shahar Avidar
2024-04-02 11:14 ` [PATCH v2 2/6] staging: pi433: Rename struct pi433_device instances to pi433 Shahar Avidar
2024-04-02 11:14 ` [PATCH v2 3/6] staging: pi433: Replace pi433_receive param void type to struct pi433_device Shahar Avidar
2024-04-02 11:14 ` [PATCH v2 4/6] staging: pi433: Rename "pi433_dev" of type "dev_t" to "pi433_devt" Shahar Avidar
2024-04-02 11:14 ` [PATCH v2 5/6] staging: pi433: Remove duplicated code using the "goto" error recovery scheme Shahar Avidar
2024-04-02 16:46   ` Dan Carpenter
2024-04-05  7:46     ` Shahar Avidar [this message]
2024-04-02 11:14 ` [PATCH v2 6/6] staging: pi433: Rename return value from "status" to "ret" Shahar Avidar
2024-04-02 16:50   ` Dan Carpenter
2024-04-05  7:47     ` Shahar Avidar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f9d1d2b-dd8c-4325-abb4-4933d7e709ce@gmail.com \
    --to=ikobh7@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=felixkimbu1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox