Re: [PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-20 Thread Tejun Heo
On Wed, Jul 20, 2016 at 04:39:28AM +0800, tom.t...@gmail.com wrote: > From: Tom Yan > > `changeable` is the "version" of mode page requested by the user. > It will be less confusing/misleading if we do not check it > "together" with the setting bits of the drive. > > Not to mention that we curre

Re: [PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-19 Thread Tom Yan
FWIW, I end up using `bool d_sense = (dev->flags & ATA_DFLAG_D_SENSE)`, which was introduced to ata_scsi_set_sense() in commit 06dbde5f3a44 ("libata: Implement control mode page to select sense format"), in the polished ata_msense_control(). @Sergei, I kept the parentheses for the bit shifting/mas

[PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-19 Thread tom . ty89
From: Tom Yan `changeable` is the "version" of mode page requested by the user. It will be less confusing/misleading if we do not check it "together" with the setting bits of the drive. Not to mention that we currently have ata_mselect_*() implemented in a way that each of them will serve exclus