From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: nvmem: Add a simple NVMEM framework for consumers
Date: Fri, 14 Aug 2015 09:56:52 +0000 [thread overview]
Message-ID: <20150814095652.GB14436@mwanda> (raw)
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
next reply other threads:[~2015-08-14 9:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 9:56 Dan Carpenter [this message]
2015-08-14 10:06 ` nvmem: Add a simple NVMEM framework for consumers Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150814095652.GB14436@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.