mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-15 01:44:52 +00:00
drm/i915: intel_display.c handle latency variable efficiently
By handling latency variable efficiently we also get rid of this warning : CC [M] drivers/gpu/drm/i915/intel_display.o drivers/gpu/drm/i915/intel_display.c: In function ‘igd_enable_cxsr’: drivers/gpu/drm/i915/intel_display.c:1918: warning: ‘latency’ may be used uninitialized in this function Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
b7e53aba2f
commit
decbbcda29
@ -2184,14 +2184,13 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb,
|
||||
for (i = 0; i < ARRAY_SIZE(cxsr_latency_table); i++) {
|
||||
latency = &cxsr_latency_table[i];
|
||||
if (is_desktop == latency->is_desktop &&
|
||||
fsb == latency->fsb_freq && mem == latency->mem_freq)
|
||||
break;
|
||||
fsb == latency->fsb_freq && mem == latency->mem_freq)
|
||||
return latency;
|
||||
}
|
||||
if (i >= ARRAY_SIZE(cxsr_latency_table)) {
|
||||
DRM_DEBUG("Unknown FSB/MEM found, disable CxSR\n");
|
||||
return NULL;
|
||||
}
|
||||
return latency;
|
||||
|
||||
DRM_DEBUG("Unknown FSB/MEM found, disable CxSR\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void igd_disable_cxsr(struct drm_device *dev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user