From: <VaibhaavRam.TL@microchip.com>
To: <michael@walle.cc>
Cc: <gregkh@linuxfoundation.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <UNGLinuxDriver@microchip.com>,
<arnd@arndb.de>
Subject: Re: [PATCH v9 char-misc-next 1/2] misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs
Date: Mon, 17 Apr 2023 12:47:20 +0000 [thread overview]
Message-ID: <49405ea2bb0bee16a41ce88b7d679ff714823585.camel@microchip.com> (raw)
In-Reply-To: <51847629489852d493af928580c5a2de@walle.cc>
> > +#include <linux/auxiliary_bus.h>
> > +#include <linux/bio.h>
> > +#include <linux/device.h>
> > +#include <linux/iopoll.h>
> > +#include <linux/kthread.h>
>
> Is this needed? I don't see any threads. Also bio.h. Please double
> check
> your includes.
Ok, Will remove in next version of patch
> > + if (priv != NULL)
> > + rb = priv->reg_base;
> > + else
> > + return -ENODEV;
>
> Unneeded check, priv cannot be NULL, right?
Ok, I think this can be removed
> > +
> > + data = readl(rb +
> > MMAP_OTP_OFFSET(OTP_PASS_FAIL_OFFSET));
> > + if (ret < 0 || data & OTP_FAIL_BIT)
> > + break;
>
> No error handling?
We have implemented short read which returns count of successful bytes
read and therefore userspace will recognise the situation when the
requested count is not obtained.
> > + if (!priv)
> > + return dev_err_probe(&aux_dev->dev, -ENOMEM,
> > + "Memory Allocation Failed\n");
>
> Just return -ENOMEM. No need for that message.
Ok. Will remove
Thanks
Vaibhaav Ram
next prev parent reply other threads:[~2023-04-17 12:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230413105318.6070-1-vaibhaavram.tl@microchip.com>
[not found] ` <20230413105318.6070-2-vaibhaavram.tl@microchip.com>
2023-04-13 16:08 ` [PATCH v9 char-misc-next 1/2] misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX OTP via NVMEM sysfs Michael Walle
2023-04-17 12:47 ` VaibhaavRam.TL [this message]
2023-04-18 9:00 ` Michael Walle
2023-04-18 9:18 ` Greg KH
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=49405ea2bb0bee16a41ce88b7d679ff714823585.camel@microchip.com \
--to=vaibhaavram.tl@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).