Re: [PATCH 4/7] Disallow changing the device state via sysfs into "deleted"

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

 



On 09/02/13 21:06, Christoph Hellwig wrote:
On Mon, Sep 02, 2013 at 08:59:30PM +0200, Bart Van Assche wrote:
Do you agree with changing switch (state) into switch ((int)state) ?
Without that additional change gcc reports the following warning:

drivers/scsi/scsi_sysfs.c: In function ?store_state_field?:
drivers/scsi/scsi_sysfs.c:640:2: warning: case value ?0? not in
enumerated type ?enum scsi_device_state? [-Wswitch]

Either that, or add a SDEV_INVALID_STATE = 0 value to the enum.  That
variant seems a little more elegant.

Hmm ... I think the second option would require to add an additional case in sdev_set_state() to avoid a compiler warning. This is something James objected against (on June 24, see also http://thread.gmane.org/gmane.linux.scsi/82572/focus=82576).

Bart.

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux