All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lightnvm: Remove an unused variable
@ 2017-05-09  9:34 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-05-09  9:34 UTC (permalink / raw)
  To: kernel-janitors

"rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
code around so it's uninitialized and causes a static checker warning.
Let's just remove it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 8c4adac6fafc..765f07669ae3 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -464,8 +464,8 @@ static int nvme_nvm_set_bb_tbl(struct nvm_dev *nvmdev, struct ppa_addr *ppas,
 	return ret;
 }
 
-static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd,
-				struct nvme_ns *ns, struct nvme_nvm_command *c)
+static inline void nvme_nvm_rqtocmd(struct nvm_rq *rqd,	struct nvme_ns *ns,
+				    struct nvme_nvm_command *c)
 {
 	c->ph_rw.opcode = rqd->opcode;
 	c->ph_rw.nsid = cpu_to_le32(ns->ns_id);
@@ -503,7 +503,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
 	if (!cmd)
 		return -ENOMEM;
 
-	nvme_nvm_rqtocmd(rq, rqd, ns, cmd);
+	nvme_nvm_rqtocmd(rqd, ns, cmd);
 
 	rq = nvme_alloc_request(q, (struct nvme_command *)cmd, 0, NVME_QID_ANY);
 	if (IS_ERR(rq)) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] lightnvm: Remove an unused variable
@ 2017-05-09  9:34 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-05-09  9:34 UTC (permalink / raw)


"rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
code around so it's uninitialized and causes a static checker warning.
Let's just remove it.

Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c
index 8c4adac6fafc..765f07669ae3 100644
--- a/drivers/nvme/host/lightnvm.c
+++ b/drivers/nvme/host/lightnvm.c
@@ -464,8 +464,8 @@ static int nvme_nvm_set_bb_tbl(struct nvm_dev *nvmdev, struct ppa_addr *ppas,
 	return ret;
 }
 
-static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd,
-				struct nvme_ns *ns, struct nvme_nvm_command *c)
+static inline void nvme_nvm_rqtocmd(struct nvm_rq *rqd,	struct nvme_ns *ns,
+				    struct nvme_nvm_command *c)
 {
 	c->ph_rw.opcode = rqd->opcode;
 	c->ph_rw.nsid = cpu_to_le32(ns->ns_id);
@@ -503,7 +503,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
 	if (!cmd)
 		return -ENOMEM;
 
-	nvme_nvm_rqtocmd(rq, rqd, ns, cmd);
+	nvme_nvm_rqtocmd(rqd, ns, cmd);
 
 	rq = nvme_alloc_request(q, (struct nvme_command *)cmd, 0, NVME_QID_ANY);
 	if (IS_ERR(rq)) {

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] lightnvm: Remove an unused variable
  2017-05-09  9:34 ` Dan Carpenter
@ 2017-05-09 10:19   ` Javier González
  -1 siblings, 0 replies; 6+ messages in thread
From: Javier González @ 2017-05-09 10:19 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

> On 9 May 2017, at 11.34, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> "rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
> code around so it's uninitialized and causes a static checker warning.
> Let's just remove it.
> 

Looks good. I didn't see it when I refactored that part.
Matias: If it is ok with you, can you pick it up?

Reviewed-by: Javier González <javier@cnexlabs.com>

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] lightnvm: Remove an unused variable
@ 2017-05-09 10:19   ` Javier González
  0 siblings, 0 replies; 6+ messages in thread
From: Javier González @ 2017-05-09 10:19 UTC (permalink / raw)


> On 9 May 2017,@11.34, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> "rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
> code around so it's uninitialized and causes a static checker warning.
> Let's just remove it.
> 

Looks good. I didn't see it when I refactored that part.
Matias: If it is ok with you, can you pick it up?

Reviewed-by: Javier Gonz?lez <javier at cnexlabs.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20170509/ffea115f/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lightnvm: Remove an unused variable
  2017-05-09 10:19   ` Javier González
@ 2017-05-09 14:50     ` Jens Axboe
  -1 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2017-05-09 14:50 UTC (permalink / raw)
  To: kernel-janitors

On 05/09/2017 04:19 AM, Javier González wrote:
>> On 9 May 2017, at 11.34, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>>
>> "rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
>> code around so it's uninitialized and causes a static checker warning.
>> Let's just remove it.
>>
> 
> Looks good. I didn't see it when I refactored that part.
> Matias: If it is ok with you, can you pick it up?
> 
> Reviewed-by: Javier González <javier@cnexlabs.com>

Geert sent in a similar fix two days ago, it's already queued up:

commit 629b1b2e0e6c8285fdc21624af60e8190fa4417e
Author: Geert Uytterhoeven <geert@linux-m68k.org>
Date:   Sun May 7 16:14:44 2017 +0200

    lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] lightnvm: Remove an unused variable
@ 2017-05-09 14:50     ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2017-05-09 14:50 UTC (permalink / raw)


On 05/09/2017 04:19 AM, Javier Gonz?lez wrote:
>> On 9 May 2017,@11.34, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>>
>> "rq" is never used in nvme_nvm_rqtocmd().  We also recently shifted some
>> code around so it's uninitialized and causes a static checker warning.
>> Let's just remove it.
>>
> 
> Looks good. I didn't see it when I refactored that part.
> Matias: If it is ok with you, can you pick it up?
> 
> Reviewed-by: Javier Gonz?lez <javier at cnexlabs.com>

Geert sent in a similar fix two days ago, it's already queued up:

commit 629b1b2e0e6c8285fdc21624af60e8190fa4417e
Author: Geert Uytterhoeven <geert at linux-m68k.org>
Date:   Sun May 7 16:14:44 2017 +0200

    lightnvm: remove unused rq parameter of nvme_nvm_rqtocmd() to kill warning

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-09 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09  9:34 [PATCH] lightnvm: Remove an unused variable Dan Carpenter
2017-05-09  9:34 ` Dan Carpenter
2017-05-09 10:19 ` Javier González
2017-05-09 10:19   ` Javier González
2017-05-09 14:50   ` Jens Axboe
2017-05-09 14:50     ` Jens Axboe

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.