From: Frederic Barrat <fbarrat@linux.ibm.com>
To: Yue Haibing <yuehaibing@huawei.com>,
andrew.donnellan@au1.ibm.com, arnd@arndb.de,
gregkh@linuxfoundation.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] ocxl: remove set but not used variables 'tid' and 'lpid'
Date: Wed, 3 Apr 2019 15:58:47 +0200 [thread overview]
Message-ID: <043b4570-24b3-64ef-0036-aa8467fab497@linux.ibm.com> (raw)
In-Reply-To: <20190329154456.27152-1-yuehaibing@huawei.com>
Le 29/03/2019 à 16:44, Yue Haibing a écrit :
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/misc/ocxl/link.c: In function 'xsl_fault_handler':
> drivers/misc/ocxl/link.c:187:17: warning: variable 'tid' set but not used [-Wunused-but-set-variable]
> drivers/misc/ocxl/link.c:187:6: warning: variable 'lpid' set but not used [-Wunused-but-set-variable]
>
> They are never used and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
> drivers/misc/ocxl/link.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
> index d50b861..3be07e9 100644
> --- a/drivers/misc/ocxl/link.c
> +++ b/drivers/misc/ocxl/link.c
> @@ -184,7 +184,7 @@ static irqreturn_t xsl_fault_handler(int irq, void *data)
> u64 dsisr, dar, pe_handle;
> struct pe_data *pe_data;
> struct ocxl_process_element *pe;
> - int lpid, pid, tid;
> + int pid;
> bool schedule = false;
>
> read_irq(spa, &dsisr, &dar, &pe_handle);
> @@ -192,9 +192,7 @@ static irqreturn_t xsl_fault_handler(int irq, void *data)
>
> WARN_ON(pe_handle > SPA_PE_MASK);
> pe = spa->spa_mem + pe_handle;
> - lpid = be32_to_cpu(pe->lpid);
> pid = be32_to_cpu(pe->pid);
> - tid = be32_to_cpu(pe->tid);
> /* We could be reading all null values here if the PE is being
> * removed while an interrupt kicks in. It's not supposed to
> * happen if the driver notified the AFU to terminate the
>
next prev parent reply other threads:[~2019-04-03 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 15:44 [PATCH -next] ocxl: remove set but not used variables 'tid' and 'lpid' Yue Haibing
2019-03-29 21:29 ` Mukesh Ojha
2019-03-31 23:16 ` Andrew Donnellan
2019-04-03 13:58 ` Frederic Barrat [this message]
2019-05-03 6:59 ` Michael Ellerman
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=043b4570-24b3-64ef-0036-aa8467fab497@linux.ibm.com \
--to=fbarrat@linux.ibm.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).