mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drm: tegra: virt: Fix compilation warning
Fix following compilation warning when build as OOT module:
virt.c:270:2: warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]
virt.c:345:16: warning: format ‘%d’ expects argument of type
‘int’, but argument 3 has type ‘long int’ [-Wformat=]
Bug 4052299
Change-Id: I8eb33d9c8b0e9847ca76b812ce2ebcf6e65adf96
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
@@ -252,6 +252,7 @@ static int actmon_debugfs_usage_show(struct seq_file *s, void *unused)
|
||||
{
|
||||
struct virt_engine *virt = s->private;
|
||||
unsigned long rate;
|
||||
int cycles_per_actmon_sample;
|
||||
int count;
|
||||
|
||||
rate = clk_get_rate(virt->clk);
|
||||
@@ -267,7 +268,7 @@ static int actmon_debugfs_usage_show(struct seq_file *s, void *unused)
|
||||
/* Based on configuration in NvHost Server */
|
||||
#define ACTMON_SAMPLE_PERIOD_US 100
|
||||
/* Rate in MHz cancels out microseconds */
|
||||
int cycles_per_actmon_sample = (rate / 1000000) * ACTMON_SAMPLE_PERIOD_US;
|
||||
cycles_per_actmon_sample = (rate / 1000000) * ACTMON_SAMPLE_PERIOD_US;
|
||||
|
||||
seq_printf(s, "%d\n", (count * 1000) / cycles_per_actmon_sample);
|
||||
|
||||
@@ -342,7 +343,7 @@ static int virt_engine_probe(struct platform_device *pdev)
|
||||
|
||||
virt->clk = devm_clk_get_optional(&pdev->dev, NULL);
|
||||
if (IS_ERR(virt->clk)) {
|
||||
dev_err(dev, "could not get clock: %d\n", PTR_ERR(virt->clk));
|
||||
dev_err(dev, "could not get clock: %ld\n", PTR_ERR(virt->clk));
|
||||
return PTR_ERR(virt->clk);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user