Hi Takashi, There is a lot of data structures in that code, and most of them seems to be read-only. I added const modifiers to most of such places: text data bss dec hex filename 106315 179564 36 285915 45cdb snd-hda-intel.o 283051 2624 36 285711 45c0f snd-hda-intel_patched.o Patch is attached. It moves "static struct hda_codec_preset *hda_preset_tables[]" from hda_patch.h to hda_codec.c, and then adds #include "hda_patch.h" in a few .c files so that definitions of e.g. const struct hda_codec_preset snd_hda_preset_analog[] are checked to match declarations in hda_patch.h The rest of the patch (bulk of it) adds "const" in many places. Patch is compile tested. Please apply. Signed-off-by: Denys Vlasenko <[email protected]> -- vda
Attachment:
constify_hda_codec.diff.bz2
Description: BZip2 compressed data
- Follow-Ups:
- Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- From: Takashi Iwai <[email protected]>
- Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- From: Jan Engelhardt <[email protected]>
- Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- From: Denys Vlasenko <[email protected]>
- Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- From: Joe Perches <[email protected]>
- Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- Prev by Date: Re: [linux-dvb] [PATCH] Userspace tuner
- Next by Date: Re: [PATCH 1/2] Trace code and documentation
- Previous by thread: [PATCH -rc][RESEND] KVM: MMU: Fix rare oops on guest context switch
- Next by thread: Re: [PATCH] add consts where appropriate in sound/pci/hda/*
- Index(es):