check_format: Verify #include syntax
Change-Id: I63b877a6543293e1a5c349bcb4460b79c81ca8cd Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/441968 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
47fadb7f9b
commit
9fd924cb40
@ -34,11 +34,11 @@
|
|||||||
#ifndef SPDK_FTL_H
|
#ifndef SPDK_FTL_H
|
||||||
#define SPDK_FTL_H
|
#define SPDK_FTL_H
|
||||||
|
|
||||||
#include <spdk/stdinc.h>
|
#include "spdk/stdinc.h"
|
||||||
#include <spdk/nvme.h>
|
#include "spdk/nvme.h"
|
||||||
#include <spdk/nvme_ocssd.h>
|
#include "spdk/nvme_ocssd.h"
|
||||||
#include <spdk/uuid.h>
|
#include "spdk/uuid.h"
|
||||||
#include <spdk/thread.h>
|
#include "spdk/thread.h"
|
||||||
|
|
||||||
struct spdk_ftl_dev;
|
struct spdk_ftl_dev;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ extern "C" {
|
|||||||
* Include a header with these additional features on Linux only.
|
* Include a header with these additional features on Linux only.
|
||||||
*/
|
*/
|
||||||
#ifndef __FreeBSD__
|
#ifndef __FreeBSD__
|
||||||
#include <spdk/queue_extras.h>
|
#include "spdk/queue_extras.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
#ifndef SPDK_BDEV_FTL_H
|
#ifndef SPDK_BDEV_FTL_H
|
||||||
#define SPDK_BDEV_FTL_H
|
#define SPDK_BDEV_FTL_H
|
||||||
|
|
||||||
#include <spdk/stdinc.h>
|
#include "spdk/stdinc.h"
|
||||||
#include <spdk/nvme.h>
|
#include "spdk/nvme.h"
|
||||||
#include <spdk/bdev_module.h>
|
#include "spdk/bdev_module.h"
|
||||||
#include <spdk/ftl.h>
|
#include "spdk/ftl.h"
|
||||||
|
|
||||||
#define FTL_MAX_CONTROLLERS 64
|
#define FTL_MAX_CONTROLLERS 64
|
||||||
#define FTL_MAX_BDEVS (FTL_MAX_CONTROLLERS * 128)
|
#define FTL_MAX_BDEVS (FTL_MAX_CONTROLLERS * 128)
|
||||||
|
@ -31,10 +31,10 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <spdk/rpc.h>
|
#include "spdk/rpc.h"
|
||||||
#include <spdk/util.h>
|
#include "spdk/util.h"
|
||||||
#include <spdk/bdev_module.h>
|
#include "spdk/bdev_module.h"
|
||||||
#include <spdk_internal/log.h>
|
#include "spdk_internal/log.h"
|
||||||
#include "bdev_ftl.h"
|
#include "bdev_ftl.h"
|
||||||
|
|
||||||
struct rpc_construct_ftl {
|
struct rpc_construct_ftl {
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <spdk/stdinc.h>
|
#include "spdk/stdinc.h"
|
||||||
#include <spdk/nvme_spec.h>
|
#include "spdk/nvme_spec.h"
|
||||||
#include <spdk/nvme_ocssd_spec.h>
|
#include "spdk/nvme_ocssd_spec.h"
|
||||||
#include <spdk/thread.h>
|
#include "spdk/thread.h"
|
||||||
#include <spdk/ftl.h>
|
#include "spdk/ftl.h"
|
||||||
#include "ftl_anm.h"
|
#include "ftl_anm.h"
|
||||||
#include "ftl_core.h"
|
#include "ftl_core.h"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#ifndef FTL_ANM_H
|
#ifndef FTL_ANM_H
|
||||||
#define FTL_ANM_H
|
#define FTL_ANM_H
|
||||||
|
|
||||||
#include <spdk/thread.h>
|
#include "spdk/thread.h"
|
||||||
#include "ftl_ppa.h"
|
#include "ftl_ppa.h"
|
||||||
|
|
||||||
struct ftl_nvme_ctrlr;
|
struct ftl_nvme_ctrlr;
|
||||||
|
@ -31,12 +31,12 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <spdk/stdinc.h>
|
#include "spdk/stdinc.h"
|
||||||
#include <spdk/nvme.h>
|
#include "spdk/nvme.h"
|
||||||
#include <spdk/io_channel.h>
|
#include "spdk/io_channel.h"
|
||||||
#include <spdk/bdev_module.h>
|
#include "spdk/bdev_module.h"
|
||||||
#include <spdk_internal/log.h>
|
#include "spdk_internal/log.h"
|
||||||
#include <spdk/ftl.h>
|
#include "spdk/ftl.h"
|
||||||
#include "ftl_core.h"
|
#include "ftl_core.h"
|
||||||
#include "ftl_anm.h"
|
#include "ftl_anm.h"
|
||||||
#include "ftl_io.h"
|
#include "ftl_io.h"
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <spdk/likely.h>
|
#include "spdk/likely.h"
|
||||||
#include <spdk_internal/log.h>
|
#include "spdk_internal/log.h"
|
||||||
#include <spdk/ftl.h>
|
#include "spdk/ftl.h"
|
||||||
#include "ftl_reloc.h"
|
#include "ftl_reloc.h"
|
||||||
#include "ftl_core.h"
|
#include "ftl_core.h"
|
||||||
#include "ftl_io.h"
|
#include "ftl_io.h"
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#ifndef FTL_RELOC_H
|
#ifndef FTL_RELOC_H
|
||||||
#define FTL_RELOC_H
|
#define FTL_RELOC_H
|
||||||
|
|
||||||
#include <spdk/stdinc.h>
|
#include "spdk/stdinc.h"
|
||||||
#include <spdk/ftl.h>
|
#include "spdk/ftl.h"
|
||||||
|
|
||||||
struct ftl_reloc;
|
struct ftl_reloc;
|
||||||
struct ftl_band;
|
struct ftl_band;
|
||||||
|
@ -180,6 +180,17 @@ else
|
|||||||
fi
|
fi
|
||||||
rm -f scripts/posix.log
|
rm -f scripts/posix.log
|
||||||
|
|
||||||
|
echo -n "Checking #include style..."
|
||||||
|
git grep -I -i --line-number "#include <spdk/" -- '*.[ch]' > scripts/includes.log || true
|
||||||
|
if [ -s scripts/includes.log ]; then
|
||||||
|
echo "Incorrect #include syntax. #includes of spdk/ files should use quotes."
|
||||||
|
cat scripts/includes.log
|
||||||
|
rc=1
|
||||||
|
else
|
||||||
|
echo " OK"
|
||||||
|
fi
|
||||||
|
rm -f scripts/includes.log
|
||||||
|
|
||||||
if hash pycodestyle 2>/dev/null; then
|
if hash pycodestyle 2>/dev/null; then
|
||||||
PEP8=pycodestyle
|
PEP8=pycodestyle
|
||||||
elif hash pep8 2>/dev/null; then
|
elif hash pep8 2>/dev/null; then
|
||||||
|
Loading…
Reference in New Issue
Block a user