All of lore.kernel.org
 help / color / mirror / Atom feed
* [ti:ti-linux-5.4.y 1/1] net/hsr/hsr_forward.c:244:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute
@ 2020-10-10  7:07 kernel test robot
  2020-10-12 11:42 ` Dan Murphy
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-10-10  7:07 UTC (permalink / raw)
  To: kbuild-all

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

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head:   f85baf8e2e6374594eb76d4c14ada9d62a2fa98b
commit: f85baf8e2e6374594eb76d4c14ada9d62a2fa98b [1/1] Merge tag 'v5.4.69' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-5.4.y
config: x86_64-randconfig-a005-20201010 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9b5b3050237db3642ed7ab1bdb3ffa2202511b99)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
        git fetch --no-tags ti ti-linux-5.4.y
        git checkout f85baf8e2e6374594eb76d4c14ada9d62a2fa98b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

>> net/hsr/hsr_forward.c:244:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
                   skb_put_padto(skb, VLAN_ETH_ZLEN);
                   ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
   net/hsr/hsr_forward.c:246:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
                   skb_put_padto(skb, ETH_ZLEN);
                   ^~~~~~~~~~~~~ ~~~~~~~~~~~~~
   net/hsr/hsr_forward.c:279:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
           skb_put_padto(skb, ETH_ZLEN + HSR_HLEN);
           ^~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
   3 warnings generated.

vim +/warn_unused_result +244 net/hsr/hsr_forward.c

cec32b3c120970 Murali Karicheri 2020-06-02  232  
cec32b3c120970 Murali Karicheri 2020-06-02  233  /* Tailroom for PRP rct should have been created before calling this */
cec32b3c120970 Murali Karicheri 2020-06-02  234  static void prp_fill_rct(struct sk_buff *skb, struct hsr_frame_info *frame,
cec32b3c120970 Murali Karicheri 2020-06-02  235  			 struct hsr_port *port)
cec32b3c120970 Murali Karicheri 2020-06-02  236  {
cec32b3c120970 Murali Karicheri 2020-06-02  237  	struct prp_rct *trailer;
cec32b3c120970 Murali Karicheri 2020-06-02  238  	int lsdu_size;
cec32b3c120970 Murali Karicheri 2020-06-02  239  
cec32b3c120970 Murali Karicheri 2020-06-02  240  	if (!skb)
cec32b3c120970 Murali Karicheri 2020-06-02  241  		return;
cec32b3c120970 Murali Karicheri 2020-06-02  242  
cec32b3c120970 Murali Karicheri 2020-06-02  243  	if (frame->is_vlan)
cec32b3c120970 Murali Karicheri 2020-06-02 @244  		skb_put_padto(skb, VLAN_ETH_ZLEN);
cec32b3c120970 Murali Karicheri 2020-06-02  245  	else
cec32b3c120970 Murali Karicheri 2020-06-02  246  		skb_put_padto(skb, ETH_ZLEN);
cec32b3c120970 Murali Karicheri 2020-06-02  247  
cec32b3c120970 Murali Karicheri 2020-06-02  248  	trailer = (struct prp_rct *)skb_put(skb, HSR_HLEN);
cec32b3c120970 Murali Karicheri 2020-06-02  249  	lsdu_size = skb->len - 14;
cec32b3c120970 Murali Karicheri 2020-06-02  250  	if (frame->is_vlan)
cec32b3c120970 Murali Karicheri 2020-06-02  251  		lsdu_size -= 4;
cec32b3c120970 Murali Karicheri 2020-06-02  252  	prp_set_lan_id(trailer, port);
cec32b3c120970 Murali Karicheri 2020-06-02  253  	set_prp_LSDU_size(trailer, lsdu_size);
cec32b3c120970 Murali Karicheri 2020-06-02  254  	trailer->sequence_nr = htons(frame->sequence_nr);
cec32b3c120970 Murali Karicheri 2020-06-02  255  	trailer->PRP_suffix = htons(ETH_P_PRP);
cec32b3c120970 Murali Karicheri 2020-06-02  256  }
cec32b3c120970 Murali Karicheri 2020-06-02  257  

:::::: The code at line 244 was first introduced by commit
:::::: cec32b3c120970149886c47f9e5b7e09c73ba020 net: prp: add packet handling support

:::::: TO: Murali Karicheri <m-karicheri2@ti.com>
:::::: CC: Murali Karicheri <m-karicheri2@ti.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28625 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-12 12:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-10  7:07 [ti:ti-linux-5.4.y 1/1] net/hsr/hsr_forward.c:244:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute kernel test robot
2020-10-12 11:42 ` Dan Murphy
2020-10-12 12:08   ` Philip Li
2020-10-12 12:12     ` Philip Li
2020-10-12 12:17       ` Dan Murphy
2020-10-12 12:18         ` Philip Li

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.