public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Cc: [email protected]
Subject: [ammarfaizi2-block:google/android/kernel/common/android-4.9-q-release 2199/9999] drivers/cpufreq/cpufreq_times.c:117:35: sparse: sparse: implicit cast to nocast type
Date: Sun, 21 Aug 2022 12:27:42 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.9-q-release
head:   8c62b2bd034cfb52860b9e3f333b1ef587052af2
commit: 6e7b83d80b5f81f41f3df9b3660acdf88532c879 [2199/9999] ANDROID: cpufreq: track per-task time in state
config: i386-randconfig-s003 (https://download.01.org/0day-ci/archive/20220821/[email protected]/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/6e7b83d80b5f81f41f3df9b3660acdf88532c879
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.9-q-release
        git checkout 6e7b83d80b5f81f41f3df9b3660acdf88532c879
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/cpufreq/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

sparse warnings: (new ones prefixed by >>)
>> drivers/cpufreq/cpufreq_times.c:117:35: sparse: sparse: implicit cast to nocast type
   drivers/cpufreq/cpufreq_times.c:120:59: sparse: sparse: implicit cast to nocast type

vim +117 drivers/cpufreq/cpufreq_times.c

    96	
    97	int proc_time_in_state_show(struct seq_file *m, struct pid_namespace *ns,
    98		struct pid *pid, struct task_struct *p)
    99	{
   100		unsigned int cpu, i;
   101		cputime_t cputime;
   102		unsigned long flags;
   103		struct cpu_freqs *freqs;
   104		struct cpu_freqs *last_freqs = NULL;
   105	
   106		spin_lock_irqsave(&task_time_in_state_lock, flags);
   107		for_each_possible_cpu(cpu) {
   108			freqs = all_freqs[cpu];
   109			if (!freqs || freqs == last_freqs)
   110				continue;
   111			last_freqs = freqs;
   112	
   113			seq_printf(m, "cpu%u\n", cpu);
   114			for (i = 0; i < freqs->max_state; i++) {
   115				if (freqs->freq_table[i] == CPUFREQ_ENTRY_INVALID)
   116					continue;
 > 117				cputime = 0;
   118				if (freqs->offset + i < p->max_state &&
   119				    p->time_in_state)
   120					cputime = p->time_in_state[freqs->offset + i];
   121				seq_printf(m, "%u %lu\n", freqs->freq_table[i],
   122					   (unsigned long)cputime_to_clock_t(cputime));
   123			}
   124		}
   125		spin_unlock_irqrestore(&task_time_in_state_lock, flags);
   126		return 0;
   127	}
   128	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-21  4:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox