Commit Graph

4 Commits

Author SHA1 Message Date
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
paul luse
a6dbe3721e update Intel copyright notices
per Intel policy to include file commit date using git cmd
below.  The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the 4 digit year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc).  Contribution date used
"--follow -C95%" to get the most accurate date.

Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line.  Simply there for
consistency.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2022-11-10 08:28:53 +00:00
Artur Paszkiewicz
e49ccfc820 ftl: device startup and shutdown
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ia4a3439a2ac79e24bc6dc11a5c131d44ecb2ad80
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13291
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-21 10:53:01 +00:00
Artur Paszkiewicz
5140958837 ftl: utils
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I3476a7b11e3078da519beb39fd5f49b8e838a238
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13409
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-11 07:23:58 +00:00