Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 2:17 PM Peter Maydell wrote: > > On Fri, 15 Jan 2021 at 21:43, Alistair Francis wrote: > > > > On Fri, Jan 15, 2021 at 6:09 AM Bin Meng wrote: > > > > > > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell > > > wrote > > > > printf is definitely the wrong thing... you need

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Peter Maydell
On Fri, 15 Jan 2021 at 21:43, Alistair Francis wrote: > > On Fri, Jan 15, 2021 at 6:09 AM Bin Meng wrote: > > > > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell > > wrote > > > printf is definitely the wrong thing... you need to either report > > > the error back to the guest if the interface th

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 3:50 AM Peter Maydell wrote: > > Ping! This patch was trying to fix a Coverity issue (CID 1435959, > 1435960, 1435961) -- is anybody planning to review it? > > (I'm not entirely sure 'guest error' is the right warning category, > but I don't know the specifics of this devic

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 6:09 AM Bin Meng wrote: > > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell > wrote: > > > > On Fri, 15 Jan 2021 at 13:33, Bin Meng wrote: > > > > > > On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell > > > wrote: > > > > > > > > Ping! This patch was trying to fix a Coverity

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Wed, Nov 4, 2020 at 1:29 AM Green Wan wrote: > > Fix code coverage issues by checking return value and handling fail case > of blk_pread() and blk_pwrite(). Return default value 0xff if read fails. > > Signed-off-by: Green Wan Reviewed-by: Alistair Francis Alistair > --- > hw/misc/sifive_

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Peter Maydell
On Fri, 15 Jan 2021 at 13:33, Bin Meng wrote: > > On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell > wrote: > > > > Ping! This patch was trying to fix a Coverity issue (CID 1435959, > > 1435960, 1435961) -- is anybody planning to review it? > > > > (I'm not entirely sure 'guest error' is the right

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Bin Meng
On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell wrote: > > On Fri, 15 Jan 2021 at 13:33, Bin Meng wrote: > > > > On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell > > wrote: > > > > > > Ping! This patch was trying to fix a Coverity issue (CID 1435959, > > > 1435960, 1435961) -- is anybody planning to

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Bin Meng
On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell wrote: > > Ping! This patch was trying to fix a Coverity issue (CID 1435959, > 1435960, 1435961) -- is anybody planning to review it? > > (I'm not entirely sure 'guest error' is the right warning category, > but I don't know the specifics of this devic

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Peter Maydell
Ping! This patch was trying to fix a Coverity issue (CID 1435959, 1435960, 1435961) -- is anybody planning to review it? (I'm not entirely sure 'guest error' is the right warning category, but I don't know the specifics of this device.) thanks -- PMM On Wed, 4 Nov 2020 at 09:29, Green Wan wrote

[PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2020-11-04 Thread Green Wan
Fix code coverage issues by checking return value and handling fail case of blk_pread() and blk_pwrite(). Return default value 0xff if read fails. Signed-off-by: Green Wan --- hw/misc/sifive_u_otp.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --gi