From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2016694021121761707==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [ti:ti-rt-linux-5.10.y 7978/9956] drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set but not used Date: Tue, 04 Jan 2022 17:49:39 +0800 Message-ID: <202201041758.SchfxR2M-lkp@intel.com> List-Id: --===============2016694021121761707== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 8681404176ca3a84a8ada5135ca4046ef86b06e8 commit: 0dc2edeb42b305ab613187bef89d11f8b167d551 [7978/9956] net: ti: pruet= h: hsr: add support for packets timestamping config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220104/= 202201041758.SchfxR2M-lkp(a)intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darm SHELL=3D/bin/bash drivers/media/platform/ drivers= /net/ethernet/ti/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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; | ^~~~ 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 =3D 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 =3D 0; 1026 u64 ns; 1027 = 1028 if (type =3D=3D ETH_P_8021Q) { 1029 __skb_pull(skb, VLAN_HLEN); 1030 changed +=3D VLAN_HLEN; 1031 } 1032 = 1033 __skb_pull(skb, ICSS_LRE_TAG_RCT_SIZE); 1034 changed +=3D ICSS_LRE_TAG_RCT_SIZE; 1035 = 1036 skb_reset_mac_header(skb); 1037 event =3D 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 =3D=3D PRUETH_PTP_TS_EVENTS || 1043 (ptp_type !=3D PTP_MSGTYPE_SYNC && 1044 ptp_type !=3D 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 t= here is no skb stored. 1049 * So check if ts is already available before storing the skb. 1050 */ 1051 ns =3D prueth_ptp_ts_get(other_emac, prueth_tx_ts_offs_get(other_em= ac->port_id - 1, event)); 1052 if (ns || !other_emac->link) { > 1053 struct skb_shared_hwtstamps *ssh1; 1054 = 1055 ssh1 =3D skb_hwtstamps(skb); 1056 /* Save the cut-through tx ts in skb redinfo. */ 1057 red_ssh =3D skb_redinfo_hwtstamps(skb); 1058 memset(red_ssh, 0, sizeof(*red_ssh)); 1059 red_ssh->hwtstamp =3D 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 f= or 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] =3D 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 --===============2016694021121761707==--