linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dimitri Sivanich <sivanich@sgi.com>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org,
	Felipe Balbi <balbi@ti.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	"Juergen E. Fischer" <fischer@norbit.de>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] cleanup on stack DECLARE_COMPLETIONs
Date: Mon, 29 Dec 2014 09:38:56 -0600	[thread overview]
Message-ID: <20141229153856.GA5661@sgi.com> (raw)
In-Reply-To: <1419356048-22405-1-git-send-email-der.herr@hofr.at>

On Tue, Dec 23, 2014 at 06:34:08PM +0100, Nicholas Mc Guire wrote:
> fixups for incorrect use of DECLARE_COMPLETION. see also commit
> 6e9a4738 ("completions: lockdep annotate on stack completions")
> The only somewhat special case being
> drivers/misc/sgi-gru/grukservices.c:quicktest2
> which had a static qualifier in the original DECLARE_COMPLETION()
> but that seems to be wrong (why should the completion persisted between
> successive calls ?) so the conversion to DECLARE_COMPLETION_ONSTACK
> was also applied and the static qualifier removed.
> 
> Not sure if this is suitable in this form or if it should go out as
> 5 seperate patches ? 
> 
> This was only code reviewed and compile tested

Acking just the drivers/misc/sgi-gru/grukservices.c patch of this set.

Acked-by: Dimitri Sivanich <sivanich@sgi.com>

> 
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
>  drivers/macintosh/ams/ams-pmu.c       |    4 ++--
>  drivers/misc/sgi-gru/grukservices.c   |    2 +-
>  drivers/scsi/aha152x.c                |    2 +-
>  drivers/usb/gadget/udc/fsl_qe_udc.c   |    2 +-
>  drivers/usb/gadget/udc/fsl_udc_core.c |    2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/macintosh/ams/ams-pmu.c b/drivers/macintosh/ams/ams-pmu.c
> index 4f61b3e..c2b178f 100644
> --- a/drivers/macintosh/ams/ams-pmu.c
> +++ b/drivers/macintosh/ams/ams-pmu.c
> @@ -52,7 +52,7 @@ static void ams_pmu_req_complete(struct adb_request *req)
>  static void ams_pmu_set_register(u8 reg, u8 value)
>  {
>  	static struct adb_request req;
> -	DECLARE_COMPLETION(req_complete);
> +	DECLARE_COMPLETION_ONSTACK(req_complete);
> 
>  	req.arg = &req_complete;
>  	if (pmu_request(&req, ams_pmu_req_complete, 4, ams_pmu_cmd, 0x00, reg, value))
> @@ -65,7 +65,7 @@ static void ams_pmu_set_register(u8 reg, u8 value)
>  static u8 ams_pmu_get_register(u8 reg)
>  {
>  	static struct adb_request req;
> -	DECLARE_COMPLETION(req_complete);
> +	DECLARE_COMPLETION_ONSTACK(req_complete);
> 
>  	req.arg = &req_complete;
>  	if (pmu_request(&req, ams_pmu_req_complete, 3, ams_pmu_cmd, 0x01, reg))
> diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
> index 913de07..4e412fe 100644
> --- a/drivers/misc/sgi-gru/grukservices.c
> +++ b/drivers/misc/sgi-gru/grukservices.c
> @@ -1044,7 +1044,7 @@ done:
> 
>  static int quicktest2(unsigned long arg)
>  {
> -	static DECLARE_COMPLETION(cmp);
> +	DECLARE_COMPLETION_ONSTACK(cmp);
>  	unsigned long han;
>  	int blade_id = 0;
>  	int numcb = 4;
> diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
> index 2b960b3..b16afb9 100644
> --- a/drivers/scsi/aha152x.c
> +++ b/drivers/scsi/aha152x.c
> @@ -1055,7 +1055,7 @@ static int aha152x_abort(Scsi_Cmnd *SCpnt)
>  static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
>  {
>  	struct Scsi_Host *shpnt = SCpnt->device->host;
> -	DECLARE_COMPLETION(done);
> +	DECLARE_COMPLETION_ONSTACK(done);
>  	int ret, issued, disconnected;
>  	unsigned char old_cmd_len = SCpnt->cmd_len;
>  	unsigned long flags;
> diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
> index 795c99c..e0822f1 100644
> --- a/drivers/usb/gadget/udc/fsl_qe_udc.c
> +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
> @@ -2630,7 +2630,7 @@ static int qe_udc_remove(struct platform_device *ofdev)
>  	struct qe_udc *udc = platform_get_drvdata(ofdev);
>  	struct qe_ep *ep;
>  	unsigned int size;
> -	DECLARE_COMPLETION(done);
> +	DECLARE_COMPLETION_ONSTACK(done);
> 
>  	usb_del_gadget_udc(&udc->gadget);
> 
> diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
> index 2df8074..c3830ad 100644
> --- a/drivers/usb/gadget/udc/fsl_udc_core.c
> +++ b/drivers/usb/gadget/udc/fsl_udc_core.c
> @@ -2529,7 +2529,7 @@ static int __exit fsl_udc_remove(struct platform_device *pdev)
>  	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev);
> 
> -	DECLARE_COMPLETION(done);
> +	DECLARE_COMPLETION_ONSTACK(done);
> 
>  	if (!udc_controller)
>  		return -ENODEV;
> --
> 1.7.10.4

      parent reply	other threads:[~2014-12-29 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 17:34 [PATCH] cleanup on stack DECLARE_COMPLETIONs Nicholas Mc Guire
2014-12-23 18:19 ` Felipe Balbi
2014-12-29 15:38 ` Dimitri Sivanich [this message]

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=20141229153856.GA5661@sgi.com \
    --to=sivanich@sgi.com \
    --cc=JBottomley@parallels.com \
    --cc=balbi@ti.com \
    --cc=der.herr@hofr.at \
    --cc=fischer@norbit.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@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 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).