All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.vnet.ibm.com>
To: Andrew Jeffery <andrew@aj.id.au>,
	joel@jms.id.au, jk@ozlabs.org, bradleyb@fuzziesquirrel.com,
	cbostic@linux.vnet.ibm.com
Cc: openbmc@lists.ozlabs.org
Subject: Re: [PATCH linux dev-4.13 09/16] hwmon (p9_sbe): Rename lock member of struct p9_sbe_occ
Date: Thu, 22 Feb 2018 14:31:15 -0600	[thread overview]
Message-ID: <2292266c-c8ef-a694-6f41-eec313fd5bad@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180220041844.13228-10-andrew@aj.id.au>



On 02/19/2018 10:18 PM, Andrew Jeffery wrote:
> Improve code clarity (and searchability) by renaming the lock to client_lock.
> The end result is it is easier to search for uses in the source file.

Acked-by: Eddie James <eajames@linux.vnet.ibm.com>

>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>   drivers/hwmon/occ/p9_sbe.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c
> index 9b8f2f650895..51bdfa89f1a6 100644
> --- a/drivers/hwmon/occ/p9_sbe.c
> +++ b/drivers/hwmon/occ/p9_sbe.c
> @@ -34,7 +34,7 @@ struct p9_sbe_occ {
>   	 * open, close and NULL assignment. This prevents simultaneous opening
>   	 * and closing of the client, or closing multiple times.
>   	 */
> -	spinlock_t lock;
> +	spinlock_t client_lock;
>   };
>
>   #define to_p9_sbe_occ(x)	container_of((x), struct p9_sbe_occ, occ)
> @@ -44,11 +44,11 @@ static void p9_sbe_occ_close_client(struct p9_sbe_occ *ctx)
>   	unsigned long flags;
>   	struct occ_client *tmp_client;
>
> -	spin_lock_irqsave(&ctx->lock, flags);
> +	spin_lock_irqsave(&ctx->client_lock, flags);
>   	tmp_client = ctx->client;
>   	ctx->client = NULL;
>   	occ_drv_release(tmp_client);
> -	spin_unlock_irqrestore(&ctx->lock, flags);
> +	spin_unlock_irqrestore(&ctx->client_lock, flags);
>   }
>
>   static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd)
> @@ -58,10 +58,10 @@ static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd)
>   	struct occ_response *resp = &occ->resp;
>   	struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ);
>
> -	spin_lock_irqsave(&ctx->lock, flags);
> +	spin_lock_irqsave(&ctx->client_lock, flags);
>   	if (ctx->sbe)
>   		ctx->client = occ_drv_open(ctx->sbe, 0);
> -	spin_unlock_irqrestore(&ctx->lock, flags);
> +	spin_unlock_irqrestore(&ctx->client_lock, flags);
>
>   	if (!ctx->client)
>   		return -ENODEV;

  reply	other threads:[~2018-02-22 20:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20  4:18 [PATCH linux dev-4.13 00/16] Locking fixes for FSI, SBEFIFO, OCC Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 01/16] dts: fsi: Make OCC description match expected hierarchy Andrew Jeffery
2018-02-22 20:25   ` Eddie James
2018-02-23  0:15     ` Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 02/16] hwmon (p9_sbe): Initialise device spin lock Andrew Jeffery
2018-02-22 20:26   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 03/16] fsi: sbefifo: Rename sbefifo_release_client() for consistency Andrew Jeffery
2018-02-22 20:28   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 04/16] fsi: sbefifo: Add tracing of transfers Andrew Jeffery
2018-02-22 20:28   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 05/16] fsi: gpio: Trace busy count Andrew Jeffery
2018-02-22 20:29   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 06/16] fsi: occ: Add tracepoints Andrew Jeffery
2018-02-22 20:29   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 07/16] fsi: sbefifo: don't delete canceled xfrs in write Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 08/16] hwmon (p9_sbe): Rename context variable Andrew Jeffery
2018-02-22 20:30   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 09/16] hwmon (p9_sbe): Rename lock member of struct p9_sbe_occ Andrew Jeffery
2018-02-22 20:31   ` Eddie James [this message]
2018-02-20  4:18 ` [PATCH linux dev-4.13 10/16] hwmon (p9_sbe): Convert client_lock from a spinlock to a mutex Andrew Jeffery
2018-02-22 20:31   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 11/16] hwmon (p9_sbe): Add static key to satisfy lockdep Andrew Jeffery
2018-02-22 20:32   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 12/16] fsi: sbefifo: Avoid using a timer to drive FIFO transfers Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 13/16] fsi: sbefifo: Switch to mutex in work function Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 14/16] fsi: sbefifo: Switch list_lock from spinlock to mutex Andrew Jeffery
2018-02-22 20:35   ` Eddie James
2018-02-20  4:18 ` [PATCH linux dev-4.13 15/16] fsi: gpio: Remove unused 'id' variable Andrew Jeffery
2018-02-20  4:18 ` [PATCH linux dev-4.13 16/16] fsi: gpio: Use a mutex to protect transfers Andrew Jeffery

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=2292266c-c8ef-a694-6f41-eec313fd5bad@linux.vnet.ibm.com \
    --to=eajames@linux.vnet.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=cbostic@linux.vnet.ibm.com \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /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.