lkml.org 
[lkml]   [2022]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 3/8] kallsyms: Adjust the types of some local variables
    Date
    The type of kallsyms_num_syms is 'unsigned int', adjust the type of
    local variables associated with it for indexing, so that their types
    are consistent.

    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    ---
    kernel/kallsyms.c | 8 +++-----
    1 file changed, 3 insertions(+), 5 deletions(-)

    diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
    index 3e7e2c2ad2f75ef..9dd4774b6c6edf6 100644
    --- a/kernel/kallsyms.c
    +++ b/kernel/kallsyms.c
    @@ -190,8 +190,7 @@ static bool cleanup_symbol_name(char *s)
    unsigned long kallsyms_lookup_name(const char *name)
    {
    char namebuf[KSYM_NAME_LEN];
    - unsigned long i;
    - unsigned int off;
    + unsigned int i, off;

    /* Skip the search for empty string. */
    if (!*name)
    @@ -218,8 +217,7 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
    void *data)
    {
    char namebuf[KSYM_NAME_LEN];
    - unsigned long i;
    - unsigned int off;
    + unsigned int i, off;
    int ret;

    for (i = 0, off = 0; i < kallsyms_num_syms; i++) {
    @@ -237,7 +235,7 @@ static unsigned long get_symbol_pos(unsigned long addr,
    unsigned long *offset)
    {
    unsigned long symbol_start = 0, symbol_end = 0;
    - unsigned long i, low, high, mid;
    + unsigned int i, low, high, mid;

    /* This kernel should never had been booted. */
    if (!IS_ENABLED(CONFIG_KALLSYMS_BASE_RELATIVE))
    --
    2.25.1
    \
     
     \ /
      Last update: 2022-09-09 15:04    [W:2.875 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site