lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204281438.dM82P8DP-lkp@intel.com>
Date:   Thu, 28 Apr 2022 14:54:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: [net-next:master 13/22]
 drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c:342:23: error: implicit
 declaration of function 'ptp_find_pin_unlocked'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   50c6afabfd2ae91a4ff0e2feb14fe702b0688ec5
commit: f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8 [13/22] net: lan966x: Add support for PTP_PF_EXTTS
config: microblaze-randconfig-r011-20220428 (https://download.01.org/0day-ci/archive/20220428/202204281438.dM82P8DP-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.3.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/davem/net-next.git/commit/?id=f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8
        git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
        git fetch --no-tags net-next master
        git checkout f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/net/ethernet/microchip/lan966x/

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

All errors (new ones prefixed by >>):

   drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c: In function 'lan966x_ptp_ext_irq_handler':
>> drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c:342:23: error: implicit declaration of function 'ptp_find_pin_unlocked' [-Werror=implicit-function-declaration]
     342 |                 pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0);
         |                       ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/ptp_find_pin_unlocked +342 drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c

   323	
   324	irqreturn_t lan966x_ptp_ext_irq_handler(int irq, void *args)
   325	{
   326		struct lan966x *lan966x = args;
   327		struct lan966x_phc *phc;
   328		unsigned long flags;
   329		u64 time = 0;
   330		time64_t s;
   331		int pin, i;
   332		s64 ns;
   333	
   334		if (!(lan_rd(lan966x, PTP_PIN_INTR)))
   335			return IRQ_NONE;
   336	
   337		/* Go through all domains and see which pin generated the interrupt */
   338		for (i = 0; i < LAN966X_PHC_COUNT; ++i) {
   339			struct ptp_clock_event ptp_event = {0};
   340	
   341			phc = &lan966x->phc[i];
 > 342			pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0);
   343			if (pin == -1)
   344				continue;
   345	
   346			if (!(lan_rd(lan966x, PTP_PIN_INTR) & BIT(pin)))
   347				continue;
   348	
   349			spin_lock_irqsave(&lan966x->ptp_clock_lock, flags);
   350	
   351			/* Enable to get the new interrupt.
   352			 * By writing 1 it clears the bit
   353			 */
   354			lan_wr(BIT(pin), lan966x, PTP_PIN_INTR);
   355	
   356			/* Get current time */
   357			s = lan_rd(lan966x, PTP_TOD_SEC_MSB(pin));
   358			s <<= 32;
   359			s |= lan_rd(lan966x, PTP_TOD_SEC_LSB(pin));
   360			ns = lan_rd(lan966x, PTP_TOD_NSEC(pin));
   361			ns &= PTP_TOD_NSEC_TOD_NSEC;
   362	
   363			spin_unlock_irqrestore(&lan966x->ptp_clock_lock, flags);
   364	
   365			if ((ns & 0xFFFFFFF0) == 0x3FFFFFF0) {
   366				s--;
   367				ns &= 0xf;
   368				ns += 999999984;
   369			}
   370			time = ktime_set(s, ns);
   371	
   372			ptp_event.index = pin;
   373			ptp_event.timestamp = time;
   374			ptp_event.type = PTP_CLOCK_EXTTS;
   375			ptp_clock_event(phc->clock, &ptp_event);
   376		}
   377	
   378		return IRQ_HANDLED;
   379	}
   380	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ