mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Hoan Tran <hotran@apm.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>,
	Robert Moore <robert.moore@intel.com>,
	Prakash Prashanth <pprakash@codeaurora.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	lho@apm.com, Duc Dang <dhdang@apm.com>,
	devel@acpica.org
Subject: Re: [PATCH] mailbox: PCC: Fix return value of pcc_mbox_request_channel()
Date: Fri, 21 Oct 2016 23:31:18 +0200	[thread overview]
Message-ID: <9431714.tmtHQX6MJq@vostro.rjw.lan> (raw)
In-Reply-To: <1476487221-20337-1-git-send-email-hotran@apm.com>

On Friday, October 14, 2016 04:20:21 PM Hoan Tran wrote:
> When CONFIG_PCC is disabled, pcc_mbox_request_channel() needs to
> return ERR_PTR(-ENODEV), not a NULL pointer, as the callers of
> this function use IS_ERR() to check for error code.
> 
> Signed-off-by: Duc Dang <dhdang@apm.com>
> Signed-off-by: Hoan Tran <hotran@apm.com>
> ---
>  include/acpi/pcc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h
> index 17a940a..8caa79c 100644
> --- a/include/acpi/pcc.h
> +++ b/include/acpi/pcc.h
> @@ -21,7 +21,7 @@ extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
>  static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
>  							 int subspace_id)
>  {
> -	return NULL;
> +	return ERR_PTR(-ENODEV);
>  }
>  static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
>  #endif
> 

Applied.

Thanks,
Rafael

      reply	other threads:[~2016-10-21 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 23:20 Hoan Tran
2016-10-21 21:31 ` Rafael J. Wysocki [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=9431714.tmtHQX6MJq@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=devel@acpica.org \
    --cc=dhdang@apm.com \
    --cc=hotran@apm.com \
    --cc=lenb@kernel.org \
    --cc=lho@apm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pprakash@codeaurora.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@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

all inboxes | Powered by JetHome®