Spdk/lib/ftl
Jim Harris 8e002e770b ftl: fix FTL_LOG_COMMON to avoid annoying gcc-12 warnings
gcc-12 is really tricky.  It detected that in
ftl_nv_cache_load_state() that when we do an FTL_NOTICELOG,
the dev and nv_cache values are associated with each
other by the SPDK_CONTAINEROF() operation.

So then in FTL_LOG_COMMON, it checks if dev is NULL.  If it
is, it doesn't print the dev->conf.name, but still prints
the varargs which include nv_cache members.  But if dev is
NULL then these nv_cache members wouldn't be valid either,
and that's what gcc-12 is complaining about, in a very
unclear way.

So now we just have FTL_LOG_COMMON contain a single line, with
a tertiary operator to print either dev->conf.name or "N/A"
depending on whether dev is NULL or not.  I suspect this
fixes it because we've replaced the if statement with
a tertiary operator that is independent from the VA_ARGS.

Fixes issue #2829 (partially).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia56e2c7fb7966e7a5ceff35b36b0346b556ce7e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16342
Reviewed-by: <sebastian.brzezinka@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-19 11:22:46 +00:00
..
mngt lib/ftl: Update alignment layout's region 2023-01-16 08:28:28 +00:00
upgrade update Intel copyright notices 2022-11-10 08:28:53 +00:00
utils ftl: fix FTL_LOG_COMMON to avoid annoying gcc-12 warnings 2023-01-19 11:22:46 +00:00
ftl_band_ops.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_band.c lib/ftl: Update GC band selection mechanism 2023-01-16 08:28:28 +00:00
ftl_band.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_core.c misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
ftl_core.h lib/ftl: Update FTL IO activity statistics 2022-11-22 10:01:30 +00:00
ftl_debug.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_debug.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_init.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_internal.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
ftl_io.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_io.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_l2p_cache.c lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_l2p_cache.h lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_l2p_flat.c lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_l2p_flat.h lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_l2p.c lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_l2p.h lib/ftl: Update L2P management initialization flow 2023-01-16 08:28:28 +00:00
ftl_layout.c lib/ftl: Update alignment layout's region 2023-01-16 08:28:28 +00:00
ftl_layout.h lib/ftl: Update alignment layout's region 2023-01-16 08:28:28 +00:00
ftl_nv_cache_io.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_nv_cache.c lib/ftl: Update FTL IO activity statistics 2022-11-22 10:01:30 +00:00
ftl_nv_cache.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
ftl_p2l.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_reloc.c lib/ftl: Update FTL IO activity statistics 2022-11-22 10:01:30 +00:00
ftl_rq.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_sb_common.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_sb_current.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_sb.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_sb.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_trace.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_trace.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_utils.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_writer.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl_writer.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_ftl.map ftl: I/O statistics 2022-09-20 19:24:26 +00:00