All of lore.kernel.org
 help / color / mirror / Atom feed
* [ti:ti-rt-linux-5.10.y 9988/10213] drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set but not used
@ 2021-12-08 12:26 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-08 12:26 UTC (permalink / raw)
  To: kbuild-all

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

Hi Grygorii,

FYI, the error/warning still remains.

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head:   541ec9a6995c3dd881d6f0b63cc714a08ded457d
commit: 0dc2edeb42b305ab613187bef89d11f8b167d551 [9988/10213] net: ti: prueth: hsr: add support for packets timestamping
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211208/202112082000.YPPPOuH4-lkp(a)intel.com/config)
compiler: aarch64-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
        git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
        git fetch --no-tags ti ti-rt-linux-5.10.y
        git checkout 0dc2edeb42b305ab613187bef89d11f8b167d551
        # 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=arm64 SHELL=/bin/bash drivers/net/ethernet/ti/ drivers/remoteproc/

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 >>):

   drivers/net/ethernet/ti/prueth_core.c: In function 'prueth_hsr_ptp_ct_tx_ts_enqueue':
>> drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set but not used [-Wunused-but-set-variable]
    1053 |                 struct skb_shared_hwtstamps *ssh1;
         |                                              ^~~~
   drivers/net/ethernet/ti/prueth_core.c:1066:110: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1066 |                 netdev_warn(other_emac->ndev, "Dropped cut through event waiting for tx ts. %d %x\n", event, (u32)skb);
         |                                                                                                              ^


vim +/ssh1 +1053 drivers/net/ethernet/ti/prueth_core.c

  1018	
  1019	static int prueth_hsr_ptp_ct_tx_ts_enqueue(struct prueth_emac *emac, struct sk_buff *skb, u16 type)
  1020	{
  1021		struct prueth_emac *other_emac = emac->prueth->emac[other_port_id(emac->port_id) - 1];
  1022		struct skb_shared_hwtstamps *red_ssh;
  1023		unsigned long flags;
  1024		u8 ptp_type, event;
  1025		int changed = 0;
  1026		u64 ns;
  1027	
  1028		if (type == ETH_P_8021Q) {
  1029			__skb_pull(skb, VLAN_HLEN);
  1030			changed += VLAN_HLEN;
  1031		}
  1032	
  1033		__skb_pull(skb, ICSS_LRE_TAG_RCT_SIZE);
  1034		changed += ICSS_LRE_TAG_RCT_SIZE;
  1035	
  1036		skb_reset_mac_header(skb);
  1037		event = prueth_ptp_ts_event_type(skb, &ptp_type);
  1038	
  1039		__skb_push(skb, changed);
  1040	
  1041		/* Store skbs for only cut through packets */
  1042		if (event == PRUETH_PTP_TS_EVENTS ||
  1043		    (ptp_type != PTP_MSGTYPE_SYNC &&
  1044		    ptp_type != PTP_MSGTYPE_DELAY_REQ))
  1045			return 0;
  1046	
  1047		/* cut through packet might have already be forwarded before the rx packet has reached
  1048		 * the host. In this case tx irq handler ignores the interrupt as there is no skb stored.
  1049		 * So check if ts is already available before storing the skb.
  1050		 */
  1051		ns = prueth_ptp_ts_get(other_emac, prueth_tx_ts_offs_get(other_emac->port_id - 1, event));
  1052		if (ns || !other_emac->link) {
> 1053			struct skb_shared_hwtstamps *ssh1;
  1054	
  1055			ssh1 = skb_hwtstamps(skb);
  1056			/* Save the cut-through tx ts in skb redinfo. */
  1057			red_ssh = skb_redinfo_hwtstamps(skb);
  1058			memset(red_ssh, 0, sizeof(*red_ssh));
  1059			red_ssh->hwtstamp = ns_to_ktime(ns);
  1060			return 0;
  1061		}
  1062	
  1063		/* Store the skb so that tx irq handler will populate the ts */
  1064		spin_lock_irqsave(&other_emac->ptp_skb_lock, flags);
  1065		if (other_emac->ptp_ct_skb[event]) {
  1066			netdev_warn(other_emac->ndev, "Dropped cut through event waiting for tx ts. %d %x\n", event, (u32)skb);
  1067			dev_consume_skb_any(other_emac->ptp_ct_skb[event]);
  1068			prueth_ptp_tx_ts_reset(other_emac, event);
  1069		}
  1070	
  1071		other_emac->ptp_ct_skb[event] = skb;
  1072		spin_unlock_irqrestore(&other_emac->ptp_skb_lock, flags);
  1073	
  1074		return -EAGAIN;
  1075	}
  1076	

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

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

only message in thread, other threads:[~2021-12-08 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 12:26 [ti:ti-rt-linux-5.10.y 9988/10213] drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set but not used 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.