Skip to contentSkip to conversation

staging: spi: mt7621: Switch to SPDX identifier

PATCH Superseded Stefan Roese 3 participants 6 messages Feb 1, 2019

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 staging: spi: mt7621: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance management.

Cc Mark Brown <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc NeilBrown <[email protected]>
Cc Sankalp Negi <[email protected]>
Cc Chuanhong Guo <[email protected]>
Cc John Crispin <[email protected]>

---
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
index 513b6e79b985..c2f6f9ce52a2 100644
@@ -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
#1 lore raw

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)

Cc Mark Brown <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc NeilBrown <[email protected]>
Cc Sankalp Negi <[email protected]>
Cc Chuanhong Guo <[email protected]>
Cc John Crispin <[email protected]>

---
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
index fdbc5002c32a..126cc80c7c68 100644
@@ -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
#2 lore raw

Re: [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 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

#3 lore raw

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 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)

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

#4 lore raw

Re: [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 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)

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

#5 lore raw

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

In reply to Stefan Roese
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 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)

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