diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2019-03-04 14:43:00 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-18 02:57:58 -0400 |
| commit | 1beea6204e2304dd11600791d8dad8e7350af6ad (patch) | |
| tree | 6772250c967746818f3023708231ba179aa5a587 | |
| parent | ae0a6d2017f733781dcc938a471ccc2d05f9bee6 (diff) | |
staging: axis-fifo: add CONFIG_OF dependency
When building without CONFIG_OF, the compiler loses track of the flow
control in axis_fifo_probe(), and thinks that many variables are used
without an initialization even though we actually leave the function
before the first use:
drivers/staging/axis-fifo/axis-fifo.c: In function 'axis_fifo_probe':
drivers/staging/axis-fifo/axis-fifo.c:900:5: error: 'rxd_tdata_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (rxd_tdata_width != 32) {
^
drivers/staging/axis-fifo/axis-fifo.c:907:5: error: 'txd_tdata_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (txd_tdata_width != 32) {
^
drivers/staging/axis-fifo/axis-fifo.c:914:5: error: 'has_tdest' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (has_tdest) {
^
drivers/staging/axis-fifo/axis-fifo.c:919:5: error: 'has_tid' may be used uninitialized in this function [-Werror=maybe-uninitialized]
When CONFIG_OF is set, this does not happen, and since the driver cannot
work without it, just add that option as a Kconfig dependency.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/axis-fifo/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/axis-fifo/Kconfig b/drivers/staging/axis-fifo/Kconfig index 687537203d9c..d9725888af6f 100644 --- a/drivers/staging/axis-fifo/Kconfig +++ b/drivers/staging/axis-fifo/Kconfig | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | config XIL_AXIS_FIFO | 4 | config XIL_AXIS_FIFO |
| 5 | tristate "Xilinx AXI-Stream FIFO IP core driver" | 5 | tristate "Xilinx AXI-Stream FIFO IP core driver" |
| 6 | depends on OF | ||
| 6 | default n | 7 | default n |
| 7 | help | 8 | help |
| 8 | This adds support for the Xilinx AXI-Stream | 9 | This adds support for the Xilinx AXI-Stream |
