From: Greg KH <gregkh@linuxfoundation.org>
To: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 2/3] Staging: lustre: Replace LPROCFS_CLIMP_EXIT with lprocfs_climp_exit
Date: Sat, 24 Oct 2015 18:51:10 -0700 [thread overview]
Message-ID: <20151025015110.GD536@kroah.com> (raw)
In-Reply-To: <2f3b181baa7f390b1169b8c8baa3f3cebb92da72.1445462106.git.ksenija.stanojevic@gmail.com>
On Wed, Oct 21, 2015 at 11:20:34PM +0200, Ksenija Stanojevic wrote:
> Static inline functions are preferred over macros. The function is
> placed in obd_class.h instead lprocfs_status.h because obd_class.h
> includes header obd.h which contains definition of struct obd_device
> and in that way avoids build error: Dereferencing pointer to incomplete
> type.
>
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
> drivers/staging/lustre/lustre/include/obd_class.h | 5 +++++
> drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +-
> drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 12 ++++++------
> drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 6 +++---
> 4 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
> index 56c2096..ad15a10 100644
> --- a/drivers/staging/lustre/lustre/include/obd_class.h
> +++ b/drivers/staging/lustre/lustre/include/obd_class.h
> @@ -262,6 +262,11 @@ static inline int lprocfs_climp_check(struct obd_device *obd)
> return 0;
> }
>
> +static inline void lprocfs_climp_exit(struct obd_device *obd)
> +{
> + up_read(&(obd)->u.cli.cl_sem);
> +}
Why not just use up_read() everywhere instead? You'll just be removing
this wrapper function in a later patch anyway :)
thanks,
greg k-h
next prev parent reply other threads:[~2015-10-25 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 21:18 [PATCH 0/3] Staging: lustre: Replace macros with static inline functions Ksenija Stanojevic
2015-10-21 21:19 ` [PATCH 1/3] Staging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_check Ksenija Stanojevic
2015-10-25 1:50 ` [Outreachy kernel] " Greg KH
2015-10-21 21:20 ` [PATCH 2/3] Staging: lustre: Replace LPROCFS_CLIMP_EXIT with lprocfs_climp_exit Ksenija Stanojevic
2015-10-25 1:51 ` Greg KH [this message]
2015-10-21 21:21 ` [PATCH 3/3] Staging: lustre: Remove unused macros Ksenija Stanojevic
2015-10-25 1:51 ` [Outreachy kernel] " Greg KH
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=20151025015110.GD536@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ksenija.stanojevic@gmail.com \
--cc=outreachy-kernel@googlegroups.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 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.