git: mfi(4): Fix a per-index entry test bug in mfi_ioctl()

Aaron LI aly at crater.dragonflybsd.org
Tue Oct 13 04:50:40 PDT 2026


commit 49272e5c15b5c0cddcf552f7e94e55518e36c02f
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Oct 13 10:54:09 2026 +0800

    mfi(4): Fix a per-index entry test bug in mfi_ioctl()
    
    The fixed test also matches its creation in bus_dmamap_load() in
    mfi_stp_cmd().
    
    FreeBSD made the same fix in commit
    27dc50b0f0aab948e2cf60f2f50db1f36ca75054.
    
    Caught by the following -Waddress warning from GCC 12.5:
    
    ```
    /usr/src/sys/dev/raid/mfi/mfi.c: In function 'mfi_ioctl':
    /usr/src/sys/dev/raid/mfi/mfi.c:3100:71: warning: the comparison will always evaluate as 'true' for the address of 'mfi_kbuff_arr_busaddr' will never be NULL [-Waddress]
     3100 |                                         if (sc->mfi_kbuff_arr_busaddr != 0)
          |                                                                       ^~
    In file included from /usr/src/sys/dev/raid/mfi/mfi.c:81:
    /usr/src/sys/dev/raid/mfi/mfivar.h:198:41: note: 'mfi_kbuff_arr_busaddr' declared here
      198 |         bus_addr_t                      mfi_kbuff_arr_busaddr[2];
          |                                         ^~~~~~~~~~~~~~~~~~~~~
    ```

Summary of changes:
 sys/dev/raid/mfi/mfi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/49272e5c15b5c0cddcf552f7e94e55518e36c02f


-- 
DragonFly BSD source repository


More information about the Commits mailing list