diff mbox series

[v1,2/2] scsi: pm8001: clean up for open brace

Message ID 1617354522-17113-3-git-send-email-luojiaxing@huawei.com
State Superseded
Headers show
Series [v1,1/2] scsi: pm8001: clean up for white space | expand

Commit Message

luojiaxing April 2, 2021, 9:08 a.m. UTC
There are few error about open brace is reported by checkpatch.pl:

ERROR: that open brace { should be on the previous line
+static struct error_fw flash_error_table[] =
+{

So fix them all.

Signed-off-by: Jianqin Xie <xiejianqin@hisilicon.com>
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
---
 drivers/scsi/pm8001/pm8001_ctl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Bart Van Assche April 2, 2021, 4:03 p.m. UTC | #1
On 4/2/21 2:08 AM, Luo Jiaxing wrote:
> -static struct flash_command flash_command_table[] =
> -{
> +static struct flash_command flash_command_table[] = {
>       {"set_nvmd",    FLASH_CMD_SET_NVMD},
>       {"update",      FLASH_CMD_UPDATE},
>       {"",            FLASH_CMD_NONE} /* Last entry should be NULL. */

Can 'flash_command_table' be declared const?

> -static struct error_fw flash_error_table[] =
> -{
> +static struct error_fw flash_error_table[] = {
>       {"Failed to open fw image file",	FAIL_OPEN_BIOS_FILE},
>       {"image header mismatch",		FLASH_UPDATE_HDR_ERR},
>       {"image offset mismatch",		FLASH_UPDATE_OFFSET_ERR},

Can 'flash_error_table' be declared const?

Thanks,

Bart.
luojiaxing April 6, 2021, 6:40 a.m. UTC | #2
On 2021/4/3 0:03, Bart Van Assche wrote:
> On 4/2/21 2:08 AM, Luo Jiaxing wrote:

>> -static struct flash_command flash_command_table[] =

>> -{

>> +static struct flash_command flash_command_table[] = {

>>        {"set_nvmd",    FLASH_CMD_SET_NVMD},

>>        {"update",      FLASH_CMD_UPDATE},

>>        {"",            FLASH_CMD_NONE} /* Last entry should be NULL. */

> Can 'flash_command_table' be declared const?



Sure


>

>> -static struct error_fw flash_error_table[] =

>> -{

>> +static struct error_fw flash_error_table[] = {

>>        {"Failed to open fw image file",	FAIL_OPEN_BIOS_FILE},

>>        {"image header mismatch",		FLASH_UPDATE_HDR_ERR},

>>        {"image offset mismatch",		FLASH_UPDATE_OFFSET_ERR},

> Can 'flash_error_table' be declared const?



Sure


Thanks

Jiaxing


>

> Thanks,

>

> Bart.

>

> .

>
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c
index ffb4387..8802fe4 100644
--- a/drivers/scsi/pm8001/pm8001_ctl.c
+++ b/drivers/scsi/pm8001/pm8001_ctl.c
@@ -647,8 +647,7 @@  struct flash_command {
      int     code;
 };
 
-static struct flash_command flash_command_table[] =
-{
+static struct flash_command flash_command_table[] = {
      {"set_nvmd",    FLASH_CMD_SET_NVMD},
      {"update",      FLASH_CMD_UPDATE},
      {"",            FLASH_CMD_NONE} /* Last entry should be NULL. */
@@ -659,8 +658,7 @@  struct error_fw {
      int     err_code;
 };
 
-static struct error_fw flash_error_table[] =
-{
+static struct error_fw flash_error_table[] = {
      {"Failed to open fw image file",	FAIL_OPEN_BIOS_FILE},
      {"image header mismatch",		FLASH_UPDATE_HDR_ERR},
      {"image offset mismatch",		FLASH_UPDATE_OFFSET_ERR},