1. 16 7月, 2021 2 次提交
  2. 11 3月, 2021 1 次提交
  3. 10 3月, 2021 2 次提交
  4. 11 2月, 2021 1 次提交
  5. 13 1月, 2021 3 次提交
  6. 12 1月, 2021 1 次提交
    • P
      spi: cadence-quadspi: Fix build warning on 32-bit platforms · 2ef0170e
      Pratyush Yadav 提交于
      The kernel test robot reports the following warning.
      
      drivers/spi/spi-cadence-quadspi.c:966:24: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (500UL) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                                                  msecs_to_jiffies(max(len, 500UL)))) {
                                                                   ^~~~~~~~~~~~~~~
         include/linux/minmax.h:58:19: note: expanded from macro 'max'
         #define max(x, y)       __careful_cmp(x, y, >)
                                 ^~~~~~~~~~~~~~~~~~~~~~
         include/linux/minmax.h:42:24: note: expanded from macro '__careful_cmp'
                 __builtin_choose_expr(__safe_cmp(x, y), \
                                       ^~~~~~~~~~~~~~~~
         include/linux/minmax.h:32:4: note: expanded from macro '__safe_cmp'
                         (__typecheck(x, y) && __no_side_effects(x, y))
                          ^~~~~~~~~~~~~~~~~
         include/linux/minmax.h:18:28: note: expanded from macro '__typecheck'
                 (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                            ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
         1 warning generated.
      
      This happens because size_t is unsigned long on 64-bit platforms like
      arm64 but it is unsigned int on 32-bit platforms like arm. Omitting the
      "UL" would result in a warning on 64-bit platforms. Squash it by type
      casting the arguments to size_t using max_t(). This way builds on both
      type of platforms can be satisfied. There is no chance of any truncation
      since 500 is small enough to fit into both int and long.
      
      Fixes: f453f293 ("spi: cadence-quadspi: Wait at least 500 ms for direct reads")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NPratyush Yadav <p.yadav@ti.com>
      Link: https://lore.kernel.org/r/20210108181457.30291-1-p.yadav@ti.comSigned-off-by: NMark Brown <broonie@kernel.org>
      2ef0170e
  7. 08 1月, 2021 1 次提交
    • Y
      spi: Fix distinct pointer types warning for ARCH=mips · 8728a81b
      Yanteng Si 提交于
      Fix a new warning report by build for make ARCH=MIPS allmodconfig:
      
      drivers/spi/spi-cadence-quadspi.c: In function 'cqspi_direct_read_execute':
       ./include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast
          18 |  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
             |                            ^~
       ./include/linux/minmax.h:32:4: note: in expansion of macro '__typecheck'
          32 |   (__typecheck(x, y) && __no_side_effects(x, y))
             |    ^~~~~~~~~~~
       ./include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp'
          42 |  __builtin_choose_expr(__safe_cmp(x, y), \
             |                        ^~~~~~~~~~
       ./include/linux/minmax.h:58:19: note: in expansion of macro '__careful_cmp'
          58 | #define max(x, y) __careful_cmp(x, y, >)
             |                   ^~~~~~~~~~~~~
       drivers/spi/spi-cadence-quadspi.c:1153:24: note: in expansion of macro 'max'
        1153 |       msecs_to_jiffies(max(len, 500UL)))) {
             |                        ^~~
      
      "len" is unsigned,however,"500" is unsigned long.
      Signed-off-by: NYanteng Si <siyanteng@loongson.cn>
      Link: https://lore.kernel.org/r/20210107115704.3835282-1-siyanteng@loongson.cnSigned-off-by: NMark Brown <broonie@kernel.org>
      8728a81b
  8. 06 1月, 2021 7 次提交
  9. 17 11月, 2020 1 次提交
  10. 09 9月, 2020 1 次提交
  11. 08 9月, 2020 1 次提交
  12. 26 8月, 2020 1 次提交
  13. 19 6月, 2020 8 次提交
  14. 17 3月, 2020 1 次提交
  15. 15 1月, 2020 1 次提交
  16. 23 10月, 2019 2 次提交
  17. 09 10月, 2019 1 次提交
    • S
      mtd: Remove dev_err() usage after platform_get_irq() · aab478ca
      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: David Woodhouse <dwmw2@infradead.org>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Miquel Raynal <miquel.raynal@bootlin.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Vignesh Raghavendra <vigneshr@ti.com>
      Cc: linux-mtd@lists.infradead.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NStephen Boyd <swboyd@chromium.org>
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      aab478ca
  18. 21 8月, 2019 1 次提交
    • T
      mtd: spi-nor: Fix Cadence QSPI RCU Schedule Stall · 4262ee88
      Thor Thayer 提交于
      The current Cadence QSPI driver sometimes caused a
      "rcu_sched self-detected stall" while writing large files.
      
      Stall Report:
      '# mtd_debug write /dev/mtd1 0 48816464 blob.img
      [ 1815.454227] rcu: INFO: rcu_sched self-detected stall on CPU
      [ 1815.459789] rcu:     0-....: (2099 ticks this GP) idle=8c6/1/0x40000002
       softirq=6492/6492 fqs=935
      [ 1815.468442] rcu:      (t=2100 jiffies g=8749 q=247)
      	<snip> (abbreviated backtrace)
      [ 1815.772086] [<c05a3ea0>] (cqspi_exec_flash_cmd) (cqspi_read_reg)
      [ 1815.786203] [<c05a5488>] (cqspi_read_reg) from (read_sr)
      [ 1815.803790] [<c05a0330>] (read_sr) from
      	(spi_nor_wait_till_ready_with_timeout)
      [ 1815.816610] [<c05a182c>] (spi_nor_wait_till_ready_with_timeout) from
      	(spi_nor_write+0x104/0x1d0)
      [ 1815.836791] [<c05a1a44>] (spi_nor_write) from (part_write+0x50/0x58)
      	<snip>
      [ 1815.997961] cadence-qspi ff809000.spi: Flash command execution timed out.
      [ 1816.004733] error -110 reading SR
      file_to_flash: write, size 0x2e8e150, n 0x2e8e150
      write(): Connection timed out
      
      This was caused by a tight loop in cqspi_wait_for_bit(). Fix by using
      readl_relaxed_poll_timeout() which sleeps 10us while polling a register.
      
      Fit onto 80 character line by truncating the bool clear parameter
      
      Fixes: 14062341 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller")
      Signed-off-by: NThor Thayer <thor.thayer@linux.intel.com>
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      4262ee88
  19. 27 6月, 2019 1 次提交
  20. 31 5月, 2019 1 次提交
  21. 21 2月, 2019 1 次提交
  22. 13 2月, 2019 1 次提交