From: Arnd Bergmann <arnd@arndb.de>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: "Greg Kroah-Hartman" <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] staging/ft1000-usb: fix build warnings
Date: Mon, 4 Oct 2010 15:49:20 +0200 [thread overview]
Message-ID: <201010041549.21088.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTi=EFX0SiTOQ-7N=OapO=xkoBR_dFhVMrdDLBs_+@mail.gmail.com>
On Monday 04 October 2010, Belisko Marek wrote:
> > if (qtype) {
> > }
> > @@ -756,6 +762,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
> > if (tempword & FT1000_DB_DPRAM_TX) {
> > DEBUG("FT1000:ft1000_ChIoctl:Doorbell not available\n");
> > result = -ENOTTY;
> > + kfree(dpram_data);
> is shift of kfree() needed or just a typo?
> > break;
> > }
> > }
Indentation in this driver is largely broken (should be using tabs only, but
uses tabs and spaces). I didn't want to add to this, but I guess it doesn't
matter much either way.
You should probably split larger functions into multiple smaller ones where
sensible so you can do a proper reindentation of the whole driver.
> Anyway there is also compilation warning:
> In function ‘copy_from_user’,
> inlined from ‘ft1000_ChIoctl’ at
> drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:709:36:
> /home/open-nandra/kernels/linux-next/arch/x86/include/asm/uaccess_32.h:212:26:
> warning: call to ‘copy_from_user_overflow’ declared with attribute
> warning: copy_from_user() buffer size is not provably correct
>
This warning is compiler dependent, so it didn't show up on my system.
Just make an extra patch for it.
Arnd
next prev parent reply other threads:[~2010-10-04 13:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 8:24 [PATCH 0/6] staging fixes Arnd Bergmann
2010-09-30 8:24 ` [PATCH 1/6] staging: make new character devices nonseekable Arnd Bergmann
2010-09-30 8:24 ` [PATCH 2/6] staging/ft1000-usb: fix unlocked_ioctl prototype Arnd Bergmann
2010-09-30 8:24 ` [PATCH 3/6] staging/ft1000-usb: fix build warnings Arnd Bergmann
2010-10-04 12:43 ` Belisko Marek
2010-10-04 13:49 ` Arnd Bergmann [this message]
2010-09-30 8:24 ` [PATCH 4/6] staging/ft1000-usb: fix problems found by sparse Arnd Bergmann
2010-10-04 13:16 ` Belisko Marek
2010-10-04 13:56 ` Arnd Bergmann
2010-09-30 8:24 ` [PATCH 5/6] staging/bcm: fix most build warnings Arnd Bergmann
2010-09-30 8:24 ` [PATCH 6/6] staging/bcm: add sparse annotations Arnd Bergmann
2010-09-30 8:36 ` [PATCH 0/6] staging fixes Belisko Marek
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=201010041549.21088.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@gmail.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