* [PATCH] xen-blkfront: Fix handling of non-supported operations
@ 2017-07-21 17:11 Bart Van Assche
2017-07-24 8:02 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bart Van Assche @ 2017-07-21 17:11 UTC (permalink / raw)
To: Jens Axboe
Cc: stable, linux-block, Bart Van Assche, xen-devel,
Christoph Hellwig, Roger Pau Monné
This patch fixes the following sparse warnings:
drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error
drivers/block/xen-blkfront.c:916:45: got int [signed] error
drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1599:47: expected int [signed] error
drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1607:55: expected int [signed] error
drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1625:55: expected int [signed] error
drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer
Compile-tested only.
Fixes: commit 2a842acab109 ("block: introduce new block status code type")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Roger Pau Monné <roger.pau@citrix.com>
Cc: <xen-devel@lists.xenproject.org>
Cc: <stable@vger.kernel.org>
---
drivers/block/xen-blkfront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index c852ed3c01d5..1799bba74390 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -111,7 +111,7 @@ struct blk_shadow {
};
struct blkif_req {
- int error;
+ blk_status_t error;
};
static inline struct blkif_req *blkif_req(struct request *rq)
@@ -1616,7 +1616,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
printk(KERN_WARNING "blkfront: %s: %s op failed\n",
info->gd->disk_name, op_name(bret->operation));
- blkif_req(req)->error = -EOPNOTSUPP;
+ blkif_req(req)->error = BLK_STS_NOTSUPP;
}
if (unlikely(bret->status == BLKIF_RSP_ERROR &&
rinfo->shadow[id].req.u.rw.nr_segments == 0)) {
--
2.13.2
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-blkfront: Fix handling of non-supported operations
2017-07-21 17:11 [PATCH] xen-blkfront: Fix handling of non-supported operations Bart Van Assche
@ 2017-07-24 8:02 ` Christoph Hellwig
2017-07-24 14:46 ` Jens Axboe
[not found] ` <f744ebdd-654c-1d6e-d977-28d2a4ce7be9@kernel.dk>
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2017-07-24 8:02 UTC (permalink / raw)
To: Bart Van Assche
Cc: Jens Axboe, stable, linux-block, xen-devel, Christoph Hellwig,
Roger Pau Monné
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-blkfront: Fix handling of non-supported operations
2017-07-21 17:11 [PATCH] xen-blkfront: Fix handling of non-supported operations Bart Van Assche
2017-07-24 8:02 ` Christoph Hellwig
@ 2017-07-24 14:46 ` Jens Axboe
[not found] ` <f744ebdd-654c-1d6e-d977-28d2a4ce7be9@kernel.dk>
2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2017-07-24 14:46 UTC (permalink / raw)
To: Bart Van Assche
Cc: stable, linux-block, xen-devel, Christoph Hellwig,
Roger Pau Monné
On 07/21/2017 11:11 AM, Bart Van Assche wrote:
> This patch fixes the following sparse warnings:
>
> drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
> drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error
> drivers/block/xen-blkfront.c:916:45: got int [signed] error
> drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
> drivers/block/xen-blkfront.c:1599:47: expected int [signed] error
> drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype] <noident>
> drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
> drivers/block/xen-blkfront.c:1607:55: expected int [signed] error
> drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype] <noident>
> drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
> drivers/block/xen-blkfront.c:1625:55: expected int [signed] error
> drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype] <noident>
> drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer
>
> Compile-tested only.
Applied, but I killed your stable tag. Why did you add that?
--
Jens Axboe
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-blkfront: Fix handling of non-supported operations
[not found] ` <f744ebdd-654c-1d6e-d977-28d2a4ce7be9@kernel.dk>
@ 2017-07-24 15:10 ` Bart Van Assche
[not found] ` <1500909007.2604.3.camel@wdc.com>
1 sibling, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2017-07-24 15:10 UTC (permalink / raw)
To: axboe@kernel.dk
Cc: stable@vger.kernel.org, linux-block@vger.kernel.org,
xen-devel@lists.xenproject.org, hch@lst.de, roger.pau@citrix.com
On Mon, 2017-07-24 at 08:46 -0600, Jens Axboe wrote:
> On 07/21/2017 11:11 AM, Bart Van Assche wrote:
> > This patch fixes the following sparse warnings:
> >
> > drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
> > drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error
> > drivers/block/xen-blkfront.c:916:45: got int [signed] error
> > drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
> > drivers/block/xen-blkfront.c:1599:47: expected int [signed] error
> > drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype] <noident>
> > drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
> > drivers/block/xen-blkfront.c:1607:55: expected int [signed] error
> > drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype] <noident>
> > drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
> > drivers/block/xen-blkfront.c:1625:55: expected int [signed] error
> > drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype] <noident>
> > drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer
> >
> > Compile-tested only.
>
> Applied, but I killed your stable tag. Why did you add that?
Hello Jens,
That tag was added based on the output of git describe:
$ git describe 2a842acab109
v4.12-rc2-199-g2a842acab109
However, the following command shows that the above output is misleading and that the
stable tag is indeed not needed:
$ git log v4.12..origin/master | grep '^commit 2a842acab109'
commit 2a842acab109f40f0d7d10b38e9ca88390628996
Bart.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen-blkfront: Fix handling of non-supported operations
[not found] ` <1500909007.2604.3.camel@wdc.com>
@ 2017-07-24 21:20 ` Omar Sandoval
0 siblings, 0 replies; 5+ messages in thread
From: Omar Sandoval @ 2017-07-24 21:20 UTC (permalink / raw)
To: Bart Van Assche
Cc: axboe@kernel.dk, stable@vger.kernel.org,
linux-block@vger.kernel.org, xen-devel@lists.xenproject.org,
hch@lst.de, roger.pau@citrix.com
On Mon, Jul 24, 2017 at 03:10:09PM +0000, Bart Van Assche wrote:
> On Mon, 2017-07-24 at 08:46 -0600, Jens Axboe wrote:
> > On 07/21/2017 11:11 AM, Bart Van Assche wrote:
> > > This patch fixes the following sparse warnings:
> > >
> > > drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
> > > drivers/block/xen-blkfront.c:916:45: expected restricted blk_status_t [usertype] error
> > > drivers/block/xen-blkfront.c:916:45: got int [signed] error
> > > drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
> > > drivers/block/xen-blkfront.c:1599:47: expected int [signed] error
> > > drivers/block/xen-blkfront.c:1599:47: got restricted blk_status_t [usertype] <noident>
> > > drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
> > > drivers/block/xen-blkfront.c:1607:55: expected int [signed] error
> > > drivers/block/xen-blkfront.c:1607:55: got restricted blk_status_t [usertype] <noident>
> > > drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
> > > drivers/block/xen-blkfront.c:1625:55: expected int [signed] error
> > > drivers/block/xen-blkfront.c:1625:55: got restricted blk_status_t [usertype] <noident>
> > > drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer
> > >
> > > Compile-tested only.
> >
> > Applied, but I killed your stable tag. Why did you add that?
>
> Hello Jens,
>
> That tag was added based on the output of git describe:
> $ git describe 2a842acab109
> v4.12-rc2-199-g2a842acab109
>
> However, the following command shows that the above output is misleading and that the
> stable tag is indeed not needed:
> $ git log v4.12..origin/master | grep '^commit 2a842acab109'
> commit 2a842acab109f40f0d7d10b38e9ca88390628996
>
> Bart.
You want git tag --contains:
$ git tag --contains 2a842acab109
v4.13-rc1
v4.13-rc2
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-24 21:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-21 17:11 [PATCH] xen-blkfront: Fix handling of non-supported operations Bart Van Assche
2017-07-24 8:02 ` Christoph Hellwig
2017-07-24 14:46 ` Jens Axboe
[not found] ` <f744ebdd-654c-1d6e-d977-28d2a4ce7be9@kernel.dk>
2017-07-24 15:10 ` Bart Van Assche
[not found] ` <1500909007.2604.3.camel@wdc.com>
2017-07-24 21:20 ` Omar Sandoval
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).