<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/scsi/bfa/bfa_ioc.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-02-27T02:16:48Z</updated>
<entry>
<title>scsi: bfa: Fix function pointer type mismatch for state machines</title>
<updated>2024-02-27T02:16:48Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-22T12:44:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37126399da15e1d53da93c0282aca539bccc891b'/>
<id>urn:sha1:37126399da15e1d53da93c0282aca539bccc891b</id>
<content type='text'>
The bfa driver is full of state machines and a generic abstraction layer
for them. This relies on casting function pointers, but that is no longer
allowed when CONFIG_CFI_CLANG is enabled and causes a huge number of
warnings like:

drivers/scsi/bfa/bfad.c:169:3: error: cast from 'void (*)(struct bfad_s *, enum bfad_sm_event)' to 'bfa_sm_t' (aka 'void (*)(void *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
                bfa_sm_set_state(bfad, bfad_sm_created);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Rework the mechanism to no longer require the function pointer casts, by
having separate types for each individual state machine. This in turn
requires moving the enum definitions for each state machine into the header
files in order to define the typedef.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20240222124433.2046570-2-arnd@kernel.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Replace all non-returning strlcpy() with strscpy()</title>
<updated>2023-05-17T01:38:36Z</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-05-16T01:33:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=973464fded698881d48c6439f9d9912d61819bd1'/>
<id>urn:sha1:973464fded698881d48c6439f9d9912d61819bd1</id>
<content type='text'>
strlcpy() reads the entire source buffer first.  This read may exceed the
destination size limit.  This is both inefficient and can lead to linear
read overflows if a source string is not NUL-terminated [1].  In an effort
to remove strlcpy() completely [2], replace strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Link: https://lore.kernel.org/r/20230516013345.723623-1-azeemshaikh38@gmail.com
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Fix fall-through warnings for Clang</title>
<updated>2020-12-02T17:59:46Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-11-20T18:27:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4c7bd259d66c9f94d3937bce3de5f16a8fd812a1'/>
<id>urn:sha1:4c7bd259d66c9f94d3937bce3de5f16a8fd812a1</id>
<content type='text'>
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding a couple break statements and replacing /*
fall through */ comments with the new pseudo-keyword macro fallthrough;
instead of just letting the code fall through to the next case.

Notice that Clang doesn't recognize /* fall through */ comments as implicit
fall-through markings.

Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/2ae1cafd858238b85fc5e7fe5cc183843e21ec9f.1605896059.git.gustavoars@kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-23T22:36:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>urn:sha1:df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Ensure a blank line precedes next function/header</title>
<updated>2020-07-25T02:33:06Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-07-23T12:24:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=64332c13d0d130a0e95d1eeb8df20a9ca7887534'/>
<id>urn:sha1:64332c13d0d130a0e95d1eeb8df20a9ca7887534</id>
<content type='text'>
Fixes the following checkpatch warning:

 CHECK: Please use a blank line after function/struct/union/enum declarations
 #129: FILE: drivers/scsi/bfa/bfa_ioc.c:6913:
  }
 +/*

Link: https://lore.kernel.org/r/20200723122446.1329773-39-lee.jones@linaro.org
Cc: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.com&gt;
Cc: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Demote non-kerneldoc headers down to standard comment blocks</title>
<updated>2020-07-25T02:33:00Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-07-23T12:24:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b1a187f2615a3fb4b832163903db0d92f367da07'/>
<id>urn:sha1:b1a187f2615a3fb4b832163903db0d92f367da07</id>
<content type='text'>
This is probably historical (Doxygen?).

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bfa/bfa_ioc.c:6646: warning: Cannot understand  * @brief hardware error definition
 drivers/scsi/bfa/bfa_ioc.c:6661: warning: Cannot understand  * @brief flash command register data structure
 drivers/scsi/bfa/bfa_ioc.c:6685: warning: Cannot understand  * @brief flash device status register data structure
 drivers/scsi/bfa/bfa_ioc.c:6711: warning: Cannot understand  * @brief flash address register data structure
 drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'pci_bar' not described in 'bfa_flash_set_cmd'
 drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'wr_cnt' not described in 'bfa_flash_set_cmd'
 drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'rd_cnt' not described in 'bfa_flash_set_cmd'
 drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'ad_cnt' not described in 'bfa_flash_set_cmd'
 drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'op' not described in 'bfa_flash_set_cmd'
 drivers/scsi/bfa/bfa_ioc.c:6768: warning: Cannot understand  * @brief
 drivers/scsi/bfa/bfa_ioc.c:6807: warning: Cannot understand  * @brief
 drivers/scsi/bfa/bfa_ioc.c:6852: warning: Cannot understand  * @brief
 drivers/scsi/bfa/bfa_ioc.c:6898: warning: Cannot understand  * @brief
 drivers/scsi/bfa/bfa_ioc.c:6914: warning: Cannot understand  * @brief
 drivers/scsi/bfa/bfa_ioc.c:6940: warning: Cannot understand  * @brief

Link: https://lore.kernel.org/r/20200723122446.1329773-34-lee.jones@linaro.org
Cc: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.com&gt;
Cc: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Staticify non-external functions</title>
<updated>2020-07-25T02:32:06Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-07-23T12:24:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=00025fc7e676bcd1a6f22fa0422cb7016f5e7448'/>
<id>urn:sha1:00025fc7e676bcd1a6f22fa0422cb7016f5e7448</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bfa/bfa_ioc.c:5023:1: warning: no previous prototype for ‘bfa_diag_intr’ [-Wmissing-prototypes]
 5023 | bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg)
 | ^~~~~~~~~~~~~
 drivers/scsi/bfa/bfa_ioc.c:6966:1: warning: no previous prototype for ‘bfa_flash_sem_get’ [-Wmissing-prototypes]
 6966 | bfa_flash_sem_get(void __iomem *bar)
 | ^~~~~~~~~~~~~~~~~
 drivers/scsi/bfa/bfa_ioc.c:6979:1: warning: no previous prototype for ‘bfa_flash_sem_put’ [-Wmissing-prototypes]
 6979 | bfa_flash_sem_put(void __iomem *bar)
 | ^~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200723122446.1329773-24-lee.jones@linaro.org
Cc: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.com&gt;
Cc: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: Remove a few unused variables 'pgoff' and 't'</title>
<updated>2020-07-25T02:32:04Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-07-23T12:24:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c7ccd038b72978810fce4117fe61d651a2e95397'/>
<id>urn:sha1:c7ccd038b72978810fce4117fe61d651a2e95397</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_iocpf_sm_fwcheck_entry’:
 drivers/scsi/bfa/bfa_ioc.c:704:27: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwver_get’:
 drivers/scsi/bfa/bfa_ioc.c:1443:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwsig_invalidate’:
 drivers/scsi/bfa/bfa_ioc.c:1665:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_download_fw’:
 drivers/scsi/bfa/bfa_ioc.c:1866:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_diag_memtest_done’:
 drivers/scsi/bfa/bfa_ioc.c:4766:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_flash_fifo_flush’:
 drivers/scsi/bfa/bfa_ioc.c:6787:6: warning: variable ‘t’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200723122446.1329773-21-lee.jones@linaro.org
Cc: Anil Gurumurthy &lt;anil.gurumurthy@qlogic.com&gt;
Cc: Sudarsana Kalluru &lt;sudarsana.kalluru@qlogic.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292</title>
<updated>2019-06-05T15:36:38Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T14:18:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=52fa7bf9eadac744eff74d71234c785aade6032f'/>
<id>urn:sha1:52fa7bf9eadac744eff74d71234c785aade6032f</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license gpl version 2
  as published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 66 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.606369721@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: bfa: bfa_ioc: Mark expected switch fall-throughs</title>
<updated>2019-01-12T02:47:47Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-11-28T04:27:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f1b1dceedd7b046d04031a187aa1d51a62d8847c'/>
<id>urn:sha1:f1b1dceedd7b046d04031a187aa1d51a62d8847c</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Notice that, in this particular case, I replaced "!!! fall through !!!"
comment with "fall through" annotations, which is what GCC is expecting to
find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Sudarsana Kalluru &lt;Sudarsana.Kalluru@qlogic.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
