All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: greybus: Fix spinlock_t definition without comment
Date: Fri, 5 Apr 2019 23:53:04 +0300	[thread overview]
Message-ID: <20190405205304.GS32590@kadam> (raw)
In-Reply-To: <20190405200046.20600-1-madhumithabiw@gmail.com>

On Fri, Apr 05, 2019 at 03:00:46PM -0500, Madhumitha Prabakaran wrote:
> Fix spinlock_t definition without comment.
> 
> Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
> ---
>  drivers/staging/greybus/connection.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
> index 5ca3befc0636..0aedd246e94a 100644
> --- a/drivers/staging/greybus/connection.h
> +++ b/drivers/staging/greybus/connection.h
> @@ -47,7 +47,7 @@ struct gb_connection {
>  	unsigned long			flags;
>  
>  	struct mutex			mutex;
> -	spinlock_t			lock;
> +	spinlock_t			lock; /* Protect structure fields */
>  	enum gb_connection_state	state;

What does the mutex do then?  Why can't we just use the spinlock for
everything?

I did glance at the code and it wasn't immediately obvious to me.

regards,
dan carpenter


  reply	other threads:[~2019-04-05 20:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 20:00 [PATCH] Staging: greybus: Fix spinlock_t definition without comment Madhumitha Prabakaran
2019-04-05 20:53 ` Dan Carpenter [this message]
2019-04-05 22:50   ` [greybus-dev] " Alex Elder
2019-04-06 23:06     ` Madhumthia Prabakaran
2019-04-15 12:59     ` Johan Hovold
2019-04-06 22:55   ` Madhumthia Prabakaran

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=20190405205304.GS32590@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madhumithabiw@gmail.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.