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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20c30b225b3b96fa9207b4a89e3210c8a97fb1d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1050
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-02-28 01:16:33 -05:00 committed by Tomasz Zawadzki
parent 1499761380
commit 6383602952
5 changed files with 14 additions and 28 deletions

View File

@ -191,16 +191,10 @@ 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[],
int *lun_id_list, int num_luns, uint8_t protocol_id,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx)
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)
{
struct spdk_scsi_dev *dev;
size_t name_len;

View File

@ -387,10 +387,9 @@ 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,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx)
struct spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx)
{
struct spdk_scsi_lun *lun;
int rc;

View File

@ -171,14 +171,9 @@ 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,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx);
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);
void spdk_scsi_lun_append_task(struct spdk_scsi_lun *lun, struct spdk_scsi_task *task);

View File

@ -81,10 +81,9 @@ spdk_scsi_task_put(struct spdk_scsi_task *task)
free(task);
}
_spdk_scsi_lun *
spdk_scsi_lun_construct(struct spdk_bdev *bdev,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx)
struct spdk_scsi_lun *spdk_scsi_lun_construct(struct spdk_bdev *bdev,
void (*hotremove_cb)(const struct spdk_scsi_lun *, void *),
void *hotremove_ctx)
{
struct spdk_scsi_lun *lun;

View File

@ -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;