<commit_before>#include <kernel/time/time.h>

struct clocksource* clocksource_list = NULL;
struct clocksource* current_clocksource = NULL;

// Copied verbatim from the Linux kernel - To comply with licensing:
/*
 * Copyright (C) 2004, 2005 IBM, <NAME> (<EMAIL>)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
void clocksource_calculate(uint32_t* mult, uint32_t* shift, uint32_t from,
                           uint32_t to, uint32_t max)
{
    uint64_t tmp;
    uint32_t sft, sftacc = 32;

    /*
     * Calculate the shift factor which is limiting the conversion
     * range:
     */
    tmp = ((uint64_t)max * from) >> 32;
    while (tmp) {
        tmp >>= 1;
        sftacc--;
    }

    /*
     * Find the conversion shift/mult pair which has the best
     * accuracy and fits the maxsec conversion range:
     */
    for (sft = 32; sft > 0; sft--) {
        tmp = (uint64_t)to << sft;
        tmp += from / 2;
        tmp /= from;
        if ((tmp >> sftacc) == 0)
            break;
    }
    *mult = tmp;
    *shift = sft;
}

void clocksource_select()
{
    struct clocksource* cs = NULL;<commit_msg>Remove clocksource_calculate code<commit_after>#include <kernel/time/time.h>

struct clocksource* clocksource_list = NULL;
struct clocksource* current_clocksource = NULL;

void clocksource_calculate(uint32_t* mult, uint32_t* shift, uint32_t from,
                           uint32_t to, uint32_t max)
{
}

void clocksource_select()
{
    struct clocksource* cs = NULL;
{'fraction_non_alphanumeric': 0.090014064697609, 'fraction_numerical': 0.025785278949835913, 'mean_word_length': 2.845045045045045, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '484091', 'n_tokens_mistral': 677, 'n_tokens_neox': 632, 'n_words': 247}