lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] scsi: lpfc: clean up some inconsistent indentings
Date
drivers/scsi/lpfc/lpfc_attr.c:1944 lpfc_xcvr_data_show() warn:
inconsistent indenting

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2535
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/scsi/lpfc/lpfc_attr.c | 46 +++++++++++++++--------------------
1 file changed, 19 insertions(+), 27 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 030ad1d59cbd..d7a3496471cd 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1941,33 +1941,25 @@ lpfc_xcvr_data_show(struct device *dev, struct device_attribute *attr,
&rdp_context->page_a0[SSF_TRANSCEIVER_CODE_B7];

len += scnprintf(buf + len, PAGE_SIZE - len, "Speeds: \t");
- if (*(uint8_t *)trasn_code_byte7 == 0) {
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "Unknown\n");
- } else {
- if (trasn_code_byte7->fc_sp_100MB)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "1 ");
- if (trasn_code_byte7->fc_sp_200mb)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "2 ");
- if (trasn_code_byte7->fc_sp_400MB)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "4 ");
- if (trasn_code_byte7->fc_sp_800MB)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "8 ");
- if (trasn_code_byte7->fc_sp_1600MB)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "16 ");
- if (trasn_code_byte7->fc_sp_3200MB)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "32 ");
- if (trasn_code_byte7->speed_chk_ecc)
- len += scnprintf(buf + len, PAGE_SIZE - len,
- "64 ");
- len += scnprintf(buf + len, PAGE_SIZE - len, "GB\n");
- }
+ if (*(uint8_t *)trasn_code_byte7 == 0) {
+ len += scnprintf(buf + len, PAGE_SIZE - len, "Unknown\n");
+ } else {
+ if (trasn_code_byte7->fc_sp_100MB)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "1 ");
+ if (trasn_code_byte7->fc_sp_200mb)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "2 ");
+ if (trasn_code_byte7->fc_sp_400MB)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "4 ");
+ if (trasn_code_byte7->fc_sp_800MB)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "8 ");
+ if (trasn_code_byte7->fc_sp_1600MB)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "16 ");
+ if (trasn_code_byte7->fc_sp_3200MB)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "32 ");
+ if (trasn_code_byte7->speed_chk_ecc)
+ len += scnprintf(buf + len, PAGE_SIZE - len, "64 ");
+ len += scnprintf(buf + len, PAGE_SIZE - len, "GB\n");
+ }
temperature = (rdp_context->page_a2[SFF_TEMPERATURE_B1] << 8 |
rdp_context->page_a2[SFF_TEMPERATURE_B0]);
vcc = (rdp_context->page_a2[SFF_VCC_B1] << 8 |
--
2.20.1.7.g153144c
\
 
 \ /
  Last update: 2022-10-25 08:01    [W:0.024 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site