Project

General

Profile

Actions

Bug #14331

closed

mr_sas: this 'if' clause does not guard...

Added by Toomas Soome 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build error with gcc 11:

    ../../common/io/mr_sas/mr_sas.c: In function 'push_pending_mfi_pkt':
    ../../common/io/mr_sas/mr_sas.c:2531:25: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     2531 |                         if (cmd->drv_pkt_time < debug_timeout_g)
          |                         ^~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:
    ../../common/io/mr_sas/mr_sas.h:684:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      684 | #define con_log(level, fmt) { if (debug_level_g >= level) cmn_err fmt; }
          |                             ^
    ../../common/io/mr_sas/mr_sas.c:2533:33: note: in expansion of macro 'con_log'
     2533 |                                 con_log(CL_ANN1, (CE_CONT,
          |                                 ^~~~~~~
    cc1: all warnings being treated as errors

Testing done: build, wsdiff only has diff about constants:

/code/14300/usr/src/uts/intel/mr_sas/debug64/mr_sas
NOTE: ELF .text difference detected.

6139c6139
<     mrsas_alloc_cmd_pool+0xf3:           ba 43 0c 00 00     movl   $0xc43,%edx
---
>     mrsas_alloc_cmd_pool+0xf3:           ba 42 0c 00 00     movl   $0xc42,%edx
6208c6208
<     mrsas_alloc_cmd_pool+0x1d8:          ba 3d 0c 00 00     movl   $0xc3d,%edx
---
>     mrsas_alloc_cmd_pool+0x1d8:          ba 3c 0c 00 00     movl   $0xc3c,%edx
6525c6525
<     abort_aen_cmd+0x1d:                  ba 2b 0d 00 00     movl   $0xd2b,%edx
---
>     abort_aen_cmd+0x1d:                  ba 2a 0d 00 00     movl   $0xd2a,%edx
6925c6925
<     mrsas_init_adapter_ppc+0x140:        ba 0f 0e 00 00     movl   $0xe0f,%edx
---
>     mrsas_init_adapter_ppc+0x140:        ba 0e 0e 00 00     movl   $0xe0e,%edx
8059c8059
<     service_mfi_aen+0x2e:                b9 53 10 00 00     movl   $0x1053,%ecx
---
>     service_mfi_aen+0x2e:                b9 52 10 00 00     movl   $0x1052,%ecx
8961c8961
<     mrsas_softintr+0x5d0:                    ba 53 11 00 00     movl   $0x1153,%edx
---
>     mrsas_softintr+0x5d0:                    ba 52 11 00 00     movl   $0x1152,%edx
12668c12668
<     register_mfi_aen+0x2b:                   b9 d1 18 00 00     movl   $0x18d1,%ecx
---
>     register_mfi_aen+0x2b:                   b9 d0 18 00 00     movl   $0x18d0,%ecx
14004c14004
<     mrsas_reset_ppc+0x23:                    b9 18 1b 00 00     movl   $0x1b18,%ecx
---
>     mrsas_reset_ppc+0x23:                    b9 17 1b 00 00     movl   $0x1b17,%ecx
15153c15153
<     mrsas_add_intrs+0x448:                   ba 8d 1c 00 00     movl   $0x1c8d,%edx
---
>     mrsas_add_intrs+0x448:                   ba 8c 1c 00 00     movl   $0x1c8c,%edx

Actions #1

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 1887
Actions #2

Updated by Toomas Soome 7 months ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit d9339210baa8b029caa3e70d216a09ec1bbc7647

commit  d9339210baa8b029caa3e70d216a09ec1bbc7647
Author: Toomas Soome <tsoome@me.com>
Date:   2022-01-04T20:18:58.000Z

    14331 mr_sas: this 'if' clause does not guard...
    Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF