Re: [PATCH v3 5/5] target: Fix wrong setting of sense format for PI errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/06/2015 09:14 AM, Sagi Grimberg wrote:
On 7/6/2015 6:28 PM, Bart Van Assche wrote:
On 07/06/2015 06:15 AM, Sagi Grimberg wrote:
diff --git a/drivers/target/target_core_transport.c
b/drivers/target/target_core_transport.c
index 0181f8b..79bb8d1 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2625,6 +2625,7 @@ struct sense_info {
       u8 asc;
       u8 ascq;
       bool add_sector_info;
+    int desc_format;
   };

Something minor: has it been considered to use the data type "bool"
instead of "int" for desc_format ?

I've considered that, but since scsi_build_sense_buffer() desc argument
is an int, I figured it would be better than passing desc_format ? 1 : 0

But I can change it if you prefer.

Hello Sagi,

The C language supports implicit conversion from bool to int so I think "? 1 : 0" is not necessary to convert a bool into an int.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux