KPC2000: kpc2000_spi.c: Fix style issues (line length)
PATCH 1/5 KPC2000: kpc2000_spi.c: Fix style issues (line length)
Resoved: "WARNING: line over 80 characters" from checkpatch.pl
--- drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/kpc2000/kpc2000_spi.c +10 -10
@@ -30,19 +30,19 @@#include "kpc.h" static struct mtd_partition p2kr0_spi0_parts[] = { - { .name ="SLOT_0" , .size =7798784 , .offset =0 , }, - { .name ="SLOT_1" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="SLOT_2" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="SLOT_3" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="CS0_EXTRA" , .size =MTDPART_SIZ_FULL , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_0" , .size =7798784 , .offset =0 , }, + { .name ="SLOT_1" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_2" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_3" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="CS0_EXTRA" , .size =MTDPART_SIZ_FULL , .offset =MTDPART_OFS_NXTBLK }, };static struct mtd_partition p2kr0_spi1_parts[] = { - { .name ="SLOT_4" , .size =7798784 , .offset =0 , }, - { .name ="SLOT_5" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="SLOT_6" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="SLOT_7" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, - { .name ="CS1_EXTRA" , .size =MTDPART_SIZ_FULL , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_4" , .size =7798784 , .offset =0 ,}, + { .name ="SLOT_5" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_6" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="SLOT_7" , .size =7798784 , .offset =MTDPART_OFS_NXTBLK }, + { .name ="CS1_EXTRA" , .size =MTDPART_SIZ_FULL , .offset =MTDPART_OFS_NXTBLK }, };static struct flash_platform_data p2kr0_spi0_pdata = {
Signature · 1 line
2.20.1
PATCH 2/5 KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl
--- drivers/staging/kpc2000/kpc2000_spi.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/kpc2000/kpc2000_spi.c +1 -0
@@ -50,6 +50,7 @@ static struct flash_platform_data p2kr0_spi0_pdata = { .nr_parts = ARRAY_SIZE(p2kr0_spi0_parts), .parts = p2kr0_spi0_parts, }; +static struct flash_platform_data p2kr0_spi1_pdata = { .name ="SPI1" , .nr_parts =ARRAY_SIZE (p2kr0_spi1_parts),
Signature · 1 line
2.20.1
Greg KH
maintainerRe: [PATCH 2/5] KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Quoted 3 lines · Chandra Annamaneni
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl
Signed-off-by Chandra Annamaneni <[email protected]>
Please fix the subject lines for all of these patches and resend.
Also, this is a second set of patches, right? What changed from the first ones? You should properly version your patches and explain under the --- line what changed as the documentation states to.
Please do that for when you resend these.
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): CAEge-i7Va8NrVGYzssFqvuGEwV=xPu9VL5_ZewXn2985QbEmcw@mail.gmail.com
Greg KH
maintainerRe: [PATCH 2/5] KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
Quoted 3 lines · Chandra Annamaneni
The first set of patches were in a single commit. I started from scratch and built these patches from 5 different commits. Don't know if the first set of patches are relevant anymore.
They are not relevant to being applied, but this patch series has changed based on the comments you received from the previous patch(s). So it is relevant to how you got to this set of patches.
This makes it easier for reviewers to understand what changed and what they need to focus on, or ignore, in your new set of patches. This isn't for you, it is for the people you are sending these patches to.
thanks,
greg k-h
PATCH 3/5 KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace)
In reply to Chandra AnnamaneniResolved: ERROR: else should follow close brace '}'
--- drivers/staging/kpc2000/kpc2000_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/kpc2000/kpc2000_spi.c +1 -2
@@ -228,8 +228,7 @@ kp_spi_txrx_pio(struct spi_device *spidev, struct spi_transfer *transfer)kp_spi_write_reg (cs,KP_SPI_REG_TXDATA , val); processed++; } - } -else if (rx) { + }else if (rx) {for (i =0 ; i < c ; i++) {char test =0 ;
Signature · 1 line
2.20.1
PATCH 4/5 KPC2000: kpc2000_spi.c: Fix style issues (alignment)
In reply to Chandra AnnamaneniResolved: "CHECK: Alignment should match open parenthesis" from checkpatch
--- drivers/staging/kpc2000/kpc2000_spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/kpc2000/kpc2000_spi.c +7 -7
@@ -315,19 +315,19 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m)if (transfer->speed_hz >KP_SPI_CLK || (len && !(rx_buf || tx_buf))) {dev_dbg (kpspi->dev," transfer: %d Hz, %d %s%s, %d bpw\n" , - transfer->speed_hz, - len, - tx_buf ?"tx" :"" , - rx_buf ?"rx" :"" , - transfer->bits_per_word); + transfer->speed_hz, + len, + tx_buf ?"tx" :"" , + rx_buf ?"rx" :"" , + transfer->bits_per_word);dev_dbg (kpspi->dev," transfer -EINVAL\n" );return -EINVAL ; }if (transfer->speed_hz && transfer->speed_hz < (KP_SPI_CLK >>15 )) {dev_dbg (kpspi->dev,"speed_hz %d below minimum %d Hz\n" , - transfer->speed_hz, -KP_SPI_CLK >>15 ); + transfer->speed_hz, +KP_SPI_CLK >>15 );dev_dbg (kpspi->dev," speed_hz -EINVAL\n" );return -EINVAL ; }
Signature · 1 line
2.20.1
PATCH 5/5 KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis)
In reply to Chandra AnnamaneniResolved: CHECK: Unnecessary parentheses around table[i]
--- drivers/staging/kpc2000/kpc2000_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/kpc2000/kpc2000_spi.c +1 -1
@@ -478,7 +478,7 @@ kp_spi_probe(struct platform_device *pldev)/* register the slave boards */ #define NEW_SPI_DEVICE_FROM_BOARD_INFO_TABLE (table) \ for (i = 0 ; i < ARRAY_SIZE(table) ; i++) { \ - spi_new_device(master, &(table[i])); \ + spi_new_device(master, &table[i]); \ }switch ((drvdata->card_id &0xFFFF0000 ) >>16 ) {
Signature · 1 line
2.20.1
Greg KH
maintainerQuoted 1 line · Chandra Annamaneni
Resoved: "WARNING: line over 80 characters" from checkpatch.pl
Please put "staging:" in your subject line, makes it easier to sort and handle. It should look something like:
staging: kpc2000_spi: fix line length issues
Looks a lot cleaner, right?
Quoted 14 lines
Signed-off-by Chandra Annamaneni <[email protected]>--- drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/kpc2000/kpc2000_spi.c +0
-0@@ -30,19 +30,19 @@#include "kpc.h" static struct mtd_partition p2kr0_spi0_parts[] = {
drivers/staging/kpc2000/kpc2000_spi.c line 37
Quoted 10 lines
drivers/staging/kpc2000/kpc2000_spi.c +5
-5- { .name = "SLOT_0", .size = 7798784, .offset = 0, }, - { .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_0", .size = 7798784, .offset = 0, }, + { .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK},
Why did you pick 2 spaces here as a random choice of padding? That's very odd, please don't.
Either leave this alone (as it lines everything up nicely), or only use one space. I would suggest just leaving it alone.
thanks,
greg k-h
Quoted 37 lines · Greg KH
Quoted 1 line · Chandra Annamaneni
Resoved: "WARNING: line over 80 characters" from checkpatch.pl
Please put "staging:" in your subject line, makes it easier to sort and handle. It should look something like:
staging:kpc2000_spi: fix line length issuesLooks a lot cleaner, right?
Quoted 14 lines
Signed-off-by Chandra Annamaneni <[email protected]>--- drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/kpc2000/kpc2000_spi.c +0
-0@@ -30,19 +30,19 @@#include "kpc.h" static struct mtd_partition p2kr0_spi0_parts[] = {drivers/staging/kpc2000/kpc2000_spi.c line 37
Quoted 10 lines
drivers/staging/kpc2000/kpc2000_spi.c +5
-5- { .name = "SLOT_0", .size = 7798784, .offset = 0, }, - { .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, - { .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_0", .size = 7798784, .offset = 0, }, + { .name = "SLOT_1", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_2", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "SLOT_3", .size = 7798784, .offset = MTDPART_OFS_NXTBLK}, + { .name = "CS0_EXTRA", .size = MTDPART_SIZ_FULL, .offset = MTDPART_OFS_NXTBLK},Why did you pick 2 spaces here as a random choice of padding? That's very odd, please don't.
Quoted 6 lines
Either leave this alone (as it lines everything up nicely), or only use one space. I would suggest just leaving it alone.
thanks,
greg k-h
I am going to leave it as is at your and Dan C's suggestion.
Thanks!
Chandra