Takashi Sakamoto
f9cf776b05
ASoC: hdmi-codec: use unsigned type to structure members with bit-field
...
commit 9e4d59ada4d602e78eee9fb5f898ce61fdddb446 upstream.
This is a fix for Linux 4.10-rc1.
In C language specification, a bit-field is interpreted as a signed or
unsigned integer type consisting of the specified number of bits.
In GCC manual, the range of a signed bit field of N bits is from
-(2^N) / 2 to ((2^N) / 2) - 1
https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Bit-Fields
Therefore, when defined as 1 bit-field with signed type, variables can
represents -1 and 0.
The snd-soc-hdmi-codec module includes a structure which has signed type
members with bit-fields. Codes of this module assign 0 and 1 to the
members. This seems to result in implementation-dependent behaviours.
As of v4.10-rc1 merge window, outside of sound subsystem, this structure
is referred by below GPU modules.
- tda998x
- sti-drm
- mediatek-drm-hdmi
- msm
As long as I review their codes relevant to the structure, the structure
members are used just for condition statements and printk formats.
My proposal of change is a bit intrusive to the printk formats but this
may be acceptable.
Totally, it's reasonable to use unsigned type for the structure members.
This bug is detected by Sparse, static code analyzer with below warnings.
./include/sound/hdmi-codec.h:39:26: error: dubious one-bit signed bitfield
./include/sound/hdmi-codec.h:40:28: error: dubious one-bit signed bitfield
./include/sound/hdmi-codec.h:41:29: error: dubious one-bit signed bitfield
./include/sound/hdmi-codec.h:42:31: error: dubious one-bit signed bitfield
Fixes: 09184118a8 ("ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19 20:18:02 +01:00
..
ac97_codec.h
ASoC: ac97: add gpio chip
2015-11-18 18:08:54 +00:00
aci.h
ad1816a.h
ALSA: ad1816a: Remove always NULL parameters
2015-01-02 16:26:20 +01:00
ad1843.h
adau1373.h
ASoC: Add ADAU1373 codec support
2011-08-17 00:53:54 +09:00
aess.h
ASoC: TI AESS: add autogating-enable function, callable from architecture code
2013-02-10 11:22:23 -07:00
ak4xxx-adda.h
ak4113.h
ALSA: ak411x: Fix race of reinit() calls
2015-01-28 22:30:18 +01:00
ak4114.h
ALSA: ak411x: Fix race of reinit() calls
2015-01-28 22:30:18 +01:00
ak4117.h
ak4531_codec.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
ak4641.h
ASoC: Asahi Kasei AK4641 codec driver
2011-05-19 14:10:45 -07:00
alc5623.h
ASoC: add support for alc562[123] codecs
2010-10-21 13:51:13 -07:00
asequencer.h
UAPI: (Scripted) Disintegrate include/sound
2012-10-09 09:49:13 +01:00
asound.h
UAPI: (Scripted) Disintegrate include/sound
2012-10-09 09:49:13 +01:00
asoundef.h
ALSA: Add definitions for CEA-861 Audio InfoFrames
2012-04-18 08:00:36 +02:00
atmel-abdac.h
dmaengine: dw: move dw_dmac.h to where it belongs to
2014-09-11 11:48:12 +05:30
atmel-ac97c.h
dmaengine: dw: move dw_dmac.h to where it belongs to
2014-09-11 11:48:12 +05:30
compress_driver.h
ALSA: compress: Add function to indicate the stream has gone bad
2016-06-13 16:45:37 +01:00
control.h
ALSA: hda - Update to use the new jack kctls method
2015-04-27 21:37:42 +02:00
core.h
ALSA: hda_intel: add card number to irq description
2016-01-12 21:05:16 +01:00
cs35l33.h
ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.
2016-06-27 17:39:06 +01:00
cs42l52.h
ASoC: cs42l52: Make MICA/B mixer dependent on mic config
2013-11-28 10:20:51 +00:00
cs42l56.h
ASoC: Add support for CS42L56 CODEC
2014-05-05 18:20:22 -07:00
cs42l73.h
ASoC: cs42l73: Add platform data support for cs42l73 codec
2013-10-18 00:37:29 +01:00
cs4231-regs.h
cs4271.h
ALSA: ASoC: cs4271: add optional soft reset workaround
2012-12-24 15:53:28 +00:00
cs8403.h
cs8427.h
ALSA: cs8427: separate HW initialization
2014-04-03 14:59:48 +02:00
da7213.h
ASoC: da7213: Add support to handle mclk data provided to driver
2015-10-07 15:11:34 +01:00
da7218.h
ASoC: da7218: Add da7218 codec driver
2015-11-30 12:24:12 +00:00
da7219-aad.h
ASoC: codecs: Add da7219 codec driver
2015-10-02 18:11:27 +01:00
da7219.h
ASoC: da7219: Disable AAD if codec is not a wake-up source
2016-09-26 09:39:50 -07:00
da9055.h
ASoC: codecs: Add DA9055 codec driver
2012-09-28 14:21:54 +01:00
designware_i2s.h
ASoC: dwc: add quirk to override COMP_PARAM_1 register
2016-01-10 12:11:50 +00:00
dmaengine_pcm.h
ASoC: dmaengine_pcm: Add support for packed transfers
2016-04-27 17:34:11 +01:00
emu10k1.h
ALSA: emu10k1: Emu10k2 32 bit DMA mode
2015-04-29 07:27:30 +02:00
emu10k1_synth.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
emu8000.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
emu8000_reg.h
emux_legacy.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
emux_synth.h
ALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FS
2015-05-29 07:58:11 +02:00
es1688.h
ALSA: es1688: Remove almost always NULL parameter
2015-01-02 16:27:03 +01:00
gus.h
ALSA: Include linux/io.h instead of asm/io.h
2015-01-28 16:49:33 +01:00
hda_chmap.h
ALSA: hda - Update chmap tlv to report sink's capability
2016-04-04 16:04:24 +02:00
hda_hwdep.h
hda_i915.h
Merge branch 'for-linus' into for-next
2016-04-26 10:12:46 +02:00
hda_register.h
ALSA - hda: Add support for parsing new HDA capabilities
2016-08-09 08:53:56 +02:00
hda_regmap.h
ALSA: hda - Fix possible race on regmap bypass flip
2016-04-21 17:59:17 +02:00
hda_verbs.h
ALSA: hda - Split verb definitions into sound/hda_verbs.h
2013-12-09 17:31:40 +01:00
hdaudio.h
ALSA: hda - move bus_parse_capabilities to core
2016-08-09 08:53:56 +02:00
hdaudio_ext.h
ALSA - Ext hda: remove bus_parse_capabilities
2016-08-09 08:53:56 +02:00
hdmi-codec.h
ASoC: hdmi-codec: use unsigned type to structure members with bit-field
2017-01-19 20:18:02 +01:00
hwdep.h
ALSA: hwdep: Embed struct device
2015-02-02 14:42:42 +01:00
i2c.h
ALSA: i2c: constify snd_i2c_ops structures
2015-11-30 11:40:08 +01:00
info.h
ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS
2015-05-27 21:25:19 +02:00
initval.h
ALSA: isa: Move snd_legacy_find_free_ioport to initval.h
2012-08-03 12:57:44 +02:00
jack.h
ALSA: jack: Allow building the jack layer without input device
2016-02-23 09:03:07 +01:00
l3.h
ASoC: L3 bus: Add default gpio ops
2016-08-08 11:55:20 +01:00
max9768.h
ASoC: max9768: add driver for max9768 amplifier
2012-01-30 21:50:55 +00:00
max98088.h
ASoC: Restore MAX98088 CODEC driver
2010-10-18 16:46:27 -07:00
max98090.h
ASoC:: max98090: Remove executable bit
2013-03-20 10:54:12 +01:00
max98095.h
ASoC: max98095: Single bit bitfields should be unsigned
2012-05-13 23:33:53 +01:00
memalloc.h
ALSA: Remove memory reservation code from memalloc helper
2014-01-09 07:32:10 +01:00
minors.h
ALSA: core: add support for compressed devices
2011-12-23 10:07:46 +01:00
mixer_oss.h
ALSA: core: sparse cleanups
2011-02-14 17:10:11 +01:00
mpu401.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
omap-hdmi-audio.h
omapdss: hdmi audio: Make header file independent of video/omapdss.h
2016-06-03 16:06:36 +03:00
omap-pcm.h
ASoC: omap-pcm: Move omap-pcm under include/sound
2014-05-26 15:32:32 +01:00
opl3.h
opl4.h
pcm-indirect.h
pcm.h
ALSA: pcm: Add snd_pcm_rate_range_to_bits()
2016-02-05 18:49:00 +00:00
pcm_drm_eld.h
ALSA: pcm: add DRM ELD helper
2015-05-22 16:01:44 +02:00
pcm_iec958.h
ALSA: pcm: add IEC958 channel status helper for hw_params
2016-04-06 11:47:48 -07:00
pcm_oss.h
ALSA: pcm_lib - cleanup & merge hw_ptr update functions
2010-01-07 15:47:38 +01:00
pcm_params.h
ALSA: Add params_set_format helper
2015-02-24 00:43:18 +09:00
pt2258.h
pxa2xx-lib.h
ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm
2015-09-30 23:21:16 +01:00
rawmidi.h
ALSA: rawmidi: Make snd_rawmidi_transmit() race-free
2016-02-03 14:51:28 +01:00
rt286.h
ASoC: add RT286 CODEC driver
2014-07-04 18:50:51 +01:00
rt298.h
ASoC: add rt298 codec driver
2015-07-09 12:00:11 +01:00
rt5640.h
ASoC: rt5640: Fill up the IN3's support
2015-10-22 13:33:00 +01:00
rt5645.h
ASoC: rt5645: Add jd_invert for Broadwell
2015-09-22 09:46:33 -07:00
rt5651.h
ASoC: add RT5651 CODEC driver
2014-04-18 18:52:18 +01:00
rt5659.h
ASoC: rt5659: add rt5659 codec driver
2015-11-18 12:55:25 +00:00
rt5660.h
ASoC: rt5660: add rt5660 codec driver
2016-09-24 19:51:57 +01:00
rt5670.h
ASoC: rt5670: Add IRQ function
2015-03-11 12:08:20 +00:00
rt5677.h
ASoC: rt5677: Add the MICBIAS VDD setting in the platform data
2015-01-08 18:36:02 +00:00
s3c24xx_uda134x.h
ASoC: s3c24xx_uda134x: Remove unused power() callback
2016-08-08 11:55:20 +01:00
sb.h
ALSA: Include linux/io.h instead of asm/io.h
2015-01-28 16:49:33 +01:00
sb16_csp.h
UAPI: (Scripted) Disintegrate include/sound
2012-10-09 09:49:13 +01:00
seq_device.h
ALSA: seq: Define driver object in each driver
2015-02-12 14:15:54 +01:00
seq_kernel.h
ALSA: seq: Drop snd_seq_autoload_lock() and _unlock()
2015-02-12 14:42:31 +01:00
seq_midi_emul.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
seq_midi_event.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
seq_oss.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
seq_oss_legacy.h
seq_virmidi.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
sh_dac_audio.h
sh_fsi.h
ASoC: fsi: cleanup sh_fsi.h
2012-12-24 15:57:20 +00:00
simple_card.h
ASoC: simple-card: use asoc_simple_card_parse_daifmt()
2016-07-01 17:34:02 +02:00
simple_card_utils.h
ASoC: simple-card-utils: add __printf attribute
2016-08-24 16:27:04 +01:00
snd_wavefront.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
soc-dai.h
ASoC: Support registering a DAI dynamically
2016-01-10 12:06:19 +00:00
soc-dapm.h
Merge remote-tracking branches 'asoc/topic/dpcm', 'asoc/topic/dt', 'asoc/topic/dwc' and 'asoc/topic/fsl' into asoc-next
2016-07-24 22:07:33 +01:00
soc-dpcm.h
ASoC: Make soc_dpcm_debugfs_add() non-fatal
2015-04-09 11:32:29 +01:00
soc-topology.h
ASoC: topology: Add FE DAI links dynamically
2016-02-15 19:38:19 +00:00
soc.h
Merge remote-tracking branches 'asoc/topic/nau8810', 'asoc/topic/of-bool', 'asoc/topic/omap' and 'asoc/topic/platform-drvdata' into asoc-next
2016-09-29 12:44:31 -07:00
soundfont.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
spear_dma.h
ASoC: Update email-id of Rajeev Kumar
2015-04-28 16:31:01 +01:00
spear_spdif.h
ASoC: SPEAr spdif_in: Add spdif IN support
2012-06-23 11:58:10 +01:00
sta32x.h
ASoC: sta32x: add device tree binding.
2015-01-27 17:13:25 +00:00
sta350.h
ASoC: sta350: add support for bits in miscellaneous registers
2014-05-05 12:52:59 -07:00
tas2552-plat.h
ASoC: tas2552: Support TI TAS2552 Amplifier
2014-07-17 17:57:05 +01:00
tas5086.h
ALSA: ASoC: add codec driver for TI TAS5086
2013-03-08 21:06:09 +08:00
tea6330t.h
UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers
2012-10-02 18:01:25 +01:00
timer.h
ALSA: timer: Introduce disconnect op to snd_timer_instance
2016-01-21 17:51:42 +01:00
tlv.h
ALSA: control: cage TLV_DB_RANGE_HEAD in kernel land because it was obsoleted
2016-09-25 22:16:49 +02:00
tlv320aic3x.h
ASoC: tlv320aic3x: Convert mic bias to a supply widget
2013-02-04 18:35:19 +00:00
tlv320aic32x4.h
ASoC: tlv320aic32x4: Add rstn gpio to platform data.
2012-11-01 14:35:56 +00:00
tlv320dac33-plat.h
ASoC: tlv320dac33: Update e-mail address
2011-05-11 16:12:35 +01:00
tpa6130a2-plat.h
ASoC: tpa6130a2: Remove model_id from platform data
2011-09-21 16:07:45 +01:00
uda134x.h
ASoC: uda134x: Remove is_powered_on_standby from platform data
2014-11-24 18:04:49 +00:00
uda1380.h
util_mem.h
vx_core.h
ALSA: vx: Use nonatomic PCM ops
2014-09-15 15:52:03 +02:00
wavefront.h
wm0010.h
ASoC: wm0010: Add initial wm0010 DSP driver
2012-08-23 16:12:12 +01:00
wm1250-ev1.h
ASoC: Add platform data for WM1250 EV1 GPIOs
2011-09-23 17:05:38 +01:00
wm2000.h
ASoC: wm2000: Use clock API integration to configure MCLK divisor
2012-12-24 15:42:35 +00:00
wm2200.h
ASoC: wm2200: Provide platform data for MICBIAS configuration
2013-02-05 15:53:07 +00:00
wm5100.h
ASoC: Add WM5100 driver
2011-09-20 16:02:16 +01:00
wm8903.h
ASoC: WM8903: Fix platform data gpio_cfg confusion
2011-12-06 10:29:22 +00:00
wm8904.h
ASoC: wm8904: Correct number of EQ registers
2015-10-20 15:46:09 +01:00
wm8955.h
ASoC: Add initial WM8955 CODEC driver
2009-12-18 13:06:47 +00:00
wm8960.h
ASoC: wm8960: remove 'dres' field from platform data structure
2012-09-21 08:35:06 -04:00
wm8962.h
ASoC: wm8962: Let CODEC driver enable and disable its own MCLK
2014-07-31 20:51:26 +01:00
wm8993.h
ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdata
2012-08-22 19:00:37 +01:00
wm8996.h
ASoC: Rename WM8915 to WM8996
2011-08-08 14:30:37 +09:00
wm9081.h
ASoC: Add platform data for WM9081 IRQ pin configuration
2011-03-01 23:30:53 +00:00
wm9090.h
ASoC: Add WM9090 amplifier driver
2010-04-30 16:12:44 +01:00
wss.h
ALSA: wss: Remove (almost) always NULL parameters
2015-01-02 16:30:08 +01:00