1. 18 7月, 2017 20 次提交
  2. 12 7月, 2017 5 次提交
  3. 06 7月, 2017 1 次提交
    • L
      Cavium CNN55XX: fix broken default Kconfig entry · b4b8cbf6
      Linus Torvalds 提交于
      Every developer always thinks that _their_ code is so special and
      magical that it should be enabled by default.
      
      And most of them are completely and utterly wrong.  That's definitely
      the case when you write a specialty driver for a very unsual "security
      processor". It does *not* get to mark itself as "default m".
      
      If you solve world hunger, and make a driver that cures people of
      cancer, by all means enable it by default.  But afaik, the Cavium
      CNN55XX does neither.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4b8cbf6
  4. 28 6月, 2017 1 次提交
    • A
      crypto: qat - avoid an uninitialized variable warning · 72eed063
      Arnd Bergmann 提交于
      After commit 9e442aa6a753 ("x86: remove DMA_ERROR_CODE"), the inlining
      decisions in the qat driver changed slightly, introducing a new false-positive
      warning:
      
      drivers/crypto/qat/qat_common/qat_algs.c: In function 'qat_alg_sgl_to_bufl.isra.6':
      include/linux/dma-mapping.h:228:2: error: 'sz_out' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/crypto/qat/qat_common/qat_algs.c:676:9: note: 'sz_out' was declared here
      
      The patch that introduced this is correct, so let's just avoid the
      warning in this driver by rearranging the unwinding after an error
      to make it more obvious to the compiler what is going on.
      
      The problem here is the 'if (unlikely(dma_mapping_error(dev, blp)))'
      check, in which the 'unlikely' causes gcc to forget what it knew about
      the state of the variables. Cleaning up the dma state in the reverse
      order it was created means we can simplify the logic so it doesn't have
      to know about that state, and also makes it easier to understand.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      72eed063
  5. 22 6月, 2017 4 次提交
  6. 21 6月, 2017 1 次提交
    • Y
      net: introduce __skb_put_[zero, data, u8] · de77b966
      yuan linyu 提交于
      follow Johannes Berg, semantic patch file as below,
      @@
      identifier p, p2;
      expression len;
      expression skb;
      type t, t2;
      @@
      (
      -p = __skb_put(skb, len);
      +p = __skb_put_zero(skb, len);
      |
      -p = (t)__skb_put(skb, len);
      +p = __skb_put_zero(skb, len);
      )
      ... when != p
      (
      p2 = (t2)p;
      -memset(p2, 0, len);
      |
      -memset(p, 0, len);
      )
      
      @@
      identifier p;
      expression len;
      expression skb;
      type t;
      @@
      (
      -t p = __skb_put(skb, len);
      +t p = __skb_put_zero(skb, len);
      )
      ... when != p
      (
      -memset(p, 0, len);
      )
      
      @@
      type t, t2;
      identifier p, p2;
      expression skb;
      @@
      t *p;
      ...
      (
      -p = __skb_put(skb, sizeof(t));
      +p = __skb_put_zero(skb, sizeof(t));
      |
      -p = (t *)__skb_put(skb, sizeof(t));
      +p = __skb_put_zero(skb, sizeof(t));
      )
      ... when != p
      (
      p2 = (t2)p;
      -memset(p2, 0, sizeof(*p));
      |
      -memset(p, 0, sizeof(*p));
      )
      
      @@
      expression skb, len;
      @@
      -memset(__skb_put(skb, len), 0, len);
      +__skb_put_zero(skb, len);
      
      @@
      expression skb, len, data;
      @@
      -memcpy(__skb_put(skb, len), data, len);
      +__skb_put_data(skb, data, len);
      
      @@
      expression SKB, C, S;
      typedef u8;
      identifier fn = {__skb_put};
      fresh identifier fn2 = fn ## "_u8";
      @@
      - *(u8 *)fn(SKB, S) = C;
      + fn2(SKB, C);
      Signed-off-by: Nyuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de77b966
  7. 20 6月, 2017 8 次提交