mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
Simplify major/minor non-dynamic logic
changeset6bbf7a855d("media: dvbdev: convert DVB device types into an enum") added a new warning on gcc 6: >> drivers/media/dvb-core/dvbdev.c:86:1: warning: control reaches end of non-void function [-Wreturn-type] That's because gcc is not smart enough to see that all types are present at the switch. Also, the current code is not too optimized. So, replace it to a more optimized one, based on a static table. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes:6bbf7a855d("media: dvbdev: convert DVB device types into an enum") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
01153bf04d
commit
8382e556b1
1 changed files with 13 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue