All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: kbuild-all@lists.01.org, netdev@vger.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'
Date: Thu, 28 Apr 2022 14:54:30 +0800	[thread overview]
Message-ID: <202204281438.dM82P8DP-lkp@intel.com> (raw)

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@intel.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

                 reply	other threads:[~2022-04-28  6:55 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 \
    --in-reply-to=202204281438.dM82P8DP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kbuild-all@lists.01.org \
    --cc=netdev@vger.kernel.org \
    /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 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.