staging: spi: mt7621: Switch to SPDX identifier
Subsystems (3)
PATCH v2 1/2 staging: spi: mt7621: Switch to SPDX identifier
Adopt the SPDX license identifier headers to ease license compliance management.
---
v2:
- Changes are done to the driver in staging before moving it out of staging into drivers/spi
drivers/staging/mt7621-spi/spi-mt7621.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/mt7621-spi/spi-mt7621.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * spi-mt7621.c -- MediaTek MT7621 SPI controller driver *
@@ -8,10 +9,6 @@* Some parts are based on spi-orion.c: * Author: Shadi Ammouri <[email protected]> * Copyright (C) 2007-2008 Marvell Ltd. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <linux/init.h>
Signature · 1 line
2.20.1
PATCH v2 2/2 staging: spi: mt7621: Minor code cleanup
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)
---
v2:
- Changes are done to the driver in staging before moving it out of staging into drivers/spi
- Remove SPI_BPW_MASK macro
- Use macros instead of hardcoded values for SPI_MASTER bits
- Remove code cleanup comment from TODO file
drivers/staging/mt7621-spi/TODO | 1 - drivers/staging/mt7621-spi/spi-mt7621.c | 65 ++++++++++++++----------- 2 files changed, 37 insertions(+), 29 deletions(-)
drivers/staging/mt7621-spi/TODO +0 -1
@@ -1,5 +1,4 @@ -- general code review and clean up - ensure device-tree requirements are documented Cc: NeilBrown <[email protected]>
drivers/staging/mt7621-spi/spi-mt7621.c +37 -28
143 lines not on this page · raw message
Signature · 1 line
2.20.1
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup
Quoted 9 lines · Stefan Roese
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 ondevice_reset()
- RemoveSPI_BPW_MASKdefinition (already available ininclude/linux/spi/spi.h)
- Use macros instead of hardcoded values forSPI_MASTERregister access as suggested by Neil Brown (inmt7621_spi_resetandmt7621_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
Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup
Quoted 11 lines · Greg Kroah-Hartman
Quoted 9 lines · Stefan Roese
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 ondevice_reset()
- RemoveSPI_BPW_MASKdefinition (already available ininclude/linux/spi/spi.h)
- Use macros instead of hardcoded values forSPI_MASTERregister access as suggested by Neil Brown (inmt7621_spi_resetandmt7621_spi_prepare)
Quoted 2 lines
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).
Quoted 2 lines
Please do that here, it should be a series, each one doing a single type of thing.
Sure, will do.
Thanks,
Stefan
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup
Quoted 12 lines · Stefan Roese
Quoted 11 lines · Greg Kroah-Hartman
Quoted 9 lines · Stefan Roese
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 ondevice_reset()
- RemoveSPI_BPW_MASKdefinition (already available ininclude/linux/spi/spi.h)
- Use macros instead of hardcoded values forSPI_MASTERregister access as suggested by Neil Brown (inmt7621_spi_resetandmt7621_spi_prepare)
Quoted 7 lines
Quoted 2 lines
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
Re: [PATCH 2/2 v2] staging: spi: mt7621: Minor code cleanup
In reply to Stefan RoeseQuoted 12 lines · Stefan Roese
Quoted 11 lines · Greg Kroah-Hartman
Quoted 9 lines · Stefan Roese
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 ondevice_reset()
- RemoveSPI_BPW_MASKdefinition (already available ininclude/linux/spi/spi.h)
- Use macros instead of hardcoded values forSPI_MASTERregister access as suggested by Neil Brown (inmt7621_spi_resetandmt7621_spi_prepare)
Quoted 7 lines
Quoted 2 lines
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
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
- 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
Quoted 8 lines
Quoted 3 lines
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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel