Skip to content
Commit 8382e556 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

Simplify major/minor non-dynamic logic

changeset 6bbf7a85

 ("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: default avatarkbuild test robot <fengguang.wu@intel.com>
Fixes: 6bbf7a85

 ("media: dvbdev: convert DVB device types into an enum")
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 01153bf0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment