From: Leon Romanovsky <leon@kernel.org>
To: Muhammad Falak R Wani <falakreyaz@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Mike Marciniszyn <infinipath@intel.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing.
Date: Mon, 2 May 2016 08:27:55 +0300 [thread overview]
Message-ID: <20160502052755.GC10276@leon.nu> (raw)
In-Reply-To: <1462106131-9073-1-git-send-email-falakreyaz@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
On Sun, May 01, 2016 at 06:05:31PM +0530, Muhammad Falak R Wani wrote:
> It is safe to use RCU_INIT_POINTER() to NULL a pointer, instead of
> rcu_assign_pointer().
> This results in slightly smaller/faster code.
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
I'm fine with your commit message and don't need to resend, however
the statements like "smaller code" need to be supported by
./scripts/bloat-o-meter and "faster code" by performance analysis.
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/staging/rdma/hfi1/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c
> index cfcdc16..34e0f90 100644
> --- a/drivers/staging/rdma/hfi1/init.c
> +++ b/drivers/staging/rdma/hfi1/init.c
> @@ -1303,7 +1303,7 @@ static void cleanup_device_data(struct hfi1_devdata *dd)
>
> spin_lock(&ppd->cc_state_lock);
> cc_state = get_cc_state(ppd);
> - rcu_assign_pointer(ppd->cc_state, NULL);
> + RCU_INIT_POINTER(ppd->cc_state, NULL);
> spin_unlock(&ppd->cc_state_lock);
>
> if (cc_state)
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-02 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 12:35 [PATCH] staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing Muhammad Falak R Wani
2016-05-02 5:27 ` Leon Romanovsky [this message]
2016-05-13 19:38 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160502052755.GC10276@leon.nu \
--to=leon@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=dledford@redhat.com \
--cc=falakreyaz@gmail.com \
--cc=hal.rosenstock@gmail.com \
--cc=infinipath@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).