1. 08 11月, 2019 2 次提交
  2. 09 8月, 2019 1 次提交
    • S
      crypto: drivers - Remove dev_err() usage after platform_get_irq() · 514838e9
      Stephen Boyd 提交于
      We don't need dev_err() messages when platform_get_irq() fails now that
      platform_get_irq() prints an error message itself when something goes
      wrong. Let's remove these prints with a simple semantic patch.
      
      // <smpl>
      @@
      expression ret;
      struct platform_device *E;
      @@
      
      ret =
      (
      platform_get_irq(E, ...)
      |
      platform_get_irq_byname(E, ...)
      );
      
      if ( \( ret < 0 \| ret <= 0 \) )
      {
      (
      -if (ret != -EPROBE_DEFER)
      -{ ...
      -dev_err(...);
      -... }
      |
      ...
      -dev_err(...);
      )
      ...
      }
      // </smpl>
      
      While we're here, remove braces on if statements that only have one
      statement (manually).
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: <linux-crypto@vger.kernel.org>
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      514838e9
  3. 04 9月, 2018 1 次提交
  4. 09 7月, 2018 1 次提交
  5. 22 2月, 2018 1 次提交
  6. 03 11月, 2017 2 次提交
  7. 03 8月, 2017 1 次提交
  8. 12 7月, 2017 1 次提交
  9. 15 2月, 2017 2 次提交
  10. 11 2月, 2017 1 次提交
    • A
      crypto: atmel - fix 64-bit build warnings · 4c147bcf
      Arnd Bergmann 提交于
      When we enable COMPILE_TEST building for the Atmel sha and tdes implementations,
      we run into a couple of warnings about incorrect format strings, e.g.
      
      In file included from include/linux/platform_device.h:14:0,
                       from drivers/crypto/atmel-sha.c:24:
      drivers/crypto/atmel-sha.c: In function 'atmel_sha_xmit_cpu':
      drivers/crypto/atmel-sha.c:571:19: error: format '%d' expects argument of type 'int', but argument 6 has type 'size_t {aka long unsigned int}' [-Werror=format=]
      In file included from include/linux/printk.h:6:0,
                       from include/linux/kernel.h:13,
                       from drivers/crypto/atmel-tdes.c:17:
      drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_dma_stop':
      include/linux/kern_levels.h:4:18: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Werror=format=]
      
      These are all fixed by using the "%z" modifier for size_t data.
      
      There are also a few uses of min()/max() with incompatible types:
      
      drivers/crypto/atmel-tdes.c: In function 'atmel_tdes_crypt_start':
      drivers/crypto/atmel-tdes.c:528:181: error: comparison of distinct pointer types lacks a cast [-Werror]
      
      Where possible, we should use consistent types here, otherwise we can use
      min_t()/max_t() to get well-defined behavior without a warning.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4c147bcf
  11. 03 2月, 2017 10 次提交
  12. 11 3月, 2016 1 次提交
  13. 17 2月, 2016 2 次提交
  14. 06 2月, 2016 2 次提交
  15. 30 1月, 2016 1 次提交
  16. 25 1月, 2016 4 次提交
    • C
      crypto: atmel-sha - fix context switches · 7cee3508
      Cyrille Pitchen 提交于
      This patch saves the value of the internal hash register at the end of an
      'update' operation then restores this value before starting the next
      'update'. This way the driver can now properly handle context switches.
      
      WARNING: only hardware versions from sama5d4x and later provide the
      needed interface to update the internal hash value. Especially, sama5d3x
      cannot implement this feature so context switches are still broken.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7cee3508
    • C
      crypto: atmel-sha - add support of sama5d2x SoCs · 507c5cc2
      Cyrille Pitchen 提交于
      This patch adds support of hardware version 5.1.x embedded inside sama5d2x
      SoCs.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      507c5cc2
    • C
      crypto: atmel-sha - fix a race between the 'done' tasklet and the crypto client · f56809c3
      Cyrille Pitchen 提交于
      The 'done' tasklet handler used to check the 'BUSY' flag to either
      finalize the processing of a crypto request which had just completed or
      manage the crypto queue to start the next crypto request.
      
      On request R1 completion, the driver calls atmel_sha_finish_req(), which:
      1 - clears the 'BUSY' flag since the hardware is no longer used and is
          ready again to process new crypto requests.
      2 - notifies the above layer (the client) about the completion of the
          asynchronous crypto request R1 by calling its base.complete()
          callback.
      3 - schedules the 'done' task to check the crypto queue and start to
          process the next crypto request (the 'BUSY' flag is supposed to be
          cleared at that moment) if such a pending request exists.
      
      However step 2 might wake the client up so it can now ask our driver to
      process a new crypto request R2. This request is enqueued by calling the
      atmel_sha_handle_queue() function, which sets the 'BUSY' flags then
      starts to process R2.
      
      If the 'done' tasklet, scheduled by step 3, runs just after, it would see
      that the 'BUSY' flag is set then understand that R2 has just completed,
      which is wrong!
      
      So the state of 'BUSY' flag is not a proper way to detect and handle
      crypto request completion.
      
      This patch fixes this race condition by using two different tasklets, one
      to handle the crypto request completion events, the other to manage the
      crypto queue if needed.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      f56809c3
    • C
      crypto: atmel-sha - fix crash when computing digest on empty message · 1900c583
      Cyrille Pitchen 提交于
      This patch fixes a crash which occured during the computation of the
      digest of an empty message.
      
      Indeed, when processing an empty message, the atmel_sha_handle_queue()
      function was never called, hence the dd->req pointer remained
      uninitialized.
      
      Later, when the atmel_sha_final_req() function was called, it used
      to crash while using this uninitialized dd->req pointer.
      
      Hence this patch adds missing initializations of dd->req before calls of
      the atmel_sha_final_req() function.
      
      This bug prevented us from passing the tcrypt test suite on SHA algo.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1900c583
  17. 17 12月, 2015 1 次提交
  18. 14 10月, 2015 1 次提交
  19. 08 10月, 2015 1 次提交
  20. 08 4月, 2015 4 次提交