* [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c
@ 2012-07-08 1:15 Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 2/4] Staging:rts_pstor: Fix brace " Hitoshi Nakamori
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Hitoshi Nakamori @ 2012-07-08 1:15 UTC (permalink / raw)
To: gregkh; +Cc: hitoshi.nakamori, wei_wang, dan.carpenter, devel, linux-kernel
This is a patch to the ms.c that fixes up some brace warning found by checkpatch.pl tool.
Signed-off-by: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
---
drivers/staging/rts_pstor/ms.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index 0bf6d95..179a068 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -109,9 +109,8 @@ static int ms_transfer_data(struct rtsx_chip *chip, u8 trans_mode, u8 tpc, u16 s
u8 val, err_code = 0;
enum dma_data_direction dir;
- if (!buf || !buf_len) {
+ if (!buf || !buf_len)
TRACE_RET(chip, STATUS_FAIL);
- }
if (trans_mode == MS_TM_AUTO_READ) {
dir = DMA_FROM_DEVICE;
@@ -151,18 +150,16 @@ static int ms_transfer_data(struct rtsx_chip *chip, u8 trans_mode, u8 tpc, u16 s
use_sg, dir, chip->mspro_timeout);
if (retval < 0) {
ms_set_err_code(chip, err_code);
- if (retval == -ETIMEDOUT) {
+ if (retval == -ETIMEDOUT)
retval = STATUS_TIMEDOUT;
- } else {
+ else
retval = STATUS_FAIL;
- }
TRACE_RET(chip, retval);
}
RTSX_READ_REG(chip, MS_TRANS_CFG, &val);
- if (val & (MS_INT_CMDNK | MS_INT_ERR | MS_CRC16_ERR | MS_RDY_TIMEOUT)) {
+ if (val & (MS_INT_CMDNK | MS_INT_ERR | MS_CRC16_ERR | MS_RDY_TIMEOUT))
TRACE_RET(chip, STATUS_FAIL);
- }
return STATUS_SUCCESS;
}
@@ -173,9 +170,8 @@ static int ms_write_bytes(struct rtsx_chip *chip,
struct ms_info *ms_card = &(chip->ms_card);
int retval, i;
- if (!data || (data_len < cnt)) {
+ if (!data || (data_len < cnt))
TRACE_RET(chip, STATUS_ERROR);
- }
rtsx_init_cmd(chip);
@@ -183,9 +179,8 @@ static int ms_write_bytes(struct rtsx_chip *chip,
rtsx_add_cmd(chip, WRITE_REG_CMD,
PPBUF_BASE2 + i, 0xFF, data[i]);
}
- if (cnt % 2) {
+ if (cnt % 2)
rtsx_add_cmd(chip, WRITE_REG_CMD, PPBUF_BASE2 + i, 0xFF, 0xFF);
- }
rtsx_add_cmd(chip, WRITE_REG_CMD, MS_TPC, 0xFF, tpc);
rtsx_add_cmd(chip, WRITE_REG_CMD, MS_BYTE_CNT, 0xFF, cnt);
@@ -238,9 +233,8 @@ static int ms_read_bytes(struct rtsx_chip *chip, u8 tpc, u8 cnt, u8 cfg, u8 *dat
int retval, i;
u8 *ptr;
- if (!data) {
+ if (!data)
TRACE_RET(chip, STATUS_ERROR);
- }
rtsx_init_cmd(chip);
--
1.7.10
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] Staging:rts_pstor: Fix brace coding style issue in ms.c
2012-07-08 1:15 [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c Hitoshi Nakamori
@ 2012-07-08 1:15 ` Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 3/4] " Hitoshi Nakamori
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Hitoshi Nakamori @ 2012-07-08 1:15 UTC (permalink / raw)
To: gregkh; +Cc: hitoshi.nakamori, wei_wang, dan.carpenter, devel, linux-kernel
This is a patch to the ms.c file that fixes some brace warning found by checkpatch.pl tool.
Signed-off-by:Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
---
drivers/staging/rts_pstor/ms.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index 179a068..99886b0 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -287,9 +287,8 @@ static int ms_read_bytes(struct rtsx_chip *chip, u8 tpc, u8 cnt, u8 cfg, u8 *dat
ptr = rtsx_get_cmd_data(chip) + 1;
- for (i = 0; i < data_len; i++) {
+ for (i = 0; i < data_len; i++)
data[i] = ptr[i];
- }
if ((tpc == PRO_READ_SHORT_DATA) && (data_len == 8)) {
RTSX_DEBUGP("Read format progress:\n");
@@ -337,34 +336,29 @@ static int ms_set_init_para(struct rtsx_chip *chip)
int retval;
if (CHK_HG8BIT(ms_card)) {
- if (chip->asic_code) {
+ if (chip->asic_code)
ms_card->ms_clock = chip->asic_ms_hg_clk;
- } else {
+ else
ms_card->ms_clock = chip->fpga_ms_hg_clk;
- }
} else if (CHK_MSPRO(ms_card) || CHK_MS4BIT(ms_card)) {
- if (chip->asic_code) {
+ if (chip->asic_code)
ms_card->ms_clock = chip->asic_ms_4bit_clk;
- } else {
+ else
ms_card->ms_clock = chip->fpga_ms_4bit_clk;
- }
} else {
- if (chip->asic_code) {
+ if (chip->asic_code)
ms_card->ms_clock = chip->asic_ms_1bit_clk;
- } else {
+ else
ms_card->ms_clock = chip->fpga_ms_1bit_clk;
- }
}
retval = switch_clock(chip, ms_card->ms_clock);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
retval = select_card(chip, MS_CARD);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
return STATUS_SUCCESS;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] Staging:rts_pstor: Fix brace coding style issue in ms.c
2012-07-08 1:15 [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 2/4] Staging:rts_pstor: Fix brace " Hitoshi Nakamori
@ 2012-07-08 1:15 ` Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 4/4] Staging: rts_pstor: " Hitoshi Nakamori
2012-07-09 19:42 ` [PATCH 1/4] staging:rts_pstor: Fix " Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Hitoshi Nakamori @ 2012-07-08 1:15 UTC (permalink / raw)
To: gregkh; +Cc: hitoshi.nakamori, wei_wang, dan.carpenter, devel, linux-kernel
This is a patch to the ms.c file that fixes brace warning at ms_switch_clock
function found by checkpatch.pl tool.
Signed-off-by: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
---
drivers/staging/rts_pstor/ms.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index 99886b0..f389930 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -369,14 +369,12 @@ static int ms_switch_clock(struct rtsx_chip *chip)
int retval;
retval = select_card(chip, MS_CARD);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
retval = switch_clock(chip, ms_card->ms_clock);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
return STATUS_SUCCESS;
}
--
1.7.10
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] Staging: rts_pstor: Fix brace coding style issue in ms.c
2012-07-08 1:15 [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 2/4] Staging:rts_pstor: Fix brace " Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 3/4] " Hitoshi Nakamori
@ 2012-07-08 1:15 ` Hitoshi Nakamori
2012-07-09 19:42 ` [PATCH 1/4] staging:rts_pstor: Fix " Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Hitoshi Nakamori @ 2012-07-08 1:15 UTC (permalink / raw)
To: gregkh; +Cc: hitoshi.nakamori, wei_wang, dan.carpenter, devel, linux-kernel
This is a patch to the ms.c file that fixes brace warning found by checkpatch.pl tool.
Signed-off-by:Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
---
drivers/staging/rts_pstor/ms.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index f389930..9e9646a 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -447,9 +447,8 @@ static int ms_pull_ctl_enable(struct rtsx_chip *chip)
}
retval = rtsx_send_cmd(chip, MS_CARD, 100);
- if (retval < 0) {
+ if (retval < 0)
TRACE_RET(chip, STATUS_FAIL);
- }
return STATUS_SUCCESS;
}
@@ -468,32 +467,29 @@ static int ms_prepare_reset(struct rtsx_chip *chip)
ms_card->pro_under_formatting = 0;
retval = ms_power_off_card3v3(chip);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
if (!chip->ft2_fast_mode)
wait_timeout(250);
retval = enable_card_clock(chip, MS_CARD);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
+
if (chip->asic_code) {
retval = ms_pull_ctl_enable(chip);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
} else {
RTSX_WRITE_REG(chip, FPGA_PULL_CTL, FPGA_MS_PULL_CTL_BIT | 0x20, 0);
}
if (!chip->ft2_fast_mode) {
retval = card_power_on(chip, MS_CARD);
- if (retval != STATUS_SUCCESS) {
+ if (retval != STATUS_SUCCESS)
TRACE_RET(chip, STATUS_FAIL);
- }
wait_timeout(150);
#ifdef SUPPORT_OCP
--
1.7.10
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c
2012-07-08 1:15 [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c Hitoshi Nakamori
` (2 preceding siblings ...)
2012-07-08 1:15 ` [PATCH 4/4] Staging: rts_pstor: " Hitoshi Nakamori
@ 2012-07-09 19:42 ` Greg KH
2012-07-09 21:05 ` Hitoshi NAKAMORI
3 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2012-07-09 19:42 UTC (permalink / raw)
To: Hitoshi Nakamori; +Cc: devel, linux-kernel, dan.carpenter
On Sun, Jul 08, 2012 at 10:15:48AM +0900, Hitoshi Nakamori wrote:
> This is a patch to the ms.c that fixes up some brace warning found by checkpatch.pl tool.
Please wrap your comments at 72 columns.
As much as I endorce splitting patches up into tiny pieces, this is a
bit overkill, as you now have 4 patches with the same identical subject:
That implies that all of these could just be one patch, right? Please
do that.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c
2012-07-09 19:42 ` [PATCH 1/4] staging:rts_pstor: Fix " Greg KH
@ 2012-07-09 21:05 ` Hitoshi NAKAMORI
0 siblings, 0 replies; 6+ messages in thread
From: Hitoshi NAKAMORI @ 2012-07-09 21:05 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, dan.carpenter
Dear Greg.
Thank you for your indication.
I will rewrite this and send later.
I'm sorry to let you have trouble.
Regards
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-10 6:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08 1:15 [PATCH 1/4] staging:rts_pstor: Fix coding style issue in ms.c Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 2/4] Staging:rts_pstor: Fix brace " Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 3/4] " Hitoshi Nakamori
2012-07-08 1:15 ` [PATCH 4/4] Staging: rts_pstor: " Hitoshi Nakamori
2012-07-09 19:42 ` [PATCH 1/4] staging:rts_pstor: Fix " Greg KH
2012-07-09 21:05 ` Hitoshi NAKAMORI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.