Skip to contentSkip to conversation

megaraid_sas: Task management support

DISCUSSION Dan Carpenter 3 participants 4 messages Feb 8, 2016 – Feb 12, 2016 SCSI

lore
Share & tools
lore
#0 lore raw

Hello Sumit Saxena,

The patch 31796fa184ee: "megaraid_sas: Task management support" from Jan 28, 2016, leads to the following static checker warning:

drivers/scsi/megaraid/megaraid_sas_base.c:1788 megasas_update_sdev_properties()
warn: if statement not indented

drivers/scsi/megaraid/megaraid_sas_base.c
1781 } else {
1782 device_id = ((sdev->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL)
1783 + sdev->id;

  1784                  local_map_ptr = fusion->ld_drv_map[(instance->map_id & 1)];
  1785                  ld = MR_TargetIdToLdGet(device_id, local_map_ptr);
  1786                  raid = MR_LdRaidGet(ld, local_map_ptr);

1787
1788 if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER)
1789 blk_queue_update_dma_alignment(sdev->request_queue, 0x7);

It looks like the code is correct but the patch just deleted a tab accidentally.

1790 mr_device_priv_data->is_tm_capable =
1791 raid->capability.tmCapable;
1792 }

regards,
dan carpenter

#1 lore raw

Sumit,

Please comment.

Thanks!

---8<---

Hello Sumit Saxena,

The patch 31796fa184ee: "megaraid_sas: Task management support" from Jan 28, 2016, leads to the following static checker warning:

drivers/scsi/megaraid/megaraid_sas_base.c:1788 megasas_update_sdev_properties()
warn: if statement not indented

drivers/scsi/megaraid/megaraid_sas_base.c
1781 } else {
1782 device_id = ((sdev->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL)
1783 + sdev->id;

  1784                  local_map_ptr = fusion->ld_drv_map[(instance->map_id & 1)];
  1785                  ld = MR_TargetIdToLdGet(device_id, local_map_ptr);
  1786                  raid = MR_LdRaidGet(ld, local_map_ptr);

1787
1788 if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER)
1789 blk_queue_update_dma_alignment(sdev->request_queue, 0x7);

It looks like the code is correct but the patch just deleted a tab accidentally.

1790 mr_device_priv_data->is_tm_capable =
1791 raid->capability.tmCapable;
1792 }

---8<---

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Dan Carpenter
Quoted 16 lines

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Monday, February 08, 2016 11:52 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: re: megaraid_sas: Task management support

Hello Sumit Saxena,

The patch 31796fa184ee: "megaraid_sas: Task management support" from Jan 28, 2016, leads to the following static checker warning:

drivers/scsi/megaraid/megaraid_sas_base.c:1788
megasas_update_sdev_properties()
warn: if statement not indented

Quoted 6 lines

drivers/scsi/megaraid/megaraid_sas_base.c
1781 } else {
1782 device_id = ((sdev->channel % 2) *
MEGASAS_MAX_DEV_PER_CHANNEL)
1783 + sdev->id;
1784 local_map_ptr =

fusion->ld_drv_map[(instance->map_id & 1)];

Quoted 1 line

1785 ld = MR_TargetIdToLdGet(device_id,

local_map_ptr);

Quoted 5 lines

1786 raid = MR_LdRaidGet(ld, local_map_ptr);
1787
1788 if (raid->capability.ldPiMode ==
MR_PROT_INFO_TYPE_CONTROLLER)
1789

blk_queue_update_dma_alignment(sdev->request_queue, 0x7);

Quoted 2 lines

It looks like the code is correct but the patch just deleted a tab

accidentally.
Yes code is correct, tab got deleted accidentally.

Quoted 7 lines

1790 mr_device_priv_data->is_tm_capable =
1791 raid->capability.tmCapable;
1792 }

regards,
dan carpenter

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sumit" == Sumit Saxena <[email protected]> writes:

Sumit,

Quoted 1 line
Quoted 1 line

It looks like the code is correct but the patch just deleted a tab

Sumit> Yes code is correct, tab got deleted accidentally.

Please submit a patch to correct the formatting.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering