Resoved: "WARNING: line over 80 characters" from checkpatch.pl
Signed-off-by: Chandra Annamaneni <[email protected]>
---
drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 3be33c450cab..81d79b116ce0 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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 = {
--
2.20.1
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl
Signed-off-by: Chandra Annamaneni <[email protected]>
---
drivers/staging/kpc2000/kpc2000_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 81d79b116ce0..d1f7360cd179 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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),
--
2.20.1
Resolved: ERROR: else should follow close brace '}'
Signed-off-by: Chandra Annamaneni <[email protected]>
---
drivers/staging/kpc2000/kpc2000_spi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index d1f7360cd179..66cfa5202690 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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;
--
2.20.1
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch
Signed-off-by: Chandra Annamaneni <[email protected]>
---
drivers/staging/kpc2000/kpc2000_spi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 66cfa5202690..26e1e8466fb2 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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;
}
--
2.20.1
Resolved: CHECK: Unnecessary parentheses around table[i]
Signed-off-by: Chandra Annamaneni <[email protected]>
---
drivers/staging/kpc2000/kpc2000_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 26e1e8466fb2..8cd6936eda17 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -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) {
--
2.20.1
On Thu, Oct 10, 2019 at 10:51:51PM -0700, Chandra Annamaneni wrote:
> 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?
>
> Signed-off-by: Chandra Annamaneni <[email protected]>
> ---
> drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
> index 3be33c450cab..81d79b116ce0 100644
> --- a/drivers/staging/kpc2000/kpc2000_spi.c
> +++ b/drivers/staging/kpc2000/kpc2000_spi.c
> @@ -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},
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
On Thu, Oct 10, 2019 at 10:51:52PM -0700, Chandra Annamaneni wrote:
> 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: 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
On Fri, Oct 11, 2019 at 02:02:32AM -0700, Chandra Annamaneni wrote:
> 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
On Fri, Oct 11, 2019 at 08:32:19AM +0200, Greg KH wrote:
> On Thu, Oct 10, 2019 at 10:51:51PM -0700, Chandra Annamaneni wrote:
> > 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?
>
> >
> > Signed-off-by: Chandra Annamaneni <[email protected]>
> > ---
> > drivers/staging/kpc2000/kpc2000_spi.c | 20 ++++++++++----------
> > 1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
> > index 3be33c450cab..81d79b116ce0 100644
> > --- a/drivers/staging/kpc2000/kpc2000_spi.c
> > +++ b/drivers/staging/kpc2000/kpc2000_spi.c
> > @@ -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},
>
> 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
I am going to leave it as is at your and Dan C's suggestion.
Thanks!
Chandra