Re: [PATCH 2/3] scsi_lib: rework scsi_internal_device_unblock_nowait()

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

 



Hi Hannes,

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.13-rc4 next-20170810]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-pollable-state-attribute/20170811-071630
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   drivers/scsi/scsi_lib.c: In function 'scsi_internal_device_unblock_nowait':
>> drivers/scsi/scsi_lib.c:3089:2: error: duplicate case value
     case SDEV_TRANSPORT_OFFLINE:
     ^
>> drivers/scsi/scsi_lib.c:3079:2: error: previously used here
     case SDEV_TRANSPORT_OFFLINE:
     ^

vim +3089 drivers/scsi/scsi_lib.c

  3054	
  3055	/**
  3056	 * scsi_internal_device_unblock_nowait - resume a device after a block request
  3057	 * @sdev:	device to resume
  3058	 * @new_state:	state to set the device to after unblocking
  3059	 *
  3060	 * Restart the device queue for a previously suspended SCSI device. Does not
  3061	 * sleep.
  3062	 *
  3063	 * Returns zero if successful or a negative error code upon failure.
  3064	 *
  3065	 * Notes:
  3066	 * This routine transitions the device to the SDEV_RUNNING state or to one of
  3067	 * the offline states (which must be a legal transition) allowing the midlayer
  3068	 * to goose the queue for this device.
  3069	 */
  3070	int scsi_internal_device_unblock_nowait(struct scsi_device *sdev,
  3071						enum scsi_device_state new_state)
  3072	{
  3073		/*
  3074		 * Try to transition the scsi device to SDEV_RUNNING or one of the
  3075		 * offlined states and goose the device queue if successful.
  3076		 */
  3077		switch (sdev->sdev_state) {
  3078		case SDEV_BLOCK:
> 3079		case SDEV_TRANSPORT_OFFLINE:
  3080			sdev->sdev_state = new_state;
  3081			break;
  3082		case SDEV_CREATED_BLOCK:
  3083			if (new_state == SDEV_TRANSPORT_OFFLINE ||
  3084			    new_state == SDEV_OFFLINE)
  3085				sdev->sdev_state = new_state;
  3086			else
  3087				sdev->sdev_state = SDEV_CREATED;
  3088			break;
> 3089		case SDEV_TRANSPORT_OFFLINE:
  3090		case SDEV_CANCEL:
  3091		case SDEV_OFFLINE:
  3092			break;
  3093		default:
  3094			return -EINVAL;
  3095		}
  3096		scsi_start_queue(sdev);
  3097	
  3098		return 0;
  3099	}
  3100	EXPORT_SYMBOL_GPL(scsi_internal_device_unblock_nowait);
  3101	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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