public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI fixes for 2.6.0-test3
Date: Thu, 21 Aug 2003 10:31:10 -0700	[thread overview]
Message-ID: <10614870701587@kroah.com> (raw)
In-Reply-To: <10614870694188@kroah.com>

ChangeSet 1.1285.1.3, 2003/08/20 16:48:01-07:00, greg@kroah.com

[PATCH] PCI: add PCI_NAME_SIZE instead of using DEVICE_NAME_SIZE

based on a patch from OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


 drivers/pci/names.c |    6 +++---
 include/linux/pci.h |    4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)


diff -Nru a/drivers/pci/names.c b/drivers/pci/names.c
--- a/drivers/pci/names.c	Thu Aug 21 10:21:23 2003
+++ b/drivers/pci/names.c	Thu Aug 21 10:21:23 2003
@@ -80,14 +80,14 @@
 		}
 
 		/* Ok, found the vendor, but unknown device */
-		sprintf(name, "PCI device %04x:%04x (%." DEVICE_NAME_HALF "s)",
+		sprintf(name, "PCI device %04x:%04x (%." PCI_NAME_HALF "s)",
 				dev->vendor, dev->device, vendor_p->name);
 		return;
 
 		/* Full match */
 		match_device: {
-			char *n = name + sprintf(name, "%." DEVICE_NAME_HALF
-					"s %." DEVICE_NAME_HALF "s",
+			char *n = name + sprintf(name, "%." PCI_NAME_HALF
+					"s %." PCI_NAME_HALF "s",
 					vendor_p->name, device_p->name);
 			int nr = device_p->seen + 1;
 			device_p->seen = nr;
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	Thu Aug 21 10:21:23 2003
+++ b/include/linux/pci.h	Thu Aug 21 10:21:23 2003
@@ -420,7 +420,9 @@
 	unsigned int	transparent:1;	/* Transparent PCI bridge */
 	unsigned int	multifunction:1;/* Part of multi-function device */
 #ifdef CONFIG_PCI_NAMES
-	char		pretty_name[DEVICE_NAME_SIZE];	/* pretty name for users to see */
+#define PCI_NAME_SIZE	50
+#define PCI_NAME_HALF	__stringify(20)	/* less than half to handle slop */
+	char		pretty_name[PCI_NAME_SIZE];	/* pretty name for users to see */
 #endif
 };
 


  reply	other threads:[~2003-08-21 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-21 17:29 [BK PATCH] PCI fixes for 2.6.0-test3 Greg KH
2003-08-21 17:31 ` [PATCH] " Greg KH
2003-08-21 17:31   ` Greg KH
2003-08-21 17:31     ` Greg KH
2003-08-21 17:31       ` Greg KH
2003-08-21 17:31         ` Greg KH
2003-08-21 17:31           ` Greg KH [this message]
2003-08-21 17:31             ` Greg KH
2003-08-21 17:31               ` Greg KH
2003-08-21 17:31                 ` 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=10614870701587@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@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