re: nvmem: Add a simple NVMEM framework for consumers

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

 



Hello Srinivas Kandagatla,

The patch 69aba7948cbe: "nvmem: Add a simple NVMEM framework for
consumers" from Jul 27, 2015, leads to the following static checker
warning:

	drivers/nvmem/core.c:827 __nvmem_cell_read()
	warn: we tested 'cell->bit_offset' before and it was 'false'

drivers/nvmem/core.c
   816  static int __nvmem_cell_read(struct nvmem_device *nvmem,
   817                        struct nvmem_cell *cell,
   818                        void *buf, size_t *len)
   819  {
   820          int rc;
   821  
   822          rc = regmap_raw_read(nvmem->regmap, cell->offset, buf, cell->bytes);
   823  
   824          if (IS_ERR_VALUE(rc))
   825                  return rc;
   826  
   827          /* shift bits in-place */
   828          if (cell->bit_offset || cell->bit_offset)
                    ^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^
Looks like a copy and paste bug.  Maybe something else was intended?

   829                  nvmem_shift_read_buffer_in_place(cell, buf);
   830  
   831          *len = cell->bytes;
   832  
   833          return 0;
   834  }


regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux