linux: qed: Remove unnecessary ‘NULL’ values values from Pointer
Subsystems (3)
PATCH 1/1 linux: qed: Remove unnecessary ‘NULL’ values values from Pointer
The pointer p_ret is first assigned and finally used as the return value of the function.
Signed-off-by Li zeming <[email protected]>
--- include/linux/qed/qed_chain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/qed/qed_chain.h +1 -1
@@ -368,7 +368,7 @@ static inline void qed_chain_return_produced(struct qed_chain *p_chain)*/ static inline void *qed_chain_produce (struct qed_chain *p_chain) { -void *p_ret =NULL , *p_prod_idx, *p_prod_page_idx; +void *p_ret, *p_prod_idx, *p_prod_page_idx;if (is_chain_u16 (p_chain)) { if ((p_chain->u.chain16.prod_idx &
Signature · 1 line
2.18.2
Jakub Kicinski
maintainerQuoted 2 lines · On Mon, 19 Sep 2022 10:06:14 +0800 Li zeming wrote:
The pointer
p_retis first assigned and finally used as the return value of the function.
This patch doesn't make anything substantially better.
Thank you very much for your reply. Before, I found in the test that variable initialization assignment need to execute mov-related assembly instructions. If you remove unnecessary initialization assignments, you should be able to reduce the execution of some instructions.