Commit 63836029 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

lib/scsi: Remove workaround for astyle format check about break-after-return-type



To avoid the starnge formatting, typedef has been used. But this comment
is hard to get the meaning. So stop breaking after return type for this case.

The strange formating is

struct spdk_scsi_dev *
       spdk_scsi_dev_construct(const char *name, const char *bdev_name_list[],
                        int *lun_id_list, int num_luns, uint8_t protocol_id,
                        void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
                        void *hotremove_ctx)

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20c30b225b3b96fa9207b4a89e3210c8a97fb1d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1050


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 14997613
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -191,13 +191,7 @@ spdk_scsi_dev_delete_lun(struct spdk_scsi_dev *dev,
	}
}

/* This typedef exists to work around an astyle 2.05 bug.
 * Remove it when astyle is fixed.
 */
typedef struct spdk_scsi_dev _spdk_scsi_dev;

_spdk_scsi_dev *
spdk_scsi_dev_construct(const char *name, const char *bdev_name_list[],
struct spdk_scsi_dev *spdk_scsi_dev_construct(const char *name, const char *bdev_name_list[],
		int *lun_id_list, int num_luns, uint8_t protocol_id,
		void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
		void *hotremove_ctx)
+3 −4
Original line number Diff line number Diff line
@@ -387,8 +387,7 @@ scsi_lun_hot_remove(void *remove_ctx)
 * \return NULL if bdev == NULL
 * \return pointer to the new spdk_scsi_lun object otherwise
 */
_spdk_scsi_lun *
spdk_scsi_lun_construct(struct spdk_bdev *bdev,
struct spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
		void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
		void *hotremove_ctx)
{
+3 −8
Original line number Diff line number Diff line
@@ -171,12 +171,7 @@ struct spdk_lun_db_entry {

extern struct spdk_lun_db_entry *spdk_scsi_lun_list_head;

/* This typedef exists to work around an astyle 2.05 bug.
 * Remove it when astyle is fixed.
 */
typedef struct spdk_scsi_lun _spdk_scsi_lun;

_spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
struct spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
		void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
		void *hotremove_ctx);
void spdk_scsi_lun_destruct(struct spdk_scsi_lun *lun);
+3 −4
Original line number Diff line number Diff line
@@ -81,8 +81,7 @@ spdk_scsi_task_put(struct spdk_scsi_task *task)
	free(task);
}

_spdk_scsi_lun *
spdk_scsi_lun_construct(struct spdk_bdev *bdev,
struct spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
		void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
		void *hotremove_ctx)
{
+1 −2
Original line number Diff line number Diff line
@@ -138,8 +138,7 @@ spdk_bdev_scsi_execute(struct spdk_scsi_task *task)
DEFINE_STUB(spdk_bdev_get_io_channel, struct spdk_io_channel *,
	    (struct spdk_bdev_desc *desc), NULL);

static _spdk_scsi_lun *
lun_construct(void)
static struct spdk_scsi_lun *lun_construct(void)
{
	struct spdk_scsi_lun		*lun;
	struct spdk_bdev		bdev;