From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C799CC433F5 for ; Wed, 1 Dec 2021 02:52:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC0FD6B0073; Tue, 30 Nov 2021 21:52:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E6FB76B0074; Tue, 30 Nov 2021 21:52:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D384C6B0075; Tue, 30 Nov 2021 21:52:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id C3E606B0073 for ; Tue, 30 Nov 2021 21:52:20 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7EEB68771D for ; Wed, 1 Dec 2021 02:52:10 +0000 (UTC) X-FDA: 78867701220.14.0CA2006 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 6806AF0000AA for ; Wed, 1 Dec 2021 02:52:09 +0000 (UTC) Received: from mail.kernel.org (unknown [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C1B28B8164C; Wed, 1 Dec 2021 02:52:07 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 04A5F60E08; Wed, 1 Dec 2021 02:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1638327126; bh=d6pItf9g0g/U9MiR/tY+uY45peSEUTHssCUcprwUe9E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GK61Sq3X338sQ93AtlHunBoeJmJxH59U5T742H3GW+rtZ4skq6Q3lnHuttMIw1BbS FDS10+v+OI181oHLFduriQ6m8Ggs5YNKuVlx4xFXfC6KUdNknrZ8n/z2+akYoo5hG/ 9U3P7aFWGY1xZ7N/5yrkxJScNEbuovZVXRv/x6ns= Date: Tue, 30 Nov 2021 18:52:04 -0800 From: Andrew Morton To: kernel test robot Cc: Muchun Song , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 4289/4301] drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a function or function pointer Message-Id: <20211130185204.5f0f95c2c1000e10f51c8f46@linux-foundation.org> In-Reply-To: <202111302247.X1X9fCjn-lkp@intel.com> References: <202111302247.X1X9fCjn-lkp@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 6806AF0000AA X-Stat-Signature: 6g88fscci9uubyybaqcxakwfwx3kmgyu Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=GK61Sq3X; spf=pass (imf11.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1638327129-233494 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 30 Nov 2021 22:42:12 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 34f255a1e91ab44ff8926cf8294ff9144e62e861 > commit: 096d93a8a06292342e48b13021e6c8e097bd9acd [4289/4301] proc: remove PDE_DATA() completely > config: m68k-defconfig (https://download.01.org/0day-ci/archive/20211130/202111302247.X1X9fCjn-lkp@intel.com/config) > compiler: m68k-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=096d93a8a06292342e48b13021e6c8e097bd9acd > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 096d93a8a06292342e48b13021e6c8e097bd9acd > # save the config file to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > drivers/nubus/proc.c: In function 'nubus_proc_rsrc_show': > >> drivers/nubus/proc.c:112:20: error: called object 'pde_data' is not a function or function pointer > 112 | pde_data = pde_data(inode); > | ^~~~~~~~ > drivers/nubus/proc.c:110:37: note: declared here > 110 | struct nubus_proc_pde_data *pde_data; > | ^~~~~~~~ Thanks. I assume this will work. --- a/drivers/nubus/proc.c~proc-remove-pde_data-completely-fix +++ a/drivers/nubus/proc.c @@ -93,30 +93,30 @@ struct nubus_proc_pde_data { static struct nubus_proc_pde_data * nubus_proc_alloc_pde_data(unsigned char *ptr, unsigned int size) { - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pded *pded; - pde_data = kmalloc(sizeof(*pde_data), GFP_KERNEL); - if (!pde_data) + pded = kmalloc(sizeof(*pded), GFP_KERNEL); + if (!pded) return NULL; - pde_data->res_ptr = ptr; - pde_data->res_size = size; - return pde_data; + pded->res_ptr = ptr; + pded->res_size = size; + return pded; } static int nubus_proc_rsrc_show(struct seq_file *m, void *v) { struct inode *inode = m->private; - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pde_data *pded; - pde_data = pde_data(inode); - if (!pde_data) + pded = pde_data(inode); + if (!pded) return 0; - if (pde_data->res_size > m->size) + if (pded->res_size > m->size) return -EFBIG; - if (pde_data->res_size) { + if (pded->res_size) { int lanes = (int)proc_get_parent_data(inode); struct nubus_dirent ent; @@ -124,11 +124,11 @@ static int nubus_proc_rsrc_show(struct s return 0; ent.mask = lanes; - ent.base = pde_data->res_ptr; + ent.base = pded->res_ptr; ent.data = 0; - nubus_seq_write_rsrc_mem(m, &ent, pde_data->res_size); + nubus_seq_write_rsrc_mem(m, &ent, pded->res_size); } else { - unsigned int data = (unsigned int)pde_data->res_ptr; + unsigned int data = (unsigned int)pded->res_ptr; seq_putc(m, data >> 16); seq_putc(m, data >> 8); @@ -142,18 +142,18 @@ void nubus_proc_add_rsrc_mem(struct proc unsigned int size) { char name[9]; - struct nubus_proc_pde_data *pde_data; + struct nubus_proc_pde_data *pded; if (!procdir) return; snprintf(name, sizeof(name), "%x", ent->type); if (size) - pde_data = nubus_proc_alloc_pde_data(nubus_dirptr(ent), size); + pded = nubus_proc_alloc_pde_data(nubus_dirptr(ent), size); else - pde_data = NULL; + pded = NULL; proc_create_single_data(name, S_IFREG | 0444, procdir, - nubus_proc_rsrc_show, pde_data); + nubus_proc_rsrc_show, pded); } void nubus_proc_add_rsrc(struct proc_dir_entry *procdir, _