[PATCH] KPC2000: kpc2000_spi.c: Fix alignment and style problems.
Fixed alignment and style issues raised by checkpatch.pl Signed-off-by: Chandra Annamaneni --- drivers/staging/kpc2000/kpc2000_spi.c | 49 --- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c index 3be33c4..a20f2d7 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -30,19 +30,27 @@ #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 = { @@ -50,6 +58,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), @@ -165,7 +174,7 @@ kp_spi_read_reg(struct kp_spi_controller_state *cs, int idx) u64 val; addr += idx; - if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)) + if (idx == KP_SPI_REG_CONFIG && cs->conf_cache >= 0) return cs->conf_cache; val = readq(addr); @@ -227,8 +236,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; @@ -315,19 +323,18 @@ 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" : &
[PATCH] KPC2000: kpc2000_spi.c: Fix style issues (line length)
Resoved: "WARNING: line over 80 characters" from checkpatch.pl Signed-off-by: Chandra Annamaneni --- 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 3be33c4..ef78b6d 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.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl Signed-off-by: Chandra Annamaneni --- 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 ef78b6d..0d510f0 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.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] KPC2000: kpc2000_spi.c: Fix style issues (alignment)
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch.pl Signed-off-by: Chandra Annamaneni --- 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 0d510f0..ccf88b8 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -316,19 +316,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.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace)
Resolved: ERROR: else should follow close brace '}' Signed-off-by: Chandra Annamaneni --- 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 ccf88b8..2082d86 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.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] KPC2000: kpc2000_spi.c: Fix style issues (Unecessary parenthesis)
Resolved: CHECK: Unnecessary parentheses around table[i] Signed-off-by: Chandra Annamaneni --- 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 2082d86..e702ada 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 & 0x) >> 16) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl Signed-off-by: Chandra Annamaneni --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis)
Resolved: CHECK: Unnecessary parentheses around table[i] Signed-off-by: Chandra Annamaneni --- 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 & 0x) >> 16) { -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/5] KPC2000: kpc2000_spi.c: Fix style issues (alignment)
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch Signed-off-by: Chandra Annamaneni --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace)
Resolved: ERROR: else should follow close brace '}' Signed-off-by: Chandra Annamaneni --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] KPC2000: kpc2000_spi.c: Fix style issues (line length)
Resoved: "WARNING: line over 80 characters" from checkpatch.pl Signed-off-by: Chandra Annamaneni --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 6ba94b0131da..5712a88c8788 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis)
Resolved: CHECK: Unnecessary parentheses around table[i] Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 24de8d63f504..8becf972af9c 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -476,7 +476,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 & 0x) >> 16) { -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (alignment)
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 5712a88c8788..929136cdc3e1 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -226,8 +226,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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (alignment)
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 929136cdc3e1..24de8d63f504 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -313,19 +313,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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace)
Resolved: ERROR: else should follow close brace '}' Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. The previous version of this patch had the wrong description and subject. 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 5712a88c8788..929136cdc3e1 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -226,8 +226,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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (misaligned brace)
Resolved: ERROR: else should follow close brace '}' Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. The previous version of this patch had the wrong description and subject. 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 5712a88c8788..929136cdc3e1 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -226,8 +226,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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 3/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (alignment)
Resolved: "CHECK: Alignment should match open parenthesis" from checkpatch Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 929136cdc3e1..24de8d63f504 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -313,19 +313,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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 4/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis)
Resolved: CHECK: Unnecessary parentheses around table[i] Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 24de8d63f504..8becf972af9c 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -476,7 +476,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 & 0x) >> 16) { -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/4] staging: KPC2000: kpc2000_spi.c: Fix style issues (missing blank line)
Resolved: "CHECK: Please use a blank line after.." from checkpatch.pl Signed-off-by: Chandra Annamaneni --- Previous versions of these patches were not split into different patches, did not have different patch numbers and did not have the keyword staging. 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 6ba94b0131da..5712a88c8788 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH for style warnings in drivers/staging/most/aim-v4l2
Enclosed is a patch to the file video.c. It only fixes style warning flagged by checkpatch.pl. Please let me know if anything else needs to be done. Thanks. Chandra diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index e074841..59e861e 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); init_waitqueue_head(&mdev->wait_data); @@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) static void aim_unregister_videodev(struct most_video_dev *mdev) { - v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); video_unregister_device(mdev->vdev); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Fix style warnings in drivers/staging/most/aim-v4l2
Enclosed is a patch to the file video.c. It only fixes style warning flagged by checkpatch.pl. Please let me know if anything else needs to be done. Signed-off-by: Chandra Annamaneni Thanks. Chandra diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index e074841..59e861e 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); init_waitqueue_head(&mdev->wait_data); @@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) static void aim_unregister_videodev(struct most_video_dev *mdev) { - v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); video_unregister_device(mdev->vdev); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] Staging: most: use __func__ instead of the function name
Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl Signed-off-by: Chandra Annamaneni diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index e074841..59e861e 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); init_waitqueue_head(&mdev->wait_data); @@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) static void aim_unregister_videodev(struct most_video_dev *mdev) { - v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); video_unregister_device(mdev->vdev); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] Staging: most: use __func__ instead of the function name
Third Reminder. Please review. -- Chandra On Sun, 9 Apr 2017, chandrasekhar annamaneni wrote: > > Second reminder, please review. > > Thanks. > Chandra > > > On Fri, Mar 17, 2017 at 12:49 PM, Chandra Annamaneni > wrote: > > Change video.c to use %s, __func__ instead of function names. > Warnings flagged by checkpatch.pl > > Signed-off-by: Chandra Annamaneni > > diff --git a/drivers/staging/most/aim-v4l2/video.c > b/drivers/staging/most/aim-v4l2/video.c > index e074841..59e861e 100644 > --- a/drivers/staging/most/aim-v4l2/video.c > +++ b/drivers/staging/most/aim-v4l2/video.c > @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) > struct most_video_dev *mdev = video_drvdata(filp); > struct aim_fh *fh; > > - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); > + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > switch (vdev->vfl_type) { > case VFL_TYPE_GRABBER: > @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) > struct most_video_dev *mdev = fh->mdev; > struct mbo *mbo, *tmp; > > - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); > + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > /* > * We need to put MBOs back before we call > most_stop_channel() > @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, > void *priv, v4l2_std_id *norm) > struct aim_fh *fh = priv; > struct most_video_dev *mdev = fh->mdev; > > - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); > + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > *norm = V4L2_STD_UNKNOWN; > return 0; > @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, > void *priv, unsigned int index) > struct aim_fh *fh = priv; > struct most_video_dev *mdev = fh->mdev; > > - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", > index); > + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); > > if (index >= V4L2_AIM_MAX_INPUT) > return -EINVAL; > @@ -441,7 +441,7 @@ static int aim_register_videodev(struct > most_video_dev *mdev) > { > int ret; > > - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); > + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > init_waitqueue_head(&mdev->wait_data); > > @@ -471,7 +471,7 @@ static int aim_register_videodev(struct > most_video_dev *mdev) > > static void aim_unregister_videodev(struct most_video_dev > *mdev) > { > - v4l2_info(&mdev->v4l2_dev, > "aim_unregister_videodev()\n"); > + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > video_unregister_device(mdev->vdev); > } > > > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] Staging: most: use __func__ instead of the function name
Sorry about the top posting. I did ask about it on the 9th of April and the reply was that the email was 'acked'. Since I did not get a further email, I assumed it was lost. Perhaps I misunderstood. Thanks! Chandra On Fri, 21 Apr 2017, Greg KH wrote: > > 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, Apr 21, 2017 at 12:40:25AM -0700, Chandra Annamaneni wrote: > > > > Third Reminder. Please review. > > 2 days after you asked before? > > And I don't even see this patch in my queue, are you sure it hasn't > already been handled, or merged, or rejected? > > thanks, > > greg k-h > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] Staging: most: use __func__ instead of the function name
Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl Signed-off-by: Chandra Annamaneni diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index e074841..59e861e 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); On Fri, 21 Apr 2017, Greg KH wrote: > On Fri, Apr 21, 2017 at 11:06:54AM -0700, Chandra Annamaneni wrote: > > > > Sorry about the top posting. > > > > I did ask about it on the 9th of April and the reply was that the email > > was 'acked'. Since I did not get a further email, I assumed it was lost. > > Perhaps I misunderstood. > > I really do not know, sorry. If you didn't get an automated email from > my system that it was applied, rebased it against the latest > staging-next branch and resend it. > > thanks, > > greg k-h > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] Staging: most: use __func__ instead of the function name
I assumed the email should be a reply to the previous email so it appears in the thread. As to the leading spaces, it was a problem with my mail client. Ill resend the patch. -- Chandra On Tue, 25 Apr 2017, Greg KH wrote: > On Mon, Apr 24, 2017 at 11:20:22PM -0700, Chandra Annamaneni wrote: > > > > Change video.c to use %s, __func__ instead of function names. > > Warnings flagged by checkpatch.pl > > > > Signed-off-by: Chandra Annamaneni > > Why is this indented? Why is your subject a "Re:"? > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4] Staging: most: use __func__ instead of the function name
Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl Signed-off-by: Chandra Annamaneni diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index 59e861e..e074841 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); + v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); + v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); + v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); + v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); + v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); init_waitqueue_head(&mdev->wait_data); @@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) static void aim_unregister_videodev(struct most_video_dev *mdev) { - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); + v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n"); video_unregister_device(mdev->vdev); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] Staging: most: use __func__ instead of the function name
Sorry! And thanks for pointing it out. regards Chandra On Wed, 26 Apr 2017, Dan Carpenter wrote: > On Wed, Apr 26, 2017 at 06:02:29AM -0700, Chandra Annamaneni wrote: > > > > Change video.c to use %s, __func__ instead of function names. > > Warnings flagged by checkpatch.pl > > > > Signed-off-by: Chandra Annamaneni > > > > diff --git a/drivers/staging/most/aim-v4l2/video.c > > b/drivers/staging/most/aim-v4l2/video.c > > index 59e861e..e074841 100644 > > --- a/drivers/staging/most/aim-v4l2/video.c > > +++ b/drivers/staging/most/aim-v4l2/video.c > > @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) > > struct most_video_dev *mdev = video_drvdata(filp); > > struct aim_fh *fh; > > > > - v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); > > + v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); > > You sent the reversed patch. > > regards, > dan carpenter > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v5] Staging: most: use __func__ instead of the function name
Change video.c to use %s, __func__ instead of function names. Warnings flagged by checkpatch.pl Signed-off-by: Chandra Annamaneni diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c index e074841..59e861e 100644 --- a/drivers/staging/most/aim-v4l2/video.c +++ b/drivers/staging/most/aim-v4l2/video.c @@ -79,7 +79,7 @@ static int aim_vdev_open(struct file *filp) struct most_video_dev *mdev = video_drvdata(filp); struct aim_fh *fh; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_open()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: @@ -128,7 +128,7 @@ static int aim_vdev_close(struct file *filp) struct most_video_dev *mdev = fh->mdev; struct mbo *mbo, *tmp; - v4l2_info(&mdev->v4l2_dev, "aim_vdev_close()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); /* * We need to put MBOs back before we call most_stop_channel() @@ -324,7 +324,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_g_std()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); *norm = V4L2_STD_UNKNOWN; return 0; @@ -361,7 +361,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int index) struct aim_fh *fh = priv; struct most_video_dev *mdev = fh->mdev; - v4l2_info(&mdev->v4l2_dev, "vidioc_s_input(%d)\n", index); + v4l2_info(&mdev->v4l2_dev, "%s(%d)\n", __func__, index); if (index >= V4L2_AIM_MAX_INPUT) return -EINVAL; @@ -441,7 +441,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) { int ret; - v4l2_info(&mdev->v4l2_dev, "aim_register_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); init_waitqueue_head(&mdev->wait_data); @@ -471,7 +471,7 @@ static int aim_register_videodev(struct most_video_dev *mdev) static void aim_unregister_videodev(struct most_video_dev *mdev) { - v4l2_info(&mdev->v4l2_dev, "aim_unregister_videodev()\n"); + v4l2_info(&mdev->v4l2_dev, "%s()\n", __func__); video_unregister_device(mdev->vdev); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel