automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw100516 [RFC PATCH] gpu/cuda: introduce CUDA driver
       [not found] <20211005224905.13505-1-eagostini@nvidia.com>
@ 2021-10-05 14:40 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2021-10-05 14:40 UTC (permalink / raw)
  To: test-report; +Cc: eagostini

Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/100516

_coding style issues_


WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#142: FILE: drivers/gpu/cuda/cuda.c:3:
+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates
+*/

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#193: FILE: drivers/gpu/cuda/cuda.c:54:
+    char gpu_name[RTE_DEV_NAME_MAX_LEN];$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#194: FILE: drivers/gpu/cuda/cuda.c:55:
+    CUdevice cu_dev;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#209: FILE: drivers/gpu/cuda/cuda.c:70:
+    CUdeviceptr ptr_d;$

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#210: FILE: drivers/gpu/cuda/cuda.c:71:
+	void * ptr_h;

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#211: FILE: drivers/gpu/cuda/cuda.c:72:
+    size_t size;$

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#216: FILE: drivers/gpu/cuda/cuda.c:77:
+	struct mem_entry * prev;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#217: FILE: drivers/gpu/cuda/cuda.c:78:
+	struct mem_entry * next;

ERROR:GLOBAL_INITIALISERS: do not initialise globals to NULL
#220: FILE: drivers/gpu/cuda/cuda.c:81:
+struct mem_entry * mem_alloc_list_head = NULL;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#220: FILE: drivers/gpu/cuda/cuda.c:81:
+struct mem_entry * mem_alloc_list_head = NULL;

ERROR:GLOBAL_INITIALISERS: do not initialise globals to NULL
#221: FILE: drivers/gpu/cuda/cuda.c:82:
+struct mem_entry * mem_alloc_list_tail = NULL;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#221: FILE: drivers/gpu/cuda/cuda.c:82:
+struct mem_entry * mem_alloc_list_tail = NULL;

ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
#222: FILE: drivers/gpu/cuda/cuda.c:83:
+uint32_t mem_alloc_list_last_elem = 0;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#226: FILE: drivers/gpu/cuda/cuda.c:87:
+get_hash_from_ptr(void * ptr)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#242: FILE: drivers/gpu/cuda/cuda.c:103:
+	if(mem_alloc_list_head == NULL)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#242: FILE: drivers/gpu/cuda/cuda.c:103:
+	if(mem_alloc_list_head == NULL)

WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#244: FILE: drivers/gpu/cuda/cuda.c:105:
+		mem_alloc_list_head = rte_zmalloc(NULL, sizeof(struct mem_entry), RTE_CACHE_LINE_SIZE);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#254: FILE: drivers/gpu/cuda/cuda.c:115:
+	else
+	{

ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#254: FILE: drivers/gpu/cuda/cuda.c:115:
+	}
+	else

WARNING:LONG_LINE: line length of 121 exceeds 100 columns
#256: FILE: drivers/gpu/cuda/cuda.c:117:
+		struct mem_entry * mem_alloc_list_cur = rte_zmalloc(NULL, sizeof(struct mem_entry), RTE_CACHE_LINE_SIZE);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#256: FILE: drivers/gpu/cuda/cuda.c:117:
+		struct mem_entry * mem_alloc_list_cur = rte_zmalloc(NULL, sizeof(struct mem_entry), RTE_CACHE_LINE_SIZE);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#276: FILE: drivers/gpu/cuda/cuda.c:137:
+	struct mem_entry * mem_alloc_list_cur = NULL;

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#278: FILE: drivers/gpu/cuda/cuda.c:139:
+	if( mem_alloc_list_head == NULL )
+	{

ERROR:SPACING: space prohibited after that open parenthesis '('
#278: FILE: drivers/gpu/cuda/cuda.c:139:
+	if( mem_alloc_list_head == NULL )

ERROR:SPACING: space prohibited before that close parenthesis ')'
#278: FILE: drivers/gpu/cuda/cuda.c:139:
+	if( mem_alloc_list_head == NULL )

ERROR:SPACING: space required before the open parenthesis '('
#278: FILE: drivers/gpu/cuda/cuda.c:139:
+	if( mem_alloc_list_head == NULL )

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#284: FILE: drivers/gpu/cuda/cuda.c:145:
+	if(mem_list_count_item() == 0)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#284: FILE: drivers/gpu/cuda/cuda.c:145:
+	if(mem_list_count_item() == 0)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#292: FILE: drivers/gpu/cuda/cuda.c:153:
+	while(mem_alloc_list_cur != NULL)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#292: FILE: drivers/gpu/cuda/cuda.c:153:
+	while(mem_alloc_list_cur != NULL)

ERROR:SPACING: space required before the open parenthesis '('
#294: FILE: drivers/gpu/cuda/cuda.c:155:
+		if(mem_alloc_list_cur->pkey == pk)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#305: FILE: drivers/gpu/cuda/cuda.c:166:
+	struct mem_entry * mem_alloc_list_cur = NULL;

ERROR:SPACING: space required before the open parenthesis '('
#308: FILE: drivers/gpu/cuda/cuda.c:169:
+	if(mem_alloc_list_cur == NULL)

ERROR:SPACING: space required before the open parenthesis '('
#312: FILE: drivers/gpu/cuda/cuda.c:173:
+	if(mem_alloc_list_cur->prev == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#314: FILE: drivers/gpu/cuda/cuda.c:175:
+	else
+	{

ERROR:SPACING: space required before the open parenthesis '('
#317: FILE: drivers/gpu/cuda/cuda.c:178:
+		if(mem_alloc_list_cur->next != NULL)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#335: FILE: drivers/gpu/cuda/cuda.c:196:
+	const char * err_string;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#336: FILE: drivers/gpu/cuda/cuda.c:197:
+	struct cuda_info * private;

ERROR:SPACING: space required before the open parenthesis '('
#340: FILE: drivers/gpu/cuda/cuda.c:201:
+	if(dev == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#344: FILE: drivers/gpu/cuda/cuda.c:205:
+	if(
+		dev->mpshared->info.parent != RTE_GPU_ID_NONE &&
+		dev->mpshared->dev_private == NULL
+	)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#344: FILE: drivers/gpu/cuda/cuda.c:205:
+	if(

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#351: FILE: drivers/gpu/cuda/cuda.c:212:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#351: FILE: drivers/gpu/cuda/cuda.c:212:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#351: FILE: drivers/gpu/cuda/cuda.c:212:
+		if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#362: FILE: drivers/gpu/cuda/cuda.c:223:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#362: FILE: drivers/gpu/cuda/cuda.c:223:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#362: FILE: drivers/gpu/cuda/cuda.c:223:
+		if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 114 exceeds 100 columns
#365: FILE: drivers/gpu/cuda/cuda.c:226:
+			rte_gpu_log(ERR, "cuda_dev_info_get cuCtxSetCurrent input failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_dev_info_get', this function's name, in a string
#365: FILE: drivers/gpu/cuda/cuda.c:226:
+			rte_gpu_log(ERR, "cuda_dev_info_get cuCtxSetCurrent input failed with %s.
", err_string);

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#371: FILE: drivers/gpu/cuda/cuda.c:232:
+		/*
+		* Ctx capacity info

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#376: FILE: drivers/gpu/cuda/cuda.c:237:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#376: FILE: drivers/gpu/cuda/cuda.c:237:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#376: FILE: drivers/gpu/cuda/cuda.c:237:
+		if(CUDA_SUCCESS != res)

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#389: FILE: drivers/gpu/cuda/cuda.c:250:
+		/*
+		* GPU Device private info

WARNING:LONG_LINE: line length of 110 exceeds 100 columns
#391: FILE: drivers/gpu/cuda/cuda.c:252:
+		dev->mpshared->dev_private = rte_zmalloc(NULL, sizeof(struct cuda_info), RTE_CACHE_LINE_SIZE);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#401: FILE: drivers/gpu/cuda/cuda.c:262:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#401: FILE: drivers/gpu/cuda/cuda.c:262:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#401: FILE: drivers/gpu/cuda/cuda.c:262:
+		if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#410: FILE: drivers/gpu/cuda/cuda.c:271:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#410: FILE: drivers/gpu/cuda/cuda.c:271:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#410: FILE: drivers/gpu/cuda/cuda.c:271:
+		if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#420: FILE: drivers/gpu/cuda/cuda.c:281:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#420: FILE: drivers/gpu/cuda/cuda.c:281:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#420: FILE: drivers/gpu/cuda/cuda.c:281:
+		if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 116 exceeds 100 columns
#423: FILE: drivers/gpu/cuda/cuda.c:284:
+			rte_gpu_log(ERR, "cuda_dev_info_get cuCtxSetCurrent current failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_dev_info_get', this function's name, in a string
#423: FILE: drivers/gpu/cuda/cuda.c:284:
+			rte_gpu_log(ERR, "cuda_dev_info_get cuCtxSetCurrent current failed with %s.
", err_string);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#439: FILE: drivers/gpu/cuda/cuda.c:300:
+cuda_mem_alloc(struct rte_gpu * dev, size_t size, void ** ptr)

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#439: FILE: drivers/gpu/cuda/cuda.c:300:
+cuda_mem_alloc(struct rte_gpu * dev, size_t size, void ** ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#442: FILE: drivers/gpu/cuda/cuda.c:303:
+	const char * err_string;

ERROR:SPACING: space required before the open parenthesis '('
#447: FILE: drivers/gpu/cuda/cuda.c:308:
+	if(dev == NULL || size == 0)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#452: FILE: drivers/gpu/cuda/cuda.c:313:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#452: FILE: drivers/gpu/cuda/cuda.c:313:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#452: FILE: drivers/gpu/cuda/cuda.c:313:
+	if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#463: FILE: drivers/gpu/cuda/cuda.c:324:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#463: FILE: drivers/gpu/cuda/cuda.c:324:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#463: FILE: drivers/gpu/cuda/cuda.c:324:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#466: FILE: drivers/gpu/cuda/cuda.c:327:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent input failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_alloc', this function's name, in a string
#466: FILE: drivers/gpu/cuda/cuda.c:327:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent input failed with %s.
", err_string);

ERROR:SPACING: space required before the open parenthesis '('
#473: FILE: drivers/gpu/cuda/cuda.c:334:
+	if(mem_alloc_list_tail == NULL)

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#479: FILE: drivers/gpu/cuda/cuda.c:340:
+	if (CUDA_SUCCESS != res) {

WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#481: FILE: drivers/gpu/cuda/cuda.c:342:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent current failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_alloc', this function's name, in a string
#481: FILE: drivers/gpu/cuda/cuda.c:342:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent current failed with %s.
", err_string);

WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#487: FILE: drivers/gpu/cuda/cuda.c:348:
+	res = cuPointerSetAttribute(&flag, CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, mem_alloc_list_tail->ptr_d);

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#488: FILE: drivers/gpu/cuda/cuda.c:349:
+	if (CUDA_SUCCESS != res) {

WARNING:LONG_LINE: line length of 138 exceeds 100 columns
#489: FILE: drivers/gpu/cuda/cuda.c:350:
+		rte_gpu_log(ERR, "Could not set SYNC MEMOP attribute for GPU memory at %llx , err %d
", mem_alloc_list_tail->ptr_d, res);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#502: FILE: drivers/gpu/cuda/cuda.c:363:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#502: FILE: drivers/gpu/cuda/cuda.c:363:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#502: FILE: drivers/gpu/cuda/cuda.c:363:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#505: FILE: drivers/gpu/cuda/cuda.c:366:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent current failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_alloc', this function's name, in a string
#505: FILE: drivers/gpu/cuda/cuda.c:366:
+		rte_gpu_log(ERR, "cuda_mem_alloc cuCtxSetCurrent current failed with %s.
", err_string);

ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
#510: FILE: drivers/gpu/cuda/cuda.c:371:
+	*ptr = (void*) mem_alloc_list_tail->ptr_d;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#516: FILE: drivers/gpu/cuda/cuda.c:377:
+cuda_mem_register(struct rte_gpu * dev, size_t size, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#516: FILE: drivers/gpu/cuda/cuda.c:377:
+cuda_mem_register(struct rte_gpu * dev, size_t size, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#519: FILE: drivers/gpu/cuda/cuda.c:380:
+	const char * err_string;

ERROR:SPACING: space required before the open parenthesis '('
#525: FILE: drivers/gpu/cuda/cuda.c:386:
+	if(dev == NULL || size == 0 || ptr == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#530: FILE: drivers/gpu/cuda/cuda.c:391:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#530: FILE: drivers/gpu/cuda/cuda.c:391:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#530: FILE: drivers/gpu/cuda/cuda.c:391:
+	if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#541: FILE: drivers/gpu/cuda/cuda.c:402:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#541: FILE: drivers/gpu/cuda/cuda.c:402:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#541: FILE: drivers/gpu/cuda/cuda.c:402:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#544: FILE: drivers/gpu/cuda/cuda.c:405:
+		rte_gpu_log(ERR, "cuda_mem_register cuCtxSetCurrent input failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_register', this function's name, in a string
#544: FILE: drivers/gpu/cuda/cuda.c:405:
+		rte_gpu_log(ERR, "cuda_mem_register cuCtxSetCurrent input failed with %s.
", err_string);

ERROR:SPACING: space required before the open parenthesis '('
#551: FILE: drivers/gpu/cuda/cuda.c:412:
+	if(mem_alloc_list_tail == NULL)

WARNING:LONG_LINE: line length of 147 exceeds 100 columns
#558: FILE: drivers/gpu/cuda/cuda.c:419:
+	res = cuMemHostRegister(mem_alloc_list_tail->ptr_h, mem_alloc_list_tail->size, CU_MEMHOSTREGISTER_PORTABLE | CU_MEMHOSTREGISTER_DEVICEMAP);

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#559: FILE: drivers/gpu/cuda/cuda.c:420:
+	if (CUDA_SUCCESS != res) {

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_register', this function's name, in a string
#561: FILE: drivers/gpu/cuda/cuda.c:422:
+		rte_gpu_log(ERR, "cuda_mem_register cuMemHostRegister failed with %s ptr %p size %zd.
",

WARNING:LONG_LINE: line length of 113 exceeds 100 columns
#562: FILE: drivers/gpu/cuda/cuda.c:423:
+						err_string, mem_alloc_list_tail->ptr_h, mem_alloc_list_tail->size

WARNING:LONG_LINE: line length of 132 exceeds 100 columns
#569: FILE: drivers/gpu/cuda/cuda.c:430:
+									CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM,

WARNING:LONG_LINE: line length of 130 exceeds 100 columns
#570: FILE: drivers/gpu/cuda/cuda.c:431:
+									((struct cuda_info *)(dev->mpshared->dev_private))->cu_dev

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#572: FILE: drivers/gpu/cuda/cuda.c:433:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#572: FILE: drivers/gpu/cuda/cuda.c:433:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#572: FILE: drivers/gpu/cuda/cuda.c:433:
+	if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#582: FILE: drivers/gpu/cuda/cuda.c:443:
+	if(use_ptr_h == 0)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#582: FILE: drivers/gpu/cuda/cuda.c:443:
+	if(use_ptr_h == 0)

WARNING:LONG_LINE: line length of 110 exceeds 100 columns
#584: FILE: drivers/gpu/cuda/cuda.c:445:
+		res = cuMemHostGetDevicePointer(&(mem_alloc_list_tail->ptr_d), mem_alloc_list_tail->ptr_h, 0);

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#585: FILE: drivers/gpu/cuda/cuda.c:446:
+		if (CUDA_SUCCESS != res) {

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#592: FILE: drivers/gpu/cuda/cuda.c:453:
+		if((uintptr_t) mem_alloc_list_tail->ptr_d != (uintptr_t) mem_alloc_list_tail->ptr_h)
+		{

ERROR:SPACING: space required before the open parenthesis '('
#592: FILE: drivers/gpu/cuda/cuda.c:453:
+		if((uintptr_t) mem_alloc_list_tail->ptr_d != (uintptr_t) mem_alloc_list_tail->ptr_h)

ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#598: FILE: drivers/gpu/cuda/cuda.c:459:
+	}
+	else

WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#602: FILE: drivers/gpu/cuda/cuda.c:463:
+	res = cuPointerSetAttribute(&flag, CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, mem_alloc_list_tail->ptr_d);

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#603: FILE: drivers/gpu/cuda/cuda.c:464:
+	if (CUDA_SUCCESS != res) {

WARNING:LONG_LINE: line length of 138 exceeds 100 columns
#604: FILE: drivers/gpu/cuda/cuda.c:465:
+		rte_gpu_log(ERR, "Could not set SYNC MEMOP attribute for GPU memory at %llx , err %d
", mem_alloc_list_tail->ptr_d, res);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#616: FILE: drivers/gpu/cuda/cuda.c:477:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#616: FILE: drivers/gpu/cuda/cuda.c:477:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#616: FILE: drivers/gpu/cuda/cuda.c:477:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 108 exceeds 100 columns
#619: FILE: drivers/gpu/cuda/cuda.c:480:
+		rte_gpu_log(ERR, "cuda_mem_register cuCtxSetCurrent current failed with %s.
", err_string);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'cuda_mem_register', this function's name, in a string
#619: FILE: drivers/gpu/cuda/cuda.c:480:
+		rte_gpu_log(ERR, "cuda_mem_register cuCtxSetCurrent current failed with %s.
", err_string);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#628: FILE: drivers/gpu/cuda/cuda.c:489:
+cuda_mem_free(struct rte_gpu * dev, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#628: FILE: drivers/gpu/cuda/cuda.c:489:
+cuda_mem_free(struct rte_gpu * dev, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#631: FILE: drivers/gpu/cuda/cuda.c:492:
+	struct mem_entry * mem_item;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#632: FILE: drivers/gpu/cuda/cuda.c:493:
+	const char * err_string;

ERROR:SPACING: space required before the open parenthesis '('
#635: FILE: drivers/gpu/cuda/cuda.c:496:
+	if(dev == NULL || ptr == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#641: FILE: drivers/gpu/cuda/cuda.c:502:
+	if(mem_item == NULL)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#641: FILE: drivers/gpu/cuda/cuda.c:502:
+	if(mem_item == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#647: FILE: drivers/gpu/cuda/cuda.c:508:
+	if(mem_item->mtype == GPU_MEM)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#647: FILE: drivers/gpu/cuda/cuda.c:508:
+	if(mem_item->mtype == GPU_MEM)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#650: FILE: drivers/gpu/cuda/cuda.c:511:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#650: FILE: drivers/gpu/cuda/cuda.c:511:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#650: FILE: drivers/gpu/cuda/cuda.c:511:
+		if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#661: FILE: drivers/gpu/cuda/cuda.c:522:
+	else
+	{

ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#661: FILE: drivers/gpu/cuda/cuda.c:522:
+	}
+	else

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#671: FILE: drivers/gpu/cuda/cuda.c:532:
+cuda_mem_unregister(struct rte_gpu * dev, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#671: FILE: drivers/gpu/cuda/cuda.c:532:
+cuda_mem_unregister(struct rte_gpu * dev, void * ptr)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#674: FILE: drivers/gpu/cuda/cuda.c:535:
+	struct mem_entry * mem_item;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#675: FILE: drivers/gpu/cuda/cuda.c:536:
+	const char * err_string;

ERROR:SPACING: space required before the open parenthesis '('
#678: FILE: drivers/gpu/cuda/cuda.c:539:
+	if(dev == NULL || ptr == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#684: FILE: drivers/gpu/cuda/cuda.c:545:
+	if(mem_item == NULL)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#684: FILE: drivers/gpu/cuda/cuda.c:545:
+	if(mem_item == NULL)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#690: FILE: drivers/gpu/cuda/cuda.c:551:
+	if(mem_item->mtype == CPU_REGISTERED)
+	{

ERROR:SPACING: space required before the open parenthesis '('
#690: FILE: drivers/gpu/cuda/cuda.c:551:
+	if(mem_item->mtype == CPU_REGISTERED)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#693: FILE: drivers/gpu/cuda/cuda.c:554:
+		if(CUDA_SUCCESS != res)
+		{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#693: FILE: drivers/gpu/cuda/cuda.c:554:
+		if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#693: FILE: drivers/gpu/cuda/cuda.c:554:
+		if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 102 exceeds 100 columns
#696: FILE: drivers/gpu/cuda/cuda.c:557:
+			rte_gpu_log(ERR, "cuMemHostUnregister current failed with %s.
", err_string);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#703: FILE: drivers/gpu/cuda/cuda.c:564:
+	else
+	{

ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#703: FILE: drivers/gpu/cuda/cuda.c:564:
+	}
+	else

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#713: FILE: drivers/gpu/cuda/cuda.c:574:
+cuda_dev_close(struct rte_gpu * dev)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#731: FILE: drivers/gpu/cuda/cuda.c:592:
+	const char * err_string;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#733: FILE: drivers/gpu/cuda/cuda.c:594:
+	struct cuda_info * private;

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#764: FILE: drivers/gpu/cuda/cuda.c:625:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#764: FILE: drivers/gpu/cuda/cuda.c:625:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#764: FILE: drivers/gpu/cuda/cuda.c:625:
+	if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#775: FILE: drivers/gpu/cuda/cuda.c:636:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#775: FILE: drivers/gpu/cuda/cuda.c:636:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#775: FILE: drivers/gpu/cuda/cuda.c:636:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 108 exceeds 100 columns
#792: FILE: drivers/gpu/cuda/cuda.c:653:
+	res = cuDeviceGetAttribute(&(processor_count), CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, cu_dev_id);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#793: FILE: drivers/gpu/cuda/cuda.c:654:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#793: FILE: drivers/gpu/cuda/cuda.c:654:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#793: FILE: drivers/gpu/cuda/cuda.c:654:
+	if(CUDA_SUCCESS != res)

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#806: FILE: drivers/gpu/cuda/cuda.c:667:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#806: FILE: drivers/gpu/cuda/cuda.c:667:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#806: FILE: drivers/gpu/cuda/cuda.c:667:
+	if(CUDA_SUCCESS != res)

WARNING:LONG_LINE: line length of 102 exceeds 100 columns
#819: FILE: drivers/gpu/cuda/cuda.c:680:
+	dev->mpshared->dev_private = rte_zmalloc(NULL, sizeof(struct cuda_info), RTE_CACHE_LINE_SIZE);

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#829: FILE: drivers/gpu/cuda/cuda.c:690:
+	if(CUDA_SUCCESS != res)
+	{

WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#829: FILE: drivers/gpu/cuda/cuda.c:690:
+	if(CUDA_SUCCESS != res)

ERROR:SPACING: space required before the open parenthesis '('
#829: FILE: drivers/gpu/cuda/cuda.c:690:
+	if(CUDA_SUCCESS != res)

total: 115 errors, 62 warnings, 789 lines checked
Warning in drivers/gpu/cuda/cuda.c:
Using %l format, prefer %PRI*64 if type is [u]int64_t

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-05 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211005224905.13505-1-eagostini@nvidia.com>
2021-10-05 14:40 ` [dpdk-test-report] |WARNING| pw100516 [RFC PATCH] gpu/cuda: introduce CUDA driver checkpatch

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).