#include #include struct arm_annotate { regex_t call_insn, jump_insn; }; static struct ins_ops *arm__associate_instruction_ops(struct arch *arch, const char *name) { struct arm_annotate *arm = arch->priv; struct ins_ops *ops; regmatch_t match[2]; if (!regexec(&arm->call_insn, name, 2, match, 0)) ops = &call_ops; else if (!regexec(&arm->jump_insn, name, 2, match, 0)) ops = &jump_ops; else return NULL; arch__associate_ins_ops(arch, name, ops); return ops; } static int arm__annotate_init(struct arch *arch) { struct arm_annotate *arm; int err; if (arch->initialized) return 0; arm = zalloc(sizeof(*arm)); if (!arm) return -1; #define ARM_CONDS "(cc|cs|eq|ge|gt|hi|le|ls|lt|mi|ne|pl|vc|vs)" err = regcomp(&arm->call_insn, "^blx?" ARM_CONDS "?$", REG_EXTENDED); if (err) goto out_free_arm; err = regcomp(&arm->jump_insn, "^bx?" ARM_CONDS "?$", REG_EXTENDED); if (err) goto out_free_call; #undef ARM_CONDS arch->initialized = true; arch->priv = arm; arch->associate_instruction_ops = arm__associate_instruction_ops; arch->objdump.comment_char = ';'; arch->objdump.skip_functions_char = '+'; return 0; out_free_call: regfree(&arm->call_insn); out_free_arm: free(arm); return -1; } n value='packet-rx-pump-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
n value='9'>9
AgeCommit message (Expand)AuthorFilesLines
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-01-26 17:15:44 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-01-26 18:03:09 +0100
commit228c8c6b1f4376788e9d5ab00d50b10228eb40d3 (patch)
treedfd7010fa9480284fe72bb2c4ab50a5225792a10 /sound/soc/adi
parent731977e97b3697454a862fec656c2561eabc0b87 (diff)
wireless: define cipher/AKM suites using a macro
The spec writes cipher/AKM suites as something like 00-0F-AC:9, but the part after the colon isn't hex, it's decimal, so that we've already had a few mistakes (in other code, or unmerged patches) to e.g. write 0x000FAC10 instead of 0x000FAC0A. Use a macro to avoid that problem. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'sound/soc/adi')