* [PATCH] linux: qed: Remove unnecessary ‘NULL’ values values from Pointer
@ 2022-09-19 2:06 Li zeming
2022-09-20 23:47 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2022-09-19 2:06 UTC (permalink / raw)
To: aelior, manishc; +Cc: netdev, linux-kernel, Li zeming
The pointer p_ret is first assigned and finally used as the return value
of the function.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
include/linux/qed/qed_chain.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h
index a84063492c71..f52c589e6dfa 100644
--- a/include/linux/qed/qed_chain.h
+++ b/include/linux/qed/qed_chain.h
@@ -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 &
--
2.18.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] linux: qed: Remove unnecessary ‘NULL’ values values from Pointer
2022-09-19 2:06 [PATCH] linux: qed: Remove unnecessary ‘NULL’ values values from Pointer Li zeming
@ 2022-09-20 23:47 ` Jakub Kicinski
2022-09-22 1:39 ` Li zeming
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2022-09-20 23:47 UTC (permalink / raw)
To: Li zeming; +Cc: aelior, manishc, netdev, linux-kernel
On Mon, 19 Sep 2022 10:06:14 +0800 Li zeming wrote:
> The pointer p_ret is first assigned and finally used as the return value
> of the function.
This patch doesn't make anything substantially better.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] linux: qed: Remove unnecessary ‘NULL’ values values from Pointer
2022-09-20 23:47 ` Jakub Kicinski
@ 2022-09-22 1:39 ` Li zeming
0 siblings, 0 replies; 3+ messages in thread
From: Li zeming @ 2022-09-22 1:39 UTC (permalink / raw)
To: kuba; +Cc: aelior, linux-kernel, manishc, netdev, zeming
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-22 1:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 2:06 [PATCH] linux: qed: Remove unnecessary ‘NULL’ values values from Pointer Li zeming
2022-09-20 23:47 ` Jakub Kicinski
2022-09-22 1:39 ` Li zeming
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.