linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Jeffrey (Sheng-Hui) Chu" <jeffchu@broadcom.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re:
Date: Mon, 08 Jul 2013 15:04:54 -0700	[thread overview]
Message-ID: <1373321094.9458.9.camel@joe-AO722> (raw)
In-Reply-To: <90AC93A0CCA054488FFC508D6F62B6F40FED489B@IRVEXCHMB07.corp.ad.broadcom.com>

On Mon, 2013-07-08 at 21:52 +0000, Jeffrey (Sheng-Hui) Chu wrote:
[]
> diff --git a/drivers/nfc/bcm2079x/bcm2079x-i2c.c b/drivers/nfc/bcm2079x/bcm2079x-i2c.c
[]
> +/* do not change below */
> +#define MAX_BUFFER_SIZE		780
[]
> +static ssize_t bcm2079x_dev_read(struct file *filp, char __user *buf,
> +					size_t count, loff_t *offset)
> +{
> +	struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
> +	unsigned char tmp[MAX_BUFFER_SIZE];

780 bytes on stack isn't a great idea.

> +static ssize_t bcm2079x_dev_write(struct file *filp, const char __user *buf,
> +					size_t count, loff_t *offset)
> +{
> +	struct bcm2079x_dev *bcm2079x_dev = filp->private_data;
> +	char tmp[MAX_BUFFER_SIZE];

etc.

> +	int ret;
> +
> +	if (count > MAX_BUFFER_SIZE) {
> +		dev_err(&bcm2079x_dev->client->dev, "out of memory\n");

Out of memory isn't really true.
The packet size is just too big for your
little buffer.

> +static int bcm2079x_dev_open(struct inode *inode, struct file *filp)
> +{
> +	int ret = 0;
> +
> +	struct bcm2079x_dev *bcm2079x_dev = container_of(filp->private_data,
> +							struct bcm2079x_dev,
> +							bcm2079x_device);
> +	filp->private_data = bcm2079x_dev;
> +	bcm2079x_init_stat(bcm2079x_dev);
> +	bcm2079x_enable_irq(bcm2079x_dev);
> +	dev_info(&bcm2079x_dev->client->dev,
> +		 "%d,%d\n", imajor(inode), iminor(inode));

Looks to me like this should be dev_dbg not dev_info



  reply	other threads:[~2013-07-08 22:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 21:52 Jeffrey (Sheng-Hui) Chu
2013-07-08 22:04 ` Joe Perches [this message]
2013-07-09 13:22 ` Arend van Spriel
2013-07-10  9:12   ` Re: Samuel Ortiz
  -- strict thread matches above, loose matches on Subject: below --
2016-09-27 16:50 Rajat Jain
2016-09-27 16:57 ` Rajat Jain
     [not found] <CA+yqC4Y2oi4ji-FHuOrXEsxLoYsnckFoX2WYHZwqh5ZGuq7snA@mail.gmail.com>
2015-05-12 15:04 ` Re: Sam Leffler
2015-01-28  7:15 "brcmfmac: brcmf_sdio_htclk: HT Avail timeout" on Thinkpad Tablet 10 Sébastien Bourdeauducq
2015-01-30 14:40 ` Arend van Spriel
2015-09-09 16:55   ` Oleg Kostyuchenko
2013-08-28 11:07 Marc Murphy
2013-08-28 11:23 ` Sedat Dilek
2013-07-28 14:21 piuvatsa
2013-07-28  9:49 ` Tomas Pospisek
2013-04-12  7:08 Callum Hutchinson
2013-04-15 10:30 ` Rafał Miłecki
     [not found] <[PATCH 00/14] mac80211: HT/VHT handling>
2013-02-11 12:38 ` Johannes Berg
2013-02-14 17:40   ` Johannes Berg
2012-02-22  6:50 Vlatka Petričec
2012-02-22 15:28 ` Larry Finger
2012-01-30 19:43 Laurent Bonnans
2012-01-31  5:58 ` Mohammed Shafi
2012-02-01 11:14   ` Re: Mohammed Shafi
2012-02-01 16:27     ` Re: John W. Linville
2012-02-01 17:04       ` Re: Felix Fietkau
2012-02-02  5:37         ` Re: Mohammed Shafi
2012-02-02 12:28           ` Re: Felix Fietkau
2012-02-03 10:12             ` Re: Mohammed Shafi
2012-02-03 14:44             ` Re: Laurent Bonnans
2011-05-01  2:30 Naveen Singh
2011-05-01  9:29 ` Johannes Berg
     [not found] <1273519372-21934-1-git-send-email-lrodriguez@atheros.com>
2010-05-10 19:26 ` Re: Luis R. Rodriguez
2010-03-17 13:13 Vasil Lalov
2010-03-19  6:05 ` reinette chatre
2010-03-19 16:49   ` Re: Vasil Lalov
2010-03-19 17:10     ` Re: reinette chatre
2010-03-19 17:42       ` Re: Vasil Lalov
2010-03-13 16:33 Thijs van der Kraan
2010-03-13 18:44 ` Gábor Stefanik
2009-11-18  1:50 Janakiram Sistla
2009-11-18  2:25 ` Janakiram Sistla
2009-11-18 10:53 ` Re: Johannes Berg
2009-11-18 11:31   ` Re: Janakiram Sistla
2009-11-18 13:44   ` Re: John W. Linville
2009-11-18 14:19     ` Re: Janakiram Sistla
2009-11-18 14:45       ` Re: John W. Linville
     [not found] <E1M5voF-0003wt-00.counter-strike-bk-ru@f144.mail.ru>
2009-05-18 23:14 ` Re: Andrey Yurovsky
2009-05-19 17:14   ` Re: Gábor Stefanik
2009-05-19 18:32     ` Re: Larry Finger
     [not found] <81c556230905061857o52b1ad36v9668c3b7e0da6b76@mail.gmail.com>
2009-05-07 13:03 ` Re: Gábor Stefanik
2009-04-22 18:12 donpetrus
2009-04-22 18:28 ` Michael Buesch
2009-03-18 20:03 David Thornton
2009-03-18 20:04 ` Johannes Berg
2008-09-13 16:10 Edgar Velasco
2008-09-13 19:18 ` Luis R. Rodriguez
     [not found] <5f68ea7b0808030333o620917ddt4508cdf207a8c9fe@mail.gmail.com>
2008-08-03 12:52 ` Re: Stefanik Gábor
2008-07-14 16:18 Bruno Randolf
2008-07-14 16:30 ` Bruno Randolf
2008-03-23 16:43 Adam Turk
2008-03-24  7:35 ` Pavel Roskin
     [not found] <20071223033633.710907923@polimi.it>
2007-12-23  3:39 ` [PATCH 1/7] rc80211-pid: export human-readable target_pf value to debugfs Stefano Brivio
     [not found]   ` <20071223120124.39050@gmx.net>
     [not found]     ` <20071223131135.391cc0bb@morte>
2007-12-23 12:19       ` Mattias Nissler
2007-12-23 12:41         ` Stefano Brivio
2007-03-14 15:32 Larry Finger
2007-03-14 15:37 ` Michael Buesch

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=1373321094.9458.9.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=jeffchu@broadcom.com \
    --cc=linux-wireless@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 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).