* [PATCH 1/1] net: qlcnic: avoid superfluous assignement
@ 2016-07-31 10:07 Heinrich Schuchardt
2016-08-01 2:57 ` zhuyj
2016-08-01 20:44 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 10:07 UTC (permalink / raw)
To: Dept-GELinuxNICDev; +Cc: netdev, linux-kernel, Heinrich Schuchardt
Assigning NULL to parmeter dcb has no effect outside of the
inlined function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
index 9777e57..f4aa633 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
@@ -45,7 +45,6 @@ struct qlcnic_dcb {
static inline void qlcnic_clear_dcb_ops(struct qlcnic_dcb *dcb)
{
kfree(dcb);
- dcb = NULL;
}
static inline int qlcnic_dcb_get_hw_capability(struct qlcnic_dcb *dcb)
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement
2016-07-31 10:07 [PATCH 1/1] net: qlcnic: avoid superfluous assignement Heinrich Schuchardt
@ 2016-08-01 2:57 ` zhuyj
2016-08-01 3:32 ` David Miller
2016-08-01 20:44 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: zhuyj @ 2016-08-01 2:57 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Dept-GELinuxNICDev, netdev, LKML
Sorry.
An inline function will be inserted into the calling function. Why
"Assigning NULL to parmeter dcb has no effect outside of the
inlined function." ?
On Sun, Jul 31, 2016 at 6:07 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> Assigning NULL to parmeter dcb has no effect outside of the
> inlined function.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
> index 9777e57..f4aa633 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
> @@ -45,7 +45,6 @@ struct qlcnic_dcb {
> static inline void qlcnic_clear_dcb_ops(struct qlcnic_dcb *dcb)
> {
> kfree(dcb);
> - dcb = NULL;
> }
>
> static inline int qlcnic_dcb_get_hw_capability(struct qlcnic_dcb *dcb)
> --
> 2.8.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement
2016-08-01 2:57 ` zhuyj
@ 2016-08-01 3:32 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-08-01 3:32 UTC (permalink / raw)
To: zyjzyj2000; +Cc: xypron.glpk, Dept-GELinuxNICDev, netdev, linux-kernel
From: zhuyj <zyjzyj2000@gmail.com>
Date: Mon, 1 Aug 2016 10:57:20 +0800
> Sorry.
> An inline function will be inserted into the calling function. Why
> "Assigning NULL to parmeter dcb has no effect outside of the
> inlined function." ?
It doesn't do anything to "dcb" in the calling function, that's not
how inlining works.
The inlined function behaves exactly as if it were called as a
non-inline function from the perspective of side effects visible to
the program.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement
2016-07-31 10:07 [PATCH 1/1] net: qlcnic: avoid superfluous assignement Heinrich Schuchardt
2016-08-01 2:57 ` zhuyj
@ 2016-08-01 20:44 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-08-01 20:44 UTC (permalink / raw)
To: xypron.glpk; +Cc: Dept-GELinuxNICDev, netdev, linux-kernel
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 12:07:37 +0200
> Assigning NULL to parmeter dcb has no effect outside of the
> inlined function.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-01 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 10:07 [PATCH 1/1] net: qlcnic: avoid superfluous assignement Heinrich Schuchardt
2016-08-01 2:57 ` zhuyj
2016-08-01 3:32 ` David Miller
2016-08-01 20:44 ` David Miller
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).