Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452800 > unrolled thread
| Started by | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| First post | 2016-07-31 12:10 +0200 |
| Last post | 2016-08-01 22:50 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] net: qlcnic: avoid superfluous assignement Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 12:10 +0200
Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement zhuyj <zyjzyj2000@gmail.com> - 2016-08-01 05:00 +0200
Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement David Miller <davem@davemloft.net> - 2016-08-01 05:40 +0200
Re: [PATCH 1/1] net: qlcnic: avoid superfluous assignement David Miller <davem@davemloft.net> - 2016-08-01 22:50 +0200
| From | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| Date | 2016-07-31 12:10 +0200 |
| Subject | [PATCH 1/1] net: qlcnic: avoid superfluous assignement |
| Message-ID | <s0VQZ-79F-21@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | zhuyj <zyjzyj2000@gmail.com> |
|---|---|
| Date | 2016-08-01 05:00 +0200 |
| Message-ID | <s1bCp-gK-5@gated-at.bofh.it> |
| In reply to | #1452800 |
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
>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-08-01 05:40 +0200 |
| Message-ID | <s1cf7-Qb-9@gated-at.bofh.it> |
| In reply to | #1452942 |
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.
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-08-01 22:50 +0200 |
| Message-ID | <s1sjU-2WL-29@gated-at.bofh.it> |
| In reply to | #1452800 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web