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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF933C43334 for ; Mon, 4 Jul 2022 21:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbiGDVmC (ORCPT ); Mon, 4 Jul 2022 17:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiGDVmB (ORCPT ); Mon, 4 Jul 2022 17:42:01 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BC411839 for ; Mon, 4 Jul 2022 14:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656970919; x=1688506919; h=date:from:to:cc:subject:message-id:mime-version; bh=JzaiGJlYvRB9YrRFCBR4/35DkWYKdAjVJnyRksjUHWo=; b=jdTJ0anHTX7WTAIGwK7JyqvbnwGQ7WJx/6Iv9+zcDoP4YDWw7dJCrXDy XA1bBlU1V2QeFDNjjDc98E+FE22v3iolXPDs7HmpdN6zBN8Tjwk9Skswa eCE2obU2VnSbCKJXn0x0nuyuKFGd4q8AjCMOxDeh6fB8gS6hOaJP3NUrl ZmfirmxvMmNb6KV3LXo3R0dP8fTXY+59KJY5MdyzmxeYILvYWOkqycyWZ gzQaE6Mb1h81i0V269B4BtSm9A4v7QIIfZIEgal6anRJYZ+zHN8t15yBm 1JW2xhl+mlW54pA2EYzWFqbExMT9C+Yim1tm3gEXm1u9zABS6sDHIhEy6 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10398"; a="347180000" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="347180000" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 14:41:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="619513980" Received: from lkp-server01.sh.intel.com (HELO 68b931ab7ac1) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 04 Jul 2022 14:41:57 -0700 Received: from kbuild by 68b931ab7ac1 with local (Exim 4.95) (envelope-from ) id 1o8TpN-000IIZ-3D; Mon, 04 Jul 2022 21:41:57 +0000 Date: Tue, 5 Jul 2022 05:41:28 +0800 From: kernel test robot To: Mark Brown Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-spi@vger.kernel.org Subject: [broonie-spi:for-5.20 34/44] drivers/spi/spi-mpc52xx-psc.c:195:5: warning: no previous prototype for function 'mpc52xx_psc_spi_transfer_one_message' Message-ID: <202207050555.JToSMyCZ-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.20 head: acfc34f008c3e66bbcb7b9162c80c8327b6e800f commit: 145cfc3840e5931a789a8e2e76af841ab4cad44b [34/44] spi: mpc52xx-psc: Switch to using core message queue config: powerpc-mpc5200_defconfig (https://download.01.org/0day-ci/archive/20220705/202207050555.JToSMyCZ-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project f7a80c3d08d4821e621fc88d6a2e435291f82dff) 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 # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=145cfc3840e5931a789a8e2e76af841ab4cad44b git remote add broonie-spi https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git git fetch --no-tags broonie-spi for-5.20 git checkout 145cfc3840e5931a789a8e2e76af841ab4cad44b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/spi/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): __do_insb ^ arch/powerpc/include/asm/io.h:578:56: note: expanded from macro '__do_insb' #define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/spi/spi-mpc52xx-psc.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:641: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :117:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:579:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/spi/spi-mpc52xx-psc.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:641: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :119:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:580:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/spi/spi-mpc52xx-psc.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:641: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :121:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:581:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/spi/spi-mpc52xx-psc.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:641: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :123:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:582:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/spi/spi-mpc52xx-psc.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:641: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ :125:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:583:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ >> drivers/spi/spi-mpc52xx-psc.c:195:5: warning: no previous prototype for function 'mpc52xx_psc_spi_transfer_one_message' [-Wmissing-prototypes] int mpc52xx_psc_spi_transfer_one_message(struct spi_controller *ctlr, ^ drivers/spi/spi-mpc52xx-psc.c:195:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int mpc52xx_psc_spi_transfer_one_message(struct spi_controller *ctlr, ^ static 7 warnings generated. vim +/mpc52xx_psc_spi_transfer_one_message +195 drivers/spi/spi-mpc52xx-psc.c 194 > 195 int mpc52xx_psc_spi_transfer_one_message(struct spi_controller *ctlr, 196 struct spi_message *m) 197 { 198 struct spi_device *spi; 199 struct spi_transfer *t = NULL; 200 unsigned cs_change; 201 int status; 202 203 spi = m->spi; 204 cs_change = 1; 205 status = 0; 206 list_for_each_entry (t, &m->transfers, transfer_list) { 207 if (t->bits_per_word || t->speed_hz) { 208 status = mpc52xx_psc_spi_transfer_setup(spi, t); 209 if (status < 0) 210 break; 211 } 212 213 if (cs_change) 214 mpc52xx_psc_spi_activate_cs(spi); 215 cs_change = t->cs_change; 216 217 status = mpc52xx_psc_spi_transfer_rxtx(spi, t); 218 if (status) 219 break; 220 m->actual_length += t->len; 221 222 spi_transfer_delay_exec(t); 223 224 if (cs_change) 225 mpc52xx_psc_spi_deactivate_cs(spi); 226 } 227 228 m->status = status; 229 if (status || !cs_change) 230 mpc52xx_psc_spi_deactivate_cs(spi); 231 232 mpc52xx_psc_spi_transfer_setup(spi, NULL); 233 234 spi_finalize_current_message(ctlr); 235 236 return 0; 237 } 238 -- 0-DAY CI Kernel Test Service https://01.org/lkp