From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Stephen Neuendorffer" <stephen.neuendorffer@xilinx.com>
Cc: linuxppc-dev@ozlabs.org, git-dev@xilinx.com, jirislaby@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Xilinx: hwicap: cleanup
Date: Sat, 23 Feb 2008 23:20:00 -0700 [thread overview]
Message-ID: <fa686aa40802232220m175cfd86w1f85e46473371539@mail.gmail.com> (raw)
In-Reply-To: <fa686aa40802232216s47b7751bi384352697dbf4ce2@mail.gmail.com>
Stephen, when you address these comments, please double check the lkml
address. It was misspelled when you sent this patch.
Cheers,
g.
On Sat, Feb 23, 2008 at 11:16 PM, Grant Likely
<grant.likely@secretlab.ca> wrote:
> On Mon, Feb 11, 2008 at 11:24 AM, Stephen Neuendorffer
> <stephen.neuendorffer@xilinx.com> wrote:
> > Fix some missing __user tags and incorrect section tags.
> > Convert semaphores to mutexes.
> > Make probed_devices re-entrancy and error condition safe.
> > Fix some backwards memcpys.
> > Some other minor cleanups.
> > Use kerneldoc format.
> >
> > Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
>
> Thanks Steven, some more comments below.
^^^^^^
Oops, sorry about the spelling.
g.
>
>
> >
> > ---
> >
> > Grant, Since it appears that the driver will stay in as-is, here are
> > the updates against mainline, based on Jiri's comments.
> > ---
> > drivers/char/xilinx_hwicap/buffer_icap.c | 80 ++++++++++----------
> > drivers/char/xilinx_hwicap/fifo_icap.c | 60 +++++++-------
> > drivers/char/xilinx_hwicap/xilinx_hwicap.c | 113 ++++++++++++++++------------
> > drivers/char/xilinx_hwicap/xilinx_hwicap.h | 24 +++---
> > 4 files changed, 148 insertions(+), 129 deletions(-)
> >
> > diff --git a/drivers/char/xilinx_hwicap/buffer_icap.c b/drivers/char/xilinx_hwicap/buffer_icap.c
> > index dfea2bd..2c5d17d 100644
> > --- a/drivers/char/xilinx_hwicap/buffer_icap.c
> > +++ b/drivers/char/xilinx_hwicap/buffer_icap.c
>
> > @@ -148,9 +148,9 @@ static inline void buffer_icap_set_size(void __iomem *base_address,
> > }
> >
> > /**
> > - * buffer_icap_mSetoffsetReg: Set the bram offset register.
> > - * @parameter base_address: contains the base address of the device.
> > - * @parameter data: is the value to be written to the data register.
> > + * buffer_icap_mSetoffsetReg - Set the bram offset register.
>
> This is the only function that is still in camel case; it should
> probably be changed also... In fact, this functions doesn't seem to be
> used at all. Can it just be removed? Are there any other unused
> functions in this driver?
>
>
> > diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> > index 24f6aef..eddaa26 100644
> > --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
> > +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
>
> > @@ -344,7 +345,7 @@ int hwicap_initialize_hwicap(struct hwicap_drvdata *drvdata)
> > }
> >
> > static ssize_t
> > -hwicap_read(struct file *file, char *buf, size_t count, loff_t *ppos)
> > +hwicap_read(struct file *file, __user char *buf, size_t count, loff_t *ppos)
>
> This looks like it should be 'char __user *buf' instead of '__user char *buf'.
>
>
> > {
> > struct hwicap_drvdata *drvdata = file->private_data;
> > ssize_t bytes_to_read = 0;
>
> > static ssize_t
> > -hwicap_write(struct file *file, const char *buf,
> > +hwicap_write(struct file *file, const __user char *buf,
> > size_t count, loff_t *ppos)
>
> Ditto on placement of __user
>
>
> > @@ -549,8 +556,7 @@ static int hwicap_release(struct inode *inode, struct file *file)
> > int i;
> > int status = 0;
> >
> > - if (down_interruptible(&drvdata->sem))
> > - return -ERESTARTSYS;
> > + mutex_lock(&drvdata->sem);
>
> Why not mutex_lock_interruptible()? (goes for all cases of mutex_lock())
>
> Cheers,
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-02-24 6:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1202437061-12691-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-02-11 18:24 ` [PATCH] Xilinx: hwicap: cleanup Stephen Neuendorffer
2008-02-24 6:16 ` Grant Likely
2008-02-24 6:20 ` Grant Likely [this message]
2008-02-24 23:21 ` Stephen Neuendorffer
2008-02-24 23:34 ` [PATCH] [POWERPC] [v2] " Stephen Neuendorffer
2008-02-27 18:20 ` Grant Likely
2008-02-25 8:16 ` [PATCH] " Jiri Slaby
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=fa686aa40802232220m175cfd86w1f85e46473371539@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=git-dev@xilinx.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=stephen.neuendorffer@xilinx.com \
/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).