Re: [Crypto v4 12/12] Makefile Kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Atul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[cannot apply to net/master net-next/master v4.16-rc1 next-20180214]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Atul-Gupta/Chelsio-Inline-TLS/20180215-072600
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_rx_ack':
>> drivers/crypto/chelsio/chtls/chtls_cm.c:1979:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
       if (csk->wr_nondata)
       ^~
   drivers/crypto/chelsio/chtls/chtls_cm.c:1981:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
        break;
        ^~~~~

vim +/if +1979 drivers/crypto/chelsio/chtls/chtls_cm.c

763a7f5f Atul Gupta 2018-02-12  1961  
763a7f5f Atul Gupta 2018-02-12  1962  static void chtls_rx_ack(struct sock *sk, struct sk_buff *skb)
763a7f5f Atul Gupta 2018-02-12  1963  {
763a7f5f Atul Gupta 2018-02-12  1964  	struct cpl_fw4_ack *hdr = cplhdr(skb) + RSS_HDR;
763a7f5f Atul Gupta 2018-02-12  1965  	struct chtls_sock *csk = sk->sk_user_data;
763a7f5f Atul Gupta 2018-02-12  1966  	struct tcp_sock *tp = tcp_sk(sk);
763a7f5f Atul Gupta 2018-02-12  1967  	u32 snd_una = ntohl(hdr->snd_una);
763a7f5f Atul Gupta 2018-02-12  1968  	u8 credits = hdr->credits;
763a7f5f Atul Gupta 2018-02-12  1969  
763a7f5f Atul Gupta 2018-02-12  1970  	csk->wr_credits += credits;
763a7f5f Atul Gupta 2018-02-12  1971  
763a7f5f Atul Gupta 2018-02-12  1972  	if (csk->wr_unacked > csk->wr_max_credits - csk->wr_credits)
763a7f5f Atul Gupta 2018-02-12  1973  		csk->wr_unacked = csk->wr_max_credits - csk->wr_credits;
763a7f5f Atul Gupta 2018-02-12  1974  
763a7f5f Atul Gupta 2018-02-12  1975  	while (credits) {
763a7f5f Atul Gupta 2018-02-12  1976  		struct sk_buff *pskb = csk->wr_skb_head;
763a7f5f Atul Gupta 2018-02-12  1977  
763a7f5f Atul Gupta 2018-02-12  1978  		if (unlikely(!pskb)) {
763a7f5f Atul Gupta 2018-02-12 @1979  			if (csk->wr_nondata)
763a7f5f Atul Gupta 2018-02-12  1980  				csk->wr_nondata -= credits;
763a7f5f Atul Gupta 2018-02-12  1981  				break;
763a7f5f Atul Gupta 2018-02-12  1982  		}
763a7f5f Atul Gupta 2018-02-12  1983  		if (unlikely(credits < pskb->csum)) {
763a7f5f Atul Gupta 2018-02-12  1984  			pskb->csum -= credits;
763a7f5f Atul Gupta 2018-02-12  1985  			break;
763a7f5f Atul Gupta 2018-02-12  1986  		}
763a7f5f Atul Gupta 2018-02-12  1987  		dequeue_wr(sk);
763a7f5f Atul Gupta 2018-02-12  1988  		credits -= pskb->csum;
763a7f5f Atul Gupta 2018-02-12  1989  		kfree_skb(pskb);
763a7f5f Atul Gupta 2018-02-12  1990  	}
763a7f5f Atul Gupta 2018-02-12  1991  	if (hdr->seq_vld & CPL_FW4_ACK_FLAGS_SEQVAL) {
763a7f5f Atul Gupta 2018-02-12  1992  		if (unlikely(before(snd_una, tp->snd_una))) {
763a7f5f Atul Gupta 2018-02-12  1993  			kfree_skb(skb);
763a7f5f Atul Gupta 2018-02-12  1994  			return;
763a7f5f Atul Gupta 2018-02-12  1995  		}
763a7f5f Atul Gupta 2018-02-12  1996  
763a7f5f Atul Gupta 2018-02-12  1997  		if (tp->snd_una != snd_una) {
763a7f5f Atul Gupta 2018-02-12  1998  			tp->snd_una = snd_una;
763a7f5f Atul Gupta 2018-02-12  1999  			dst_confirm(sk->sk_dst_cache);
763a7f5f Atul Gupta 2018-02-12  2000  			tp->rcv_tstamp = tcp_time_stamp(tp);
763a7f5f Atul Gupta 2018-02-12  2001  			if (tp->snd_una == tp->snd_nxt &&
763a7f5f Atul Gupta 2018-02-12  2002  			    !csk_flag_nochk(csk, CSK_TX_FAILOVER))
763a7f5f Atul Gupta 2018-02-12  2003  				csk_reset_flag(csk, CSK_TX_WAIT_IDLE);
763a7f5f Atul Gupta 2018-02-12  2004  		}
763a7f5f Atul Gupta 2018-02-12  2005  	}
763a7f5f Atul Gupta 2018-02-12  2006  
763a7f5f Atul Gupta 2018-02-12  2007  	if (hdr->seq_vld & CPL_FW4_ACK_FLAGS_CH) {
763a7f5f Atul Gupta 2018-02-12  2008  		unsigned int fclen16 = roundup(failover_flowc_wr_len, 16);
763a7f5f Atul Gupta 2018-02-12  2009  
763a7f5f Atul Gupta 2018-02-12  2010  		csk->wr_credits -= fclen16;
763a7f5f Atul Gupta 2018-02-12  2011  		csk_reset_flag(csk, CSK_TX_WAIT_IDLE);
763a7f5f Atul Gupta 2018-02-12  2012  		csk_reset_flag(csk, CSK_TX_FAILOVER);
763a7f5f Atul Gupta 2018-02-12  2013  	}
763a7f5f Atul Gupta 2018-02-12  2014  	if (skb_queue_len(&csk->txq) && chtls_push_frames(csk, 0))
763a7f5f Atul Gupta 2018-02-12  2015  		sk->sk_write_space(sk);
763a7f5f Atul Gupta 2018-02-12  2016  
763a7f5f Atul Gupta 2018-02-12  2017  	kfree_skb(skb);
763a7f5f Atul Gupta 2018-02-12  2018  }
763a7f5f Atul Gupta 2018-02-12  2019  

:::::: The code at line 1979 was first introduced by commit
:::::: 763a7f5f41026de851ce850ee22e2f6c29fcdf50 chtls: CPL handler definition

:::::: TO: Atul Gupta <atul.gupta@xxxxxxxxxxx>
:::::: CC: 0day robot <fengguang.wu@xxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux