* re: pktcdvd: add struct pktcdvd_device * to pkt_dbg
@ 2013-08-01 15:44 Dan Carpenter
2013-08-01 16:32 ` Joe Perches
2013-08-02 20:10 ` [PATCH] pktcdvd: Fix defective misuses of pkt_<level> Joe Perches
0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-08-01 15:44 UTC (permalink / raw)
To: kernel-janitors
Hello Joe Perches,
This is a semi-automatic email about new static checker warnings.
The patch 3567318a63ff: "pktcdvd: add struct pktcdvd_device * to
pkt_dbg" from Aug 1, 2013, leads to the following Smatch complaint:
drivers/block/pktcdvd.c:2844 pkt_remove_dev()
error: we previously assumed 'pd' could be null (see line 2840)
drivers/block/pktcdvd.c
2839 pd = pkt_devs[idx];
2840 if (pd && (pd->pkt_dev = pkt_dev))
^^
Old check.
2841 break;
2842 }
2843 if (idx = MAX_WRITERS) {
2844 pkt_dbg(1, pd, "dev not setup\n");
^^
New dereference.
2845 ret = -ENXIO;
2846 goto out;
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: pktcdvd: add struct pktcdvd_device * to pkt_dbg
2013-08-01 15:44 pktcdvd: add struct pktcdvd_device * to pkt_dbg Dan Carpenter
@ 2013-08-01 16:32 ` Joe Perches
2013-08-02 20:10 ` [PATCH] pktcdvd: Fix defective misuses of pkt_<level> Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2013-08-01 16:32 UTC (permalink / raw)
To: kernel-janitors
On Thu, 2013-08-01 at 18:44 +0300, Dan Carpenter wrote:
> drivers/block/pktcdvd.c:2844 pkt_remove_dev()
> error: we previously assumed 'pd' could be null (see line 2840)
Thanks Dan, I'll fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] pktcdvd: Fix defective misuses of pkt_<level>
2013-08-01 15:44 pktcdvd: add struct pktcdvd_device * to pkt_dbg Dan Carpenter
2013-08-01 16:32 ` Joe Perches
@ 2013-08-02 20:10 ` Joe Perches
2013-08-06 20:21 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2013-08-02 20:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kernel-janitors, Jiri Kosina, LKML, Andrew Morton
Fix thinkos where pkt_<level> needs a valid
pktcdvd_device * and the pointer is known to
be NULL.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> (go smatch!)
Signed-off-by: Joe Perches <joe@perches.com>
---
Andrew, I believe Jiri picked up this series and
you can drop them from mm. Thanks.
drivers/block/pktcdvd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 29a5194..5618847 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2360,8 +2360,8 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
pd = q->queuedata;
if (!pd) {
- pkt_err(pd, "%s incorrect request queue\n",
- bdevname(bio->bi_bdev, b));
+ pr_err("%s incorrect request queue\n",
+ bdevname(bio->bi_bdev, b));
goto end_io;
}
@@ -2841,7 +2841,7 @@ static int pkt_remove_dev(dev_t pkt_dev)
break;
}
if (idx = MAX_WRITERS) {
- pkt_dbg(1, pd, "dev not setup\n");
+ pr_debug("dev not setup\n");
ret = -ENXIO;
goto out;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] pktcdvd: Fix defective misuses of pkt_<level>
2013-08-02 20:10 ` [PATCH] pktcdvd: Fix defective misuses of pkt_<level> Joe Perches
@ 2013-08-06 20:21 ` Andrew Morton
2013-08-06 23:58 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2013-08-06 20:21 UTC (permalink / raw)
To: Joe Perches; +Cc: Dan Carpenter, kernel-janitors, Jiri Kosina, LKML
On Fri, 02 Aug 2013 13:10:54 -0700 Joe Perches <joe@perches.com> wrote:
> Andrew, I believe Jiri picked up this series and
> you can drop them from mm. Thanks.
Shall do if/when they turn up in linux-next.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pktcdvd: Fix defective misuses of pkt_<level>
2013-08-06 20:21 ` Andrew Morton
@ 2013-08-06 23:58 ` Jiri Kosina
2013-08-26 10:58 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2013-08-06 23:58 UTC (permalink / raw)
To: Andrew Morton
Cc: Joe Perches, Dan Carpenter, kernel-janitors, LKML, Jens Axboe
On Tue, 6 Aug 2013, Andrew Morton wrote:
> > Andrew, I believe Jiri picked up this series and
> > you can drop them from mm. Thanks.
>
> Shall do if/when they turn up in linux-next.
Pull request to Jens is there [1], but his branch has been silent for two
weeks ...
[1] https://lkml.org/lkml/2013/7/30/277
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pktcdvd: Fix defective misuses of pkt_<level>
2013-08-06 23:58 ` Jiri Kosina
@ 2013-08-26 10:58 ` Jiri Kosina
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2013-08-26 10:58 UTC (permalink / raw)
To: Andrew Morton, Jens Axboe
Cc: Joe Perches, Dan Carpenter, kernel-janitors, LKML
On Wed, 7 Aug 2013, Jiri Kosina wrote:
> > > Andrew, I believe Jiri picked up this series and
> > > you can drop them from mm. Thanks.
> >
> > Shall do if/when they turn up in linux-next.
>
> Pull request to Jens is there [1], but his branch has been silent for two
> weeks ...
>
> [1] https://lkml.org/lkml/2013/7/30/277
And here goes a friendly ping to Jens ... ? :)
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-26 10:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 15:44 pktcdvd: add struct pktcdvd_device * to pkt_dbg Dan Carpenter
2013-08-01 16:32 ` Joe Perches
2013-08-02 20:10 ` [PATCH] pktcdvd: Fix defective misuses of pkt_<level> Joe Perches
2013-08-06 20:21 ` Andrew Morton
2013-08-06 23:58 ` Jiri Kosina
2013-08-26 10:58 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox