From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1829376849913890077==" MIME-Version: 1.0 From: ramesh.thomas at intel.com Subject: [Accel-config] [PATCH v1 1/4] accel-config: Fix some indentation and coding style issues Date: Thu, 11 Mar 2021 13:03:20 -0500 Message-ID: <20210311180323.307205-2-ramesh.thomas@intel.com> In-Reply-To: 20210311180323.307205-1-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============1829376849913890077== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ramesh Thomas Fix indentation issues to make patch review easier Signed-off-by: Ramesh Thomas --- accfg/lib/private.h | 68 ++++++++++++++++++++--------------------- accfg/libaccel_config.h | 34 ++++++++++----------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/accfg/lib/private.h b/accfg/lib/private.h index 24e2ee8..0fdc5d5 100644 --- a/accfg/lib/private.h +++ b/accfg/lib/private.h @@ -20,32 +20,32 @@ = struct accfg_device { struct accfg_ctx *ctx; - unsigned int id; - struct accfg_group* group; - struct accfg_wq* wq; - struct accfg_engine* engine; + unsigned int id; + struct accfg_group *group; + struct accfg_wq *wq; + struct accfg_engine *engine; struct list_head groups; struct list_head wqs; struct list_head engines; - struct list_node list; + struct list_node list; int group_init; - char *device_path; + char *device_path; char *mdev_path; - char *device_buf; + char *device_buf; char *device_type_str; enum accfg_device_type type; - size_t buf_len; + size_t buf_len; struct list_head mdev_list; = /* Device Attributes */ struct accfg_error errors; int max_groups; - int max_work_queues; - int max_engines; - int max_work_queues_size; - int numa_node; - int ims_size; - int max_batch_size; + int max_work_queues; + int max_engines; + int max_work_queues_size; + int numa_node; + int ims_size; + int max_batch_size; int configurable; int max_tokens; unsigned int token_limit; @@ -65,9 +65,9 @@ struct accfg_device_mdev { }; = struct accfg_group { - struct accfg_device *device; - int id; - int buf_len; + struct accfg_device *device; + int id; + int buf_len; int size; char *group_path; char *group_buf; @@ -91,12 +91,12 @@ struct accfg_group { = struct accfg_engine { struct accfg_device *device; - struct accfg_group *group; - struct list_node list; - char *engine_path; - char *engine_buf; - int type, id, buf_len; - int numa_node; + struct accfg_group *group; + struct list_node list; + char *engine_path; + char *engine_buf; + int type, id, buf_len; + int numa_node; = /* Engine Attributes */ int group_id; @@ -104,12 +104,12 @@ struct accfg_engine { = struct accfg_wq { struct accfg_device *device; - struct accfg_group *group; + struct accfg_group *group; struct list_node list; char *wq_path; - char *wq_buf; - int id, buf_len; - int numa_node; + char *wq_buf; + int id, buf_len; + int numa_node; = /* Workqueue Attributes */ int group_id; @@ -138,23 +138,23 @@ struct accfg_wq { * @timeout: default library timeout in milliseconds */ struct accfg_ctx { - /* log_ctx must be first member for accfg_set_log_fn compat */ - struct log_ctx ctx; - int refcount; - int devices_init; + /* log_ctx must be first member for accfg_set_log_fn compat */ + struct log_ctx ctx; + int refcount; + int devices_init; int groups_init; struct list_head devices; uint64_t timeout; - void *private_data; + void *private_data; }; = static inline int check_udev(struct udev *udev) { - return udev ? 0 : -ENXIO; + return udev ? 0 : -ENXIO; } = static inline int check_kmod(struct kmod_ctx *kmod_ctx) { - return kmod_ctx ? 0 : -ENXIO; + return kmod_ctx ? 0 : -ENXIO; } #endif /* _LIBACCFG_PRIVATE_H_ */ diff --git a/accfg/libaccel_config.h b/accfg/libaccel_config.h index 95bb5d2..091c388 100644 --- a/accfg/libaccel_config.h +++ b/accfg/libaccel_config.h @@ -76,7 +76,7 @@ enum accfg_mdev_type { = /* no need to save device error */ struct accfg_error { - uint64_t val[4]; + uint64_t val[4]; }; = /* parameters read from sysfs of accfg driver */ @@ -131,7 +131,7 @@ int accfg_new(struct accfg_ctx **ctx); = /* override default log routine */ void accfg_set_log_fn(struct accfg_ctx *ctx, -void (*log_fn) (struct accfg_ctx * ctx, +void (*log_fn)(struct accfg_ctx *ctx, int priority, const char *file, int line, const char *fn, const char *format, @@ -147,9 +147,9 @@ int accfg_device_disable(struct accfg_device *device, b= ool force); struct accfg_device *accfg_device_get_first(struct accfg_ctx *ctx); struct accfg_device *accfg_device_get_next(struct accfg_device *device); #define accfg_device_foreach(ctx, device) \ - for (device =3D accfg_device_get_first(ctx); \ - device !=3D NULL; \ - device =3D accfg_device_get_next(device)) + for (device =3D accfg_device_get_first(ctx); \ + device !=3D NULL; \ + device =3D accfg_device_get_next(device)) struct accfg_ctx *accfg_device_get_ctx(struct accfg_device *); const char *accfg_device_get_devname(struct accfg_device *device); int accfg_device_type_validate(const char *dev_name); @@ -184,7 +184,7 @@ int accfg_device_get_clients(struct accfg_device *devic= e); int accfg_device_set_token_limit(struct accfg_device *dev, int val); int accfg_device_is_active(struct accfg_device *device); int accfg_device_get_cmd_status(struct accfg_device *device); -const char * accfg_device_get_cmd_status_str(struct accfg_device *device); +const char *accfg_device_get_cmd_status_str(struct accfg_device *device); = struct accfg_device_mdev; struct accfg_device_mdev *accfg_device_first_mdev(struct accfg_device *dev= ice); @@ -205,9 +205,9 @@ struct accfg_group; struct accfg_group *accfg_group_get_first(struct accfg_device *device); struct accfg_group *accfg_group_get_next(struct accfg_group *group); #define accfg_group_foreach(device, group) \ - for (group =3D accfg_group_get_first(device); \ - group !=3D NULL; \ - group =3D accfg_group_get_next(group)) + for (group =3D accfg_group_get_first(device); \ + group !=3D NULL; \ + group =3D accfg_group_get_next(group)) int accfg_group_get_id(struct accfg_group *group); struct accfg_group *accfg_device_group_get_by_id(struct accfg_device *devi= ce, int id); @@ -235,9 +235,9 @@ struct accfg_wq *accfg_wq_get_next(struct accfg_wq *wq); = = #define accfg_wq_foreach(device, wq) \ - for (wq =3D accfg_wq_get_first(device); \ - wq !=3D NULL; \ - wq =3D accfg_wq_get_next(wq)) + for (wq =3D accfg_wq_get_first(device); \ + wq !=3D NULL; \ + wq =3D accfg_wq_get_next(wq)) = struct accfg_ctx *accfg_wq_get_ctx(struct accfg_wq *wq); struct accfg_device *accfg_wq_get_device(struct accfg_wq *wq); @@ -268,9 +268,9 @@ int accfg_wq_set_threshold(struct accfg_wq *wq, int val= ); int accfg_wq_set_block_on_fault(struct accfg_wq *wq, int val); int accfg_wq_set_max_batch_size(struct accfg_wq *wq, int val); int accfg_wq_set_max_transfer_size(struct accfg_wq *wq, uint64_t val); -int accfg_wq_set_str_mode(struct accfg_wq *wq, const char* val); +int accfg_wq_set_str_mode(struct accfg_wq *wq, const char *val); int accfg_wq_set_mode(struct accfg_wq *wq, enum accfg_wq_mode mode); -int accfg_wq_set_str_type(struct accfg_wq *wq, const char* val); +int accfg_wq_set_str_type(struct accfg_wq *wq, const char *val); int accfg_wq_set_str_name(struct accfg_wq *wq, const char *val); int accfg_wq_enable(struct accfg_wq *wq); int accfg_wq_disable(struct accfg_wq *wq, bool force); @@ -282,9 +282,9 @@ struct accfg_engine; struct accfg_engine *accfg_engine_get_first(struct accfg_device *device); struct accfg_engine *accfg_engine_get_next(struct accfg_engine *engine); #define accfg_engine_foreach(device, engine) \ - for (engine =3D accfg_engine_get_first(device); \ - engine !=3D NULL; \ - engine =3D accfg_engine_get_next(engine)) + for (engine =3D accfg_engine_get_first(device); \ + engine !=3D NULL; \ + engine =3D accfg_engine_get_next(engine)) struct accfg_ctx *accfg_engine_get_ctx(struct accfg_engine *engine); struct accfg_device *accfg_engine_get_device(struct accfg_engine *engine); struct accfg_group *accfg_engine_get_group(struct accfg_engine *engine); -- = 2.26.2 --===============1829376849913890077==--