Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread NeilBrown
On Fri, Feb 01 2019, Stefan Roese wrote:

> On 01.02.19 10:03, Greg Kroah-Hartman wrote:
>> On Fri, Feb 01, 2019 at 09:57:12AM +0100, Stefan Roese wrote:
>>> This patch cleans up some minor issues with this driver:
>>> - Remove unnecessary header includes
>>> - Sort header alphabetically
>>> - Use correct comment style
>>> - Add return code check on device_reset()
>>> - Remove SPI_BPW_MASK definition (already available in
>>>include/linux/spi/spi.h)
>>> - Use macros instead of hardcoded values for SPI_MASTER register access
>>>as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)
>> 
>> When you have to start listing the different things you do in a patch,
>> that's a huge sign you need to break this up into different patches :)
>
> I personally find this over complex for these type of changes, that's
> why I prefer to send such "minor" changes in a single patch. But I
> can definitely split this up into multiple patches, if this is what's
> preferred by you (and others).

I'll put my hand as an "other".
I understand the temptation to combine changes and I've been guilty of
it occasionally myself, but it is generally best avoided.

The key issue for me is ease of review.
I like to be able to look at the patch description, understand it, then
look at the code changes and think "yes, that looks right" though with
more complex changes I'll need to study the code are bit more closely of
course.

I would probably keep

>>> - Remove unnecessary header includes
>>> - Sort header alphabetically

together, but each of the other changes should be one-per-patch.

You also:
 - made some white-space changes
 - deleted a point pre-declaration of struct mt7621_spi

The white-space changes could be combined with comment-style fixes,
the deletion could be combined with the SPI_BPW_MASK deletation.

But in any case, they should be mentioned.

Thanks - these are all valuable improvements.

NeilBrown


>   
>> Please do that here, it should be a series, each one doing a single type
>> of thing.
>
> Sure, will do.
>   
> Thanks,
> Stefan


signature.asc
Description: PGP signature
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread Greg Kroah-Hartman
On Fri, Feb 01, 2019 at 10:16:23AM +0100, Stefan Roese wrote:
> On 01.02.19 10:03, Greg Kroah-Hartman wrote:
> > On Fri, Feb 01, 2019 at 09:57:12AM +0100, Stefan Roese wrote:
> > > This patch cleans up some minor issues with this driver:
> > > - Remove unnecessary header includes
> > > - Sort header alphabetically
> > > - Use correct comment style
> > > - Add return code check on device_reset()
> > > - Remove SPI_BPW_MASK definition (already available in
> > >include/linux/spi/spi.h)
> > > - Use macros instead of hardcoded values for SPI_MASTER register access
> > >as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)
> > 
> > When you have to start listing the different things you do in a patch,
> > that's a huge sign you need to break this up into different patches :)
> 
> I personally find this over complex for these type of changes, that's
> why I prefer to send such "minor" changes in a single patch. But I
> can definitely split this up into multiple patches, if this is what's
> preferred by you (and others).

When you review as many patches as we do, it's _MUCH_ easier to review a
patch that only does one thing, to verify it really does that one thing
properly.  If you mix it all up, it takes a lot more effort to try to
review it all correctly.

Remember, you need to make it as easy as possible to understand the
change to make me seem horrible to reject your patch :)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread Stefan Roese

On 01.02.19 10:03, Greg Kroah-Hartman wrote:

On Fri, Feb 01, 2019 at 09:57:12AM +0100, Stefan Roese wrote:

This patch cleans up some minor issues with this driver:
- Remove unnecessary header includes
- Sort header alphabetically
- Use correct comment style
- Add return code check on device_reset()
- Remove SPI_BPW_MASK definition (already available in
   include/linux/spi/spi.h)
- Use macros instead of hardcoded values for SPI_MASTER register access
   as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)


When you have to start listing the different things you do in a patch,
that's a huge sign you need to break this up into different patches :)


I personally find this over complex for these type of changes, that's
why I prefer to send such "minor" changes in a single patch. But I
can definitely split this up into multiple patches, if this is what's
preferred by you (and others).
 

Please do that here, it should be a series, each one doing a single type
of thing.


Sure, will do.
 
Thanks,

Stefan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup

2019-02-01 Thread Greg Kroah-Hartman
On Fri, Feb 01, 2019 at 09:57:12AM +0100, Stefan Roese wrote:
> This patch cleans up some minor issues with this driver:
> - Remove unnecessary header includes
> - Sort header alphabetically
> - Use correct comment style
> - Add return code check on device_reset()
> - Remove SPI_BPW_MASK definition (already available in
>   include/linux/spi/spi.h)
> - Use macros instead of hardcoded values for SPI_MASTER register access
>   as suggested by Neil Brown (in mt7621_spi_reset and mt7621_spi_prepare)

When you have to start listing the different things you do in a patch,
that's a huge sign you need to break this up into different patches :)

Please do that here, it should be a series, each one doing a single type
of thing.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel