All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-4.9-q 1/1] drivers/staging/android/lowmemorykiller.c:99:6: warning: no previous prototype for 'handle_lmk_event'
@ 2021-03-26  5:17 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-26  5:17 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3628 bytes --]

tree:   https://android.googlesource.com/kernel/common android-4.9-q
head:   941128efa146c580a82fd499afe3b28023681c8f
commit: 941128efa146c580a82fd499afe3b28023681c8f [1/1] ANDROID: Communicates LMK events to userland where they can be logged
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
        git remote add android-common https://android.googlesource.com/kernel/common
        git fetch --no-tags android-common android-4.9-q
        git checkout 941128efa146c580a82fd499afe3b28023681c8f
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/oom.h:5:0,
                    from drivers/staging/android/lowmemorykiller.c:39:
   include/linux/sched.h:1201:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
    ^~~~~
>> drivers/staging/android/lowmemorykiller.c:99:6: warning: no previous prototype for 'handle_lmk_event' [-Wmissing-prototypes]
    void handle_lmk_event(struct task_struct *selected, short min_score_adj)
         ^~~~~~~~~~~~~~~~


vim +/handle_lmk_event +99 drivers/staging/android/lowmemorykiller.c

    98	
  > 99	void handle_lmk_event(struct task_struct *selected, short min_score_adj)
   100	{
   101		int head;
   102		int tail;
   103		struct lmk_event *events;
   104		struct lmk_event *event;
   105		int res;
   106		long rss_in_pages = -1;
   107		struct mm_struct *mm = get_task_mm(selected);
   108	
   109		if (mm) {
   110			rss_in_pages = get_mm_rss(mm);
   111			mmput(mm);
   112		}
   113	
   114		spin_lock(&lmk_event_lock);
   115	
   116		head = event_buffer.head;
   117		tail = READ_ONCE(event_buffer.tail);
   118	
   119		/* Do not continue to log if no space remains in the buffer. */
   120		if (CIRC_SPACE(head, tail, MAX_BUFFERED_EVENTS) < 1) {
   121			spin_unlock(&lmk_event_lock);
   122			return;
   123		}
   124	
   125		events = (struct lmk_event *) event_buffer.buf;
   126		event = &events[head];
   127	
   128		res = get_cmdline(selected, event->taskname, MAX_TASKNAME - 1);
   129	
   130		/* No valid process name means this is definitely not associated with a
   131		 * userspace activity.
   132		 */
   133	
   134		if (res <= 0 || res >= MAX_TASKNAME) {
   135			spin_unlock(&lmk_event_lock);
   136			return;
   137		}
   138	
   139		event->taskname[res] = '\0';
   140		event->pid = selected->pid;
   141		event->uid = from_kuid_munged(current_user_ns(), task_uid(selected));
   142		if (selected->group_leader)
   143			event->group_leader_pid = selected->group_leader->pid;
   144		else
   145			event->group_leader_pid = -1;
   146		event->min_flt = selected->min_flt;
   147		event->maj_flt = selected->maj_flt;
   148		event->oom_score_adj = selected->signal->oom_score_adj;
   149		event->start_time = nsec_to_clock_t(selected->real_start_time);
   150		event->rss_in_pages = rss_in_pages;
   151		event->min_score_adj = min_score_adj;
   152	
   153		event_buffer.head = (head + 1) & (MAX_BUFFERED_EVENTS - 1);
   154	
   155		spin_unlock(&lmk_event_lock);
   156	
   157		wake_up_interruptible(&event_wait);
   158	}
   159	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 52113 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-26  5:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  5:17 [android-common:android-4.9-q 1/1] drivers/staging/android/lowmemorykiller.c:99:6: warning: no previous prototype for 'handle_lmk_event' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.