[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete |
Date: |
Mon, 11 Mar 2019 16:25:05 +0000 |
On Mon, 11 Mar 2019 at 16:14, Bandan Das <address@hidden> wrote:
>
> Peter Maydell <address@hidden> writes:
> > At the moment PARTIAL_DELETE is "ALL_DELETE | READ_ONLY", which
> > doesn't seem like it makes much sense.
> >
>
> Sorry, can you please clarify what doesn't make sense ?
Generally, if you have multiple bits X, Y in a return
value, they should be independent. Sometimes we define
a convenience value Z that's X | Y, but then Z should
have a name that indicates that it's really doing both
X and Y (for instance often a READWRITE constant will
be READ | WRITE). In this case, I don't see why
PARTIAL_DELETE would be a sensible name to indicate
"both ALL_DELETE and also READ_ONLY" -- if we only
partially did a delete why do we set the ALL_DELETE bit ?
It might be useful to take a step back -- what are
the different possible outcomes from this function that
we need to distinguish, and when should we be returning
which outcome?
thanks
-- PMM
- [Qemu-devel] [PULL 4/4] Introduce new "no_guest_reset" parameter for usb-host device, (continued)
- [Qemu-devel] [PULL 4/4] Introduce new "no_guest_reset" parameter for usb-host device, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 2/4] usb-mtp: fix some usb_mtp_write_data return paths, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 3/4] usb-mtp: prevent null dereference while deleting objects, Gerd Hoffmann, 2019/03/07
- Re: [Qemu-devel] [PULL 3/4] usb-mtp: prevent null dereference while deleting objects, Peter Maydell, 2019/03/08
- Re: [Qemu-devel] [PULL 3/4] usb-mtp: prevent null dereference while deleting objects, Bandan Das, 2019/03/08
- [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/08
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Peter Maydell, 2019/03/09
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Peter Maydell, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Peter Maydell, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Peter Maydell, 2019/03/11
- Re: [Qemu-devel] [PATCH] usb-mtp: fix return status of delete, Bandan Das, 2019/03/11
- Re: [Qemu-devel] [PULL 3/4] usb-mtp: prevent null dereference while deleting objects, Peter Maydell, 2019/03/09
Re: [Qemu-devel] [PULL 0/4] Usb 20190307 patches, Peter Maydell, 2019/03/07