All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartmann <greg@kroah.com>,
	Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Samuel Ortiz <sameo@linux.intel.com>
Subject: [PATCH 5/6] pcmcia/ds: prepare for FIRMWARE_NAME_MAX removal
Date: Tue, 26 May 2009 19:40:17 +0200	[thread overview]
Message-ID: <20090526174219.161131129@linux.intel.com> (raw)
In-Reply-To: 20090526174012.423883376@linux.intel.com

[-- Attachment #1: firmware-ds.patch --]
[-- Type: text/plain, Size: 1593 bytes --]

From: Samuel Ortiz <sameo@linux.intel.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>

We're going to remove the FIRMWARE_NAME_MAX definition in order to avoid any
firmware name length restriction.
With the FIRMWARE_NAME_MAX removal, the ds.c reference becomes useless as we
dont need to check for the firmware name length anymore.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

---
 drivers/pcmcia/ds.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Index: iwm-2.6/drivers/pcmcia/ds.c
===================================================================
--- iwm-2.6.orig/drivers/pcmcia/ds.c	2009-05-26 17:32:21.000000000 +0200
+++ iwm-2.6/drivers/pcmcia/ds.c	2009-05-26 17:33:07.000000000 +0200
@@ -828,7 +828,6 @@ static int pcmcia_load_firmware(struct p
 {
 	struct pcmcia_socket *s = dev->socket;
 	const struct firmware *fw;
-	char path[FIRMWARE_NAME_MAX];
 	int ret = -ENOMEM;
 	int no_funcs;
 	int old_funcs;
@@ -839,16 +838,7 @@ static int pcmcia_load_firmware(struct p
 
 	ds_dev_dbg(1, &dev->dev, "trying to load CIS file %s\n", filename);
 
-	if (strlen(filename) > (FIRMWARE_NAME_MAX - 1)) {
-		dev_printk(KERN_WARNING, &dev->dev,
-			   "pcmcia: CIS filename is too long [%s]\n",
-			   filename);
-		return -EINVAL;
-	}
-
-	snprintf(path, sizeof(path), "%s", filename);
-
-	if (request_firmware(&fw, path, &dev->dev) == 0) {
+	if (request_firmware(&fw, filename, &dev->dev) == 0) {
 		if (fw->size >= CISTPL_MAX_CIS_SIZE) {
 			ret = -EINVAL;
 			dev_printk(KERN_ERR, &dev->dev,

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

  parent reply	other threads:[~2009-05-26 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 17:40 [PATCH 0/6] firmware: dynamic firmware id allocation Samuel Ortiz
2009-05-26 17:40 ` [PATCH 1/6] firmware: allocate firmware id dynamically Samuel Ortiz
2009-05-26 17:40 ` [PATCH 2/6] atm/ueagle-atm: prepare for FIRMWARE_NAME_MAX removal Samuel Ortiz
2009-05-26 17:40 ` [PATCH 3/6] tuners/xc2028: " Samuel Ortiz
2009-05-26 17:40 ` [PATCH 4/6] dvb/dvb-usb: " Samuel Ortiz
2009-05-26 18:32   ` Michael Krufky
2009-05-26 18:42     ` Samuel Ortiz
2009-05-26 18:44       ` Michael Krufky
2009-05-26 17:40 ` Samuel Ortiz [this message]
2009-05-26 17:40 ` [PATCH 6/6] firmware: " Samuel Ortiz
2009-05-26 19:04 ` [PATCH 0/6] firmware: dynamic firmware id allocation John W. Linville

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=20090526174219.161131129@linux.intel.com \
    --to=sameo@linux.intel.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    /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.