Re: [PATCH] scsi_io_completion cleanup and fix CONDITION MET handling

2018-02-27 Thread Douglas Gilbert
On 2018-02-27 05:00 AM, Johannes Thumshirn wrote: On Mon, 2018-02-26 at 13:48 -0500, Douglas Gilbert wrote: Note: checkpatch.pl suggests that the BUG and BUG_ON macros be replaced by WARN and WARN_ON . Perhaps others could comment on this. Yes BUG() and BUG_ON() are usually a bad idea. Linus w

Re: [PATCH] scsi_io_completion cleanup and fix CONDITION MET handling

2018-02-27 Thread Johannes Thumshirn
On Mon, 2018-02-26 at 13:48 -0500, Douglas Gilbert wrote: > Note: checkpatch.pl suggests that the BUG and BUG_ON macros be replaced > by WARN and WARN_ON . Perhaps others could comment on this. Yes BUG() and BUG_ON() are usually a bad idea. Linus was even very eloquent about this in the SCSI Midla

[PATCH] scsi_io_completion cleanup and fix CONDITION MET handling

2018-02-26 Thread Douglas Gilbert
This patch started as an attempt to fix the erroneous handling of CONDITION MET, a relatively rare special case. A solution meant adding another special case to the already complicated scsi_io_completion() function. To better understand that function the author found it useful to refactor the funct