projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2d4560
)
ALSA: hda/ca0132: Use struct_size()
author
Takashi Iwai
<tiwai@suse.de>
Fri, 31 May 2019 09:47:24 +0000
(11:47 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 31 May 2019 09:47:24 +0000
(11:47 +0200)
For code simplification and safety, use struct_size() macro for
calculating the dsp_image_seg object size.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/patch_ca0132.c
b/sound/pci/hda/patch_ca0132.c
index e1ebc6d5f38226b10f689b2bc04fd0504331ced2..de61179c91e2cdcc95de01fba569ea1c692f9488 100644
(file)
--- a/
sound/pci/hda/patch_ca0132.c
+++ b/
sound/pci/hda/patch_ca0132.c
@@
-2731,7
+2731,7
@@
static bool is_last(const struct dsp_image_seg *p)
static size_t dsp_sizeof(const struct dsp_image_seg *p)
{
- return s
izeof(*p) + p->count*sizeof(u32
);
+ return s
truct_size(p, data, p->count
);
}
static const struct dsp_image_seg *get_next_seg_ptr(