1. 20 11月, 2020 1 次提交
  2. 28 9月, 2020 2 次提交
  3. 31 5月, 2020 2 次提交
  4. 11 5月, 2020 6 次提交
  5. 30 3月, 2020 1 次提交
  6. 11 3月, 2020 1 次提交
  7. 21 5月, 2019 1 次提交
  8. 08 4月, 2019 2 次提交
  9. 21 3月, 2019 1 次提交
    • G
      mtd: rawnand: Mark expected switch fall-throughs · 64f1da10
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/mtd/nand/raw/diskonchip.c: In function ‘doc_probe’:
      ./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/mtd/nand/raw/diskonchip.c:1479:4: note: in expansion of macro ‘pr_err’
          pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
          ^~~~~~
      drivers/mtd/nand/raw/diskonchip.c:1480:3: note: here
         default:
         ^~~~~~~
      drivers/mtd/nand/raw/nandsim.c: In function ‘ns_init_module’:
      drivers/mtd/nand/raw/nandsim.c:2254:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
          chip->bbt_options |= NAND_BBT_NO_OOB;
      drivers/mtd/nand/raw/nandsim.c:2255:2: note: here
        case 1:
        ^~~~
      drivers/mtd/nand/raw/nuc900_nand.c: In function ‘nuc900_nand_command_lp’:
      ./arch/x86/include/asm/io.h:91:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       #define __raw_writel __writel
      drivers/mtd/nand/raw/nuc900_nand.c:52:2: note: in expansion of macro ‘__raw_writel’
        __raw_writel((val), (dev)->reg + REG_SMCMD)
        ^~~~~~~~~~~~
      drivers/mtd/nand/raw/nuc900_nand.c:196:3: note: in expansion of macro ‘write_cmd_reg’
         write_cmd_reg(nand, NAND_CMD_READSTART);
         ^~~~~~~~~~~~~
      drivers/mtd/nand/raw/nuc900_nand.c:197:2: note: here
        default:
        ^~~~~~~
      drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_restore’:
      drivers/mtd/nand/raw/omap_elm.c:512:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
          elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            regs->elm_syndrome_fragment_4[i]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/mtd/nand/raw/omap_elm.c:514:3: note: here
         case BCH8_ECC:
         ^~~~
      drivers/mtd/nand/raw/omap_elm.c:517:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
          elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            regs->elm_syndrome_fragment_2[i]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/mtd/nand/raw/omap_elm.c:519:3: note: here
         case BCH4_ECC:
         ^~~~
      drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_save’:
      drivers/mtd/nand/raw/omap_elm.c:466:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
          regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
            ELM_SYNDROME_FRAGMENT_4 + offset);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/mtd/nand/raw/omap_elm.c:468:3: note: here
         case BCH8_ECC:
         ^~~~
      drivers/mtd/nand/raw/omap_elm.c:471:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
          regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
            ELM_SYNDROME_FRAGMENT_2 + offset);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/mtd/nand/raw/omap_elm.c:473:3: note: here
         case BCH4_ECC:
         ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enabling
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      64f1da10
  10. 07 12月, 2018 1 次提交
  11. 03 10月, 2018 18 次提交
  12. 18 7月, 2018 1 次提交
  13. 29 4月, 2018 1 次提交
  14. 25 4月, 2018 2 次提交
    • T
      mtd: rawnand: diskonchip: Allocate rs control per instance · 964dfce9
      Thomas Gleixner 提交于
      The reed solomon library is moving the on stack decoder buffers into the rs
      control structure. That would break the DoC driver because multiple
      instances share the same control structure and can operate in parallel. At
      least in theory....
      
      Instantiate a rs control instance per DoC device to avoid that. The per
      instance buffer is fine as the operation on a single DoC instance is
      serialized by the MTD/NAND core.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Andrew Morton <akpm@linuxfoundation.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Alasdair Kergon <agk@redhat.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      964dfce9
    • T
      rslib: Split rs control struct · 21633981
      Thomas Gleixner 提交于
      The decoder library uses variable length arrays on stack. To get rid of
      them it would be simple to allocate fixed length arrays on stack, but those
      might become rather large. The other solution is to allocate the buffers in
      the rs control structure, but this cannot be done as long as the structure
      can be shared by several users. Sharing is desired because the RS polynom
      tables are large and initialization is time consuming.
      
      To solve this split the codec information out of the control structure and
      have a pointer to a shared codec in it. Instantiate the control structure
      for each user, create a new codec if no shareable is avaiable yet.  Adjust
      all affected usage sites to the new scheme.
      
      This allows to add per instance decoder buffers to the control structure
      later on.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Anton Vorontsov <anton@enomsg.org>
      Cc: Colin Cross <ccross@android.com>
      Cc: Andrew Morton <akpm@linuxfoundation.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Alasdair Kergon <agk@redhat.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      21633981