Fix clang 16 errors treewide

- misleading indentation
- strict prototypes [1]

[1]
int foo(void) {...}
instead of
int foo() {...}

drivers: usb: Fix misleading indentation
This commit is contained in:
roynatech2544 2023-01-05 18:04:50 +09:00 committed by Gabriel2392
parent 19a708f67f
commit 0db070a424
28 changed files with 94 additions and 94 deletions

View file

@ -25,7 +25,7 @@
#include <errno.h>
#include <linux/types.h>
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops()
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops(void)
{
return NULL;
}

View file

@ -30,12 +30,12 @@ int gpexbe_bts_set_bts_mo(int val)
return 0;
}
int gpexbe_bts_init()
int gpexbe_bts_init(void)
{
return 0;
}
void gpexbe_bts_term()
void gpexbe_bts_term(void)
{
return;
}

View file

@ -43,7 +43,7 @@ int gpexbe_bts_set_bts_mo(int val)
return ret;
}
int gpexbe_bts_init()
int gpexbe_bts_init(void)
{
bts_info.bts_scen_idx = bts_get_scenindex("g3d_performance");
@ -52,7 +52,7 @@ int gpexbe_bts_init()
return 0;
}
void gpexbe_bts_term()
void gpexbe_bts_term(void)
{
bts_info.bts_scen_idx = -1;
}

View file

@ -60,12 +60,12 @@ int gpexbe_clock_get_rate_asv_table(struct freq_volt *fv_array, int level_num)
return ret;
}
int gpexbe_clock_get_boot_freq()
int gpexbe_clock_get_boot_freq(void)
{
return pm_info.boot_clock;
}
int gpexbe_clock_get_max_freq()
int gpexbe_clock_get_max_freq(void)
{
return pm_info.max_clock_limit;
}
@ -89,12 +89,12 @@ int gpexbe_clock_set_rate(int clk)
return ret;
}
int gpexbe_clock_get_rate()
int gpexbe_clock_get_rate(void)
{
return cal_dfs_get_rate(cal_id);
}
int gpexbe_clock_init()
int gpexbe_clock_init(void)
{
cal_id = gpexbe_devicetree_get_int(g3d_cmu_cal_id);
@ -111,7 +111,7 @@ int gpexbe_clock_init()
return 0;
}
void gpexbe_clock_term()
void gpexbe_clock_term(void)
{
cal_id = 0;
pm_info.boot_clock = 0;

View file

@ -36,12 +36,12 @@ void gpexbe_debug_dbg_snapshot_freq_out(int freq_before, int freq_after)
return;
}
int gpexbe_debug_init()
int gpexbe_debug_init(void)
{
return 0;
}
void gpexbe_debug_term()
void gpexbe_debug_term(void)
{
return;
}

View file

@ -48,7 +48,7 @@ void gpexbe_debug_dbg_snapshot_freq_out(int freq_before, int freq_after)
dbg_snapshot_freq_misc(dbg_info.dss_freq_id, freq_before, freq_after, DSS_FLAG_OUT);
}
int gpexbe_debug_init()
int gpexbe_debug_init(void)
{
/* this value is 0 for 9830 */
/* TODO: find out what's going on with 9830. dbg snapshot was never used? */
@ -59,7 +59,7 @@ int gpexbe_debug_init()
return 0;
}
void gpexbe_debug_term()
void gpexbe_debug_term(void)
{
dbg_info.dss_freq_id = 0;
}

View file

@ -47,7 +47,7 @@ void gpexbe_debug_dbg_snapshot_freq_out(int freq_before, int freq_after)
dbg_snapshot_freq(dbg_info.dss_freq_id, freq_before, freq_after, DSS_FLAG_OUT);
}
int gpexbe_debug_init()
int gpexbe_debug_init(void)
{
dbg_info.dss_freq_id = dbg_snapshot_get_freq_idx("G3D");
@ -56,7 +56,7 @@ int gpexbe_debug_init()
return 0;
}
void gpexbe_debug_term()
void gpexbe_debug_term(void)
{
dbg_info.dss_freq_id = 0;
}

View file

@ -106,7 +106,7 @@ static struct notifier_block gpu_tmu_nb = {
.notifier_call = tmu_notifier,
};
int gpexbe_notifier_init()
int gpexbe_notifier_init(void)
{
int ret = 0;
@ -123,7 +123,7 @@ int gpexbe_notifier_init()
return ret;
}
void gpexbe_notifier_term()
void gpexbe_notifier_term(void)
{
gpexbe_notifier_internal_remove(GPU_NOTIFIER_MIN_LOCK, &gpu_min_qos_notifier);
gpexbe_notifier_internal_remove(GPU_NOTIFIER_MAX_LOCK, &gpu_max_qos_notifier);

View file

@ -65,7 +65,7 @@ static struct exynos_pm_domain *gpu_get_pm_domain(const char *g3d_genpd_name)
return pd;
}
int gpexbe_pm_get_status()
int gpexbe_pm_get_status(void)
{
int ret = 0;
unsigned int val = 0xf;
@ -76,18 +76,18 @@ int gpexbe_pm_get_status()
return ret;
}
struct exynos_pm_domain *gpexbe_pm_get_exynos_pm_domain()
struct exynos_pm_domain *gpexbe_pm_get_exynos_pm_domain(void)
{
return exynos_pm_domain;
}
void gpexbe_pm_access_lock()
void gpexbe_pm_access_lock(void)
{
//DEBUG_ASSERT(exynos_pm_domain)
mutex_lock(&exynos_pm_domain->access_lock);
}
void gpexbe_pm_access_unlock()
void gpexbe_pm_access_unlock(void)
{
//DEBUG_ASSERT(exynos_pm_domain)
mutex_unlock(&exynos_pm_domain->access_lock);
@ -130,17 +130,17 @@ static int gpexbe_pm_pd_control(int target_status)
return 0;
}
int gpexbe_pm_pd_control_up()
int gpexbe_pm_pd_control_up(void)
{
return gpexbe_pm_pd_control(1);
}
int gpexbe_pm_pd_control_down()
int gpexbe_pm_pd_control_down(void)
{
return gpexbe_pm_pd_control(0);
}
int gpexbe_pm_init()
int gpexbe_pm_init(void)
{
const char *g3d_genpd_name;
@ -156,7 +156,7 @@ int gpexbe_pm_init()
return 0;
}
void gpexbe_pm_term()
void gpexbe_pm_term(void)
{
exynos_pm_domain = NULL;
}

View file

@ -1,11 +1,11 @@
#include <gpexbe_qos.h>
int gpexbe_qos_init()
int gpexbe_qos_init(void)
{
return 0;
}
void gpexbe_qos_term()
void gpexbe_qos_term(void)
{
/* TODO: unset and unregister */
return;

View file

@ -18,7 +18,7 @@
* http://www.gnu.org/licenses/gpl-2.0.html.
*/
static inline pmqos_flag_check(mali_pmqos_flags type, mali_pmqos_flags in)
static inline bool pmqos_flag_check(mali_pmqos_flags type, mali_pmqos_flags in)
{
return (type & in) == in;
}

View file

@ -56,7 +56,7 @@ static int exynos_secure_mode_disable(struct protected_mode_device *pdev)
return gpexbe_smc_protection_disable();
}
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops()
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops(void)
{
static struct protected_mode_ops exynos_protected_ops = {
.protected_mode_enable = &exynos_secure_mode_enable,

View file

@ -48,7 +48,7 @@ static int exynos_secure_mode_disable(struct protected_mode_device *pdev)
return kbase_pm_protected_mode_disable(kbdev);
}
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops()
struct protected_mode_ops *gpexbe_secure_get_protected_mode_ops(void)
{
static struct protected_mode_ops exynos_protected_ops = {
.protected_mode_enable = &exynos_secure_mode_enable,

View file

@ -41,7 +41,7 @@ struct _smc_info {
static struct _smc_info smc_info;
int gpexbe_smc_protection_enable()
int gpexbe_smc_protection_enable(void)
{
int err;
unsigned long flags;
@ -68,7 +68,7 @@ int gpexbe_smc_protection_enable()
return err;
}
int gpexbe_smc_protection_disable()
int gpexbe_smc_protection_disable(void)
{
int err;
unsigned long flags;
@ -104,20 +104,20 @@ int gpexbe_smc_protection_disable()
#define SMC_DRM_G3D_POWER_ON SMC_DRM_G3D_PPCFW_RESTORE
#endif
void gpexbe_smc_notify_power_on()
void gpexbe_smc_notify_power_on(void)
{
exynos_smc(SMC_DRM_G3D_POWER_ON, 0, 0, 0);
}
void gpexbe_smc_notify_power_off()
void gpexbe_smc_notify_power_off(void)
{
exynos_smc(SMC_DRM_G3D_POWER_OFF, 0, 0, 0);
}
#else
void gpexbe_smc_notify_power_on()
void gpexbe_smc_notify_power_on(void)
{
}
void gpexbe_smc_notify_power_off()
void gpexbe_smc_notify_power_off(void)
{
}
#endif

View file

@ -37,31 +37,31 @@
static struct _clock_info clk_info;
int gpex_clock_get_boot_clock()
int gpex_clock_get_boot_clock(void)
{
return clk_info.boot_clock;
}
int gpex_clock_get_max_clock()
int gpex_clock_get_max_clock(void)
{
return clk_info.gpu_max_clock;
}
int gpex_clock_get_max_clock_limit()
int gpex_clock_get_max_clock_limit(void)
{
return clk_info.gpu_max_clock_limit;
}
int gpex_clock_get_min_clock()
int gpex_clock_get_min_clock(void)
{
return clk_info.gpu_min_clock;
}
int gpex_clock_get_cur_clock()
int gpex_clock_get_cur_clock(void)
{
return clk_info.cur_clock;
}
int gpex_clock_get_max_lock()
int gpex_clock_get_max_lock(void)
{
return clk_info.max_lock;
}
int gpex_clock_get_min_lock()
int gpex_clock_get_min_lock(void)
{
return clk_info.min_lock;
}
@ -76,7 +76,7 @@ u64 gpex_clock_get_time_busy(int level)
/*******************************************
* static helper functions
******************************************/
static int gpex_clock_update_config_data_from_dt()
static int gpex_clock_update_config_data_from_dt(void)
{
int ret = 0;
struct freq_volt *fv_array;
@ -331,7 +331,7 @@ int gpex_clock_init(struct device **dev)
return 0;
}
void gpex_clock_term()
void gpex_clock_term(void)
{
/* TODO: reset other clk_info variables too */
clk_info.kbdev = NULL;
@ -352,7 +352,7 @@ int gpex_clock_get_table_idx(int clock)
return -1;
}
int gpex_clock_get_clock_slow()
int gpex_clock_get_clock_slow(void)
{
return gpexbe_clock_get_rate();
}
@ -404,7 +404,7 @@ int gpex_clock_set(int clk)
return ret;
}
int gpex_clock_prepare_runtime_off()
int gpex_clock_prepare_runtime_off(void)
{
gpex_clock_update_time_in_state(clk_info.cur_clock);
@ -558,12 +558,12 @@ int gpex_clock_lock_clock(gpex_clock_lock_cmd_t lock_command, gpex_clock_lock_ty
return 0;
}
void gpex_clock_mutex_lock()
void gpex_clock_mutex_lock(void)
{
mutex_lock(&clk_info.clock_lock);
}
void gpex_clock_mutex_unlock()
void gpex_clock_mutex_unlock(void)
{
mutex_unlock(&clk_info.clock_lock);
}

View file

@ -85,7 +85,7 @@ static void gpex_dvfs_context_init(struct device **dev)
dvfs.polling_speed = gpexbe_devicetree_get_int(gpu_dvfs_polling_time);
}
static int gpu_dvfs_calculate_env_data()
static int gpu_dvfs_calculate_env_data(void)
{
unsigned long flags;
static int polling_period;
@ -172,12 +172,12 @@ static void gpu_dvfs_timer_control(bool timer_state)
spin_unlock_irqrestore(&dvfs.spinlock, flags);
}
void gpex_dvfs_start()
void gpex_dvfs_start(void)
{
gpu_dvfs_timer_control(true);
}
void gpex_dvfs_stop()
void gpex_dvfs_stop(void)
{
gpu_dvfs_timer_control(false);
}
@ -220,17 +220,17 @@ static int gpu_dvfs_on_off(bool enable)
return 0;
}
int gpex_dvfs_enable()
int gpex_dvfs_enable(void)
{
return gpu_dvfs_on_off(true);
}
int gpex_dvfs_disable()
int gpex_dvfs_disable(void)
{
return gpu_dvfs_on_off(false);
}
static int gpu_dvfs_handler_init()
static int gpu_dvfs_handler_init(void)
{
if (!dvfs.status)
dvfs.status = true;
@ -243,7 +243,7 @@ static int gpu_dvfs_handler_init()
return 0;
}
static int gpu_dvfs_handler_deinit()
static int gpu_dvfs_handler_deinit(void)
{
if (dvfs.status)
dvfs.status = false;
@ -254,7 +254,7 @@ static int gpu_dvfs_handler_deinit()
return 0;
}
static int gpu_pm_metrics_init()
static int gpu_pm_metrics_init(void)
{
INIT_DELAYED_WORK(&dvfs.dvfs_work, dvfs_callback);
dvfs.dvfs_wq = create_workqueue("g3d_dvfs");
@ -265,7 +265,7 @@ static int gpu_pm_metrics_init()
return 0;
}
static void gpu_pm_metrics_term()
static void gpu_pm_metrics_term(void)
{
cancel_delayed_work(&dvfs.dvfs_work);
flush_workqueue(dvfs.dvfs_wq);
@ -295,7 +295,7 @@ int gpex_dvfs_init(struct device **dev)
return 0;
}
void gpex_dvfs_term()
void gpex_dvfs_term(void)
{
/* DVFS stuff */
gpu_pm_metrics_term();
@ -303,7 +303,7 @@ void gpex_dvfs_term()
dvfs.kbdev = NULL;
}
int gpex_dvfs_get_status()
int gpex_dvfs_get_status(void)
{
return dvfs.status;
}

View file

@ -94,7 +94,7 @@ int gpex_platform_init(struct device **dev)
return 0;
}
void gpex_platform_term()
void gpex_platform_term(void)
{
runtime_test_runner_term();

View file

@ -101,17 +101,17 @@ int gpex_pm_get_status(bool clock_lock)
}
/* Read the power_status value set by gpex_pm module */
int gpex_pm_get_power_status()
int gpex_pm_get_power_status(void)
{
return pm.power_status;
}
void gpex_pm_lock()
void gpex_pm_lock(void)
{
gpexbe_pm_access_lock();
}
void gpex_pm_unlock()
void gpex_pm_unlock(void)
{
gpexbe_pm_access_unlock();
}

View file

@ -118,7 +118,7 @@ int gpex_qos_unset(gpex_qos_flag flags)
return 0;
}
int gpex_qos_init()
int gpex_qos_init(void)
{
int i = 0;
gpu_dt *dt = gpexbe_devicetree_get_gpu_dt();
@ -179,7 +179,7 @@ int gpex_qos_init()
return 0;
}
void gpex_qos_term()
void gpex_qos_term(void)
{
gpexbe_qos_request_remove(PMQOS_MIF | PMQOS_LITTLE | PMQOS_MIDDLE | PMQOS_BIG | PMQOS_MIN |
PMQOS_MAX);

View file

@ -37,7 +37,7 @@ void gpex_thermal_set_status(bool status)
thermal.tmu_enabled = status;
}
int gpex_thermal_gpu_normal()
int gpex_thermal_gpu_normal(void)
{
int ret = 0;
ret = gpex_clock_lock_clock(GPU_CLOCK_MAX_UNLOCK, TMU_LOCK, 0);
@ -149,7 +149,7 @@ static ssize_t show_kernel_sysfs_gpu_temp(char *buf)
}
CREATE_SYSFS_KOBJECT_READ_FUNCTION(show_kernel_sysfs_gpu_temp);
static void gpex_thermal_create_sysfs_file()
static void gpex_thermal_create_sysfs_file(void)
{
GPEX_UTILS_SYSFS_DEVICE_FILE_ADD(tmu, show_tmu, set_tmu_control);
GPEX_UTILS_SYSFS_KOBJECT_FILE_ADD_RO(gpu_tmu, show_kernel_sysfs_gpu_temp);
@ -158,7 +158,7 @@ static void gpex_thermal_create_sysfs_file()
/***********************************************************************
* INIT, TERM FUNCTIONS
***********************************************************************/
int gpex_thermal_init()
int gpex_thermal_init(void)
{
gpex_thermal_create_sysfs_file();
@ -167,7 +167,7 @@ int gpex_thermal_init()
return 0;
}
void gpex_thermal_term()
void gpex_thermal_term(void)
{
thermal.tmu_enabled = false;

View file

@ -31,7 +31,7 @@
static struct dvfs_info *dvfs;
/* TODO: This should be moved to DVFS module */
int gpex_dvfs_set_clock_callback()
int gpex_dvfs_set_clock_callback(void)
{
unsigned long flags;
int level = 0;

View file

@ -240,27 +240,27 @@ void mali_exynos_set_thread_affinity(void)
gpex_cmar_sched_set_affinity();
}
void mali_exynos_coherency_reg_map()
void mali_exynos_coherency_reg_map(void)
{
gpexbe_llc_coherency_reg_map();
}
void mali_exynos_coherency_reg_unmap()
void mali_exynos_coherency_reg_unmap(void)
{
gpexbe_llc_coherency_reg_unmap();
}
void mali_exynos_coherency_set_coherency_feature()
void mali_exynos_coherency_set_coherency_feature(void)
{
gpexbe_llc_coherency_set_coherency_feature();
}
void mali_exynos_llc_set_aruser()
void mali_exynos_llc_set_aruser(void)
{
gpexbe_llc_coherency_set_aruser();
}
void mali_exynos_llc_set_awuser()
void mali_exynos_llc_set_awuser(void)
{
gpexbe_llc_coherency_set_awuser();
}

View file

@ -20,11 +20,11 @@
#include <runtime_test_runner.h>
int runtime_test_runner_init()
int runtime_test_runner_init(void)
{
return 0;
}
void runtime_test_runner_term()
void runtime_test_runner_term(void)
{
}

View file

@ -604,7 +604,7 @@ static int slsi_sm_ant_service_cleanup_stop_service(void)
#endif
#ifdef CONFIG_SCSC_ANT
static int slsi_sm_ant_service_cleanup()
static int slsi_sm_ant_service_cleanup(void)
{
int ret = 0;
@ -1489,7 +1489,7 @@ static int slsi_sm_bt_service_stop(void)
#ifdef CONFIG_SCSC_ANT
/* Stop the ANT service */
static int slsi_sm_ant_service_stop()
static int slsi_sm_ant_service_stop(void)
{
SCSC_TAG_INFO(BT_COMMON, "ant service users %u\n", atomic_read(&ant_service.service_users));

View file

@ -57,7 +57,7 @@ static void show_callstack(void *info)
__show_callstack(NULL);
}
static struct task_struct *secdbg_softdog_find_key_suspect()
static struct task_struct *secdbg_softdog_find_key_suspect(void)
{
struct task_struct *c, *g;

View file

@ -83,7 +83,7 @@ void usb_tpmon_check_tp(void *data, struct dwc3_request *req)
return;
}
void usb_tpmon_init_data()
void usb_tpmon_init_data(void)
{
pr_info("Intialization USB TPMON data.\n");
tpmon.accumulated_time = 0;
@ -118,7 +118,7 @@ static void usb_tpmon_work(struct work_struct *data)
dwc3_otg_pm_ctrl(g_dwc3_exynos, 0);
}
void usb_tpmon_init()
void usb_tpmon_init(void)
{
pr_info("%s\n", __func__);
@ -129,20 +129,20 @@ void usb_tpmon_init()
timer_setup(&tpmon.qos_unlock_timer, timer_qos_unlock, 0);
}
void usb_tpmon_exit()
void usb_tpmon_exit(void)
{
pr_info("%s\n", __func__);
destroy_workqueue(tpmon.tpmon_wq);
}
void usb_tpmon_open()
void usb_tpmon_open(void)
{
pr_info("%s\n", __func__);
usb_tpmon_init_data();
}
/* Call this function at removing USB */
void usb_tpmon_close()
void usb_tpmon_close(void)
{
pr_info("%s\n", __func__);
pr_info("USB TPMON - Unlock all.\n");

View file

@ -1300,10 +1300,10 @@ err_:
if (dev->rd_queue_buf)
vfree(dev->rd_queue_buf);
_conn_gadget_dev = NULL;
kfree(dev);
CONN_GADGET_ERR("conn_gadget gadget driver failed to initialize\n");
return ret;
_conn_gadget_dev = NULL;
kfree(dev);
CONN_GADGET_ERR("conn_gadget gadget driver failed to initialize\n");
return ret;
}
static void conn_gadget_cleanup(struct kref *kref)
@ -1320,8 +1320,8 @@ static void conn_gadget_cleanup(struct kref *kref)
if (_conn_gadget_dev->rd_queue_buf)
vfree(_conn_gadget_dev->rd_queue_buf);
kfree(_conn_gadget_dev);
_conn_gadget_dev = NULL;
kfree(_conn_gadget_dev);
_conn_gadget_dev = NULL;
}
static int conn_gadget_setup_configfs(struct conn_gadget_instance *fi_conn_gadget)

View file

@ -728,7 +728,7 @@ static void tas2562_irq_work_routine(struct tas2562_priv *p_tas2562)
if (temp_err_code_r)
tas2562_update_bigdata(channel_right, temp_err_code_r);
goto reload;
goto reload;
} else {
n_counter = 2;