linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* nvme-cli: add endianess annotations
@ 2016-09-23  3:22 Christoph Hellwig
  2016-09-23  3:22 ` [PATCH 01/18] import linux/nvme.h Christoph Hellwig
                   ` (18 more replies)
  0 siblings, 19 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-09-23  3:22 UTC (permalink / raw)


The intent of this series is to provide static type checking for the
little endian NVMe data structures using the sparse tool, similar to
the kernel.

To make my life easier I first converted nvme-cli to use a copy of
the kernel nvme.h header that defines the NVMe data structures.  The
next set of patches fixes various issues found by sparse as-is, followed
by adding support for checking the __le{16,32,64} annotations and using
the kernel cpu_to_le*/le*_to_cpu helpers, as well as fixing up various
missing endianess conversion uncovered by sparse.

To use sparse make sure both sparse and the cgcc wrapper are installed
and build nvme-cli using:

    make CC=cgcc

At least with my version of sparse there are a few warnings left that
aren't really nvme-clis faults during the build, and sparse will finally
crash after compiling nvme.c because it misparses the command line and
tries to interpret argconfig.o as a source file.  I'll plan to look into
that on the sparse side and hope to be able to provide a fix for that
issue to the sparse maintainers.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-09-23 20:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23  3:22 nvme-cli: add endianess annotations Christoph Hellwig
2016-09-23  3:22 ` [PATCH 01/18] import linux/nvme.h Christoph Hellwig
2016-09-23 20:53   ` Sagi Grimberg
2016-09-23  3:22 ` [PATCH 02/18] fix linux/nvme.h for use with nvme-cli Christoph Hellwig
2016-09-23  3:22 ` [PATCH 03/18] use nvme.h from Linux Christoph Hellwig
2016-09-23  3:22 ` [PATCH 04/18] dynamically allocate log page buffers Christoph Hellwig
2016-09-23  3:22 ` [PATCH 05/18] use abort() instead of __builtin_abort Christoph Hellwig
2016-09-23  3:22 ` [PATCH 06/18] various trivial sparse fixes Christoph Hellwig
2016-09-23  3:22 ` [PATCH 07/18] add support for checking endianess annotations using sparse Christoph Hellwig
2016-09-23  3:22 ` [PATCH 08/18] add missing endianess annoations for lightnvm data structures Christoph Hellwig
2016-09-23  3:23 ` [PATCH 09/18] fabrics: use correct endianess helper in print_discovery_log Christoph Hellwig
2016-09-23  3:23 ` [PATCH 10/18] intel: use correct endianess helpers in show_temp_stats Christoph Hellwig
2016-09-23  3:23 ` [PATCH 11/18] fix num_ctrls endianess in nvme_ns_attachment Christoph Hellwig
2016-09-23  3:23 ` [PATCH 12/18] add missing endianess conversions in print_list_item Christoph Hellwig
2016-09-23  3:23 ` [PATCH 13/18] add missing endianess conversions in json_nvme_id_ns Christoph Hellwig
2016-09-23  3:23 ` [PATCH 14/18] add missing endianess conversions in json_nvme_id_ctrl Christoph Hellwig
2016-09-23  3:23 ` [PATCH 15/18] add missing endianess conversions in json_smart_log Christoph Hellwig
2016-09-23  3:23 ` [PATCH 16/18] add missing endianess conversions in __lnvm_do_get_bbtbl Christoph Hellwig
2016-09-23  3:23 ` [PATCH 17/18] add missing endianess conversions in __lnvm_do_set_bbtbl Christoph Hellwig
2016-09-23  3:23 ` [PATCH 18/18] add missing endianess conversions in lnvm_do_set_bbtbl Christoph Hellwig
2016-09-23 14:45 ` nvme-cli: add endianess annotations Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).