On Wed, Oct 12, 2016 at 1:40 PM, Dan Williams <dan.j.willi...@intel.com> wrote:
> Fix warnings of the form:
>
>     libndctl-hpe1.c: In function 'hpe1_smart_valid':
>     libndctl-hpe1.c:78:15: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>         CMD_HPE1(cmd)->gen.nd_family != NVDIMM_FAMILY_HPE1 ||
>         ^
>     libndctl-hpe1.c:79:15: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>         CMD_HPE1(cmd)->gen.nd_command != NDN_HPE1_CMD_SMART ||
>         ^
>     libndctl-hpe1.c: In function 'hpe1_cmd_smart_get_flags':
>     libndctl-hpe1.c:93:55: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>     libndctl-hpe1.c:93:55: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>     libndctl-hpe1.c: In function 'hpe1_cmd_smart_get_health':
>     libndctl-hpe1.c:121:56: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>     libndctl-hpe1.c:121:56: warning: dereferencing type-punned pointer will
>         break strict-aliasing rules [-Wstrict-aliasing]
>
> ...for distributions that include "-Wstrict-aliasing" in CFLAGS.
>
> Cc: Brian Boylston <brian.boyls...@hpe.com>
> Signed-off-by: Dan Williams <dan.j.willi...@intel.com>

Brian, it occurs to me that I do not have unit test coverage for hpe1
command functionality.  Can you confirm that this patch does not break
anything?

For extra credit, I wouldn't say no if you instrumented the kernel's
nfit_test infrastructure to provide sample hpe1 data payload results.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to