Skip to contentSkip to conversation

[Fwd: linux-next: scsi build failure]

Fwd: linux-next: scsi build failure James Bottomley 1 participant 1 message Jun 2, 2008

Subsystems (2)
lore
Share & tools
lore

James Bottomley

author maintainer
#0 lore raw

-------- Forwarded Message --------
From: Stephen Rothwell <[email protected]>
To: James Bottomley <[email protected]>
Cc: [email protected], Sathya Prakash <[email protected]>, Kay Sievers <[email protected]>, Greg KH <[email protected]>
Subject: linux-next: scsi build failure
Date: Mon, 2 Jun 2008 15:07:42 +1000

Hi James,

Today's linux-next build (x86_64 allmodconfig) failed like this:

In file included from drivers/message/fusion/mptscsih.c:66:
drivers/message/fusion/mptbase.h:715: error: 'KOBJ_NAME_LEN' undeclared here (not in a function) In file included from drivers/message/fusion/mptbase.c:67:
drivers/message/fusion/mptbase.h:715: error: 'KOBJ_NAME_LEN' undeclared here (not in a function)

This is caused by commit 6146eaf4fb31588ecc72ab3c52c6b1f3e7602a7c ("[SCSI] mpt fusion : Adding FAULT Reset polling work") adding a usage of KOBJ_NAME_LEN while commit 242d02fdc8d1764117a2e5fefd9e57b84d21bf40 ("driver core: remove KOBJ_NAME_LEN define") from the driver-core tree has removed it. The change in that latter commit is to replace all usages with 20, so I applied the following patch. Something like this could be integrated into the former commit.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
Quoted 1 line

From 0975add46554364e3943e56b8e6a4800e38bb9e9 Mon Sep 17 00:00:00 2001

From: Stephen Rothwell <[email protected]>
Date: Mon, 2 Jun 2008 15:06:02 +1000
Subject: [PATCH] scsi: fix fallout from KOBJ_NAME_LEN removal

---
 drivers/message/fusion/mptbase.c |    2 +-
 drivers/message/fusion/mptbase.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/message/fusion/mptbase.c +1 -1
index d18a707..a758110 100644
@@ -1670,7 +1670,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
 	INIT_DELAYED_WORK(&ioc->fault_reset_work, mpt_fault_reset_work);
 	spin_lock_init(&ioc->fault_reset_work_lock);
 
-	snprintf(ioc->reset_work_q_name, KOBJ_NAME_LEN, "mpt_poll_%d", ioc->id);
+	snprintf(ioc->reset_work_q_name, sizeof(ioc->reset_work_q_name), "mpt_poll_%d", ioc->id);
 	ioc->reset_work_q =
 		create_singlethread_workqueue(ioc->reset_work_q_name);
 	if (!ioc->reset_work_q) {
drivers/message/fusion/mptbase.h +1 -1
index 94ab8f1..dff048c 100644
@@ -712,7 +712,7 @@ typedef struct _MPT_ADAPTER
 	struct scsi_cmnd	**ScsiLookup;
 	spinlock_t		  scsi_lookup_lock;
 
-	char			 reset_work_q_name[KOBJ_NAME_LEN];
+	char			 reset_work_q_name[20];
 	struct workqueue_struct *reset_work_q;
 	struct delayed_work	 fault_reset_work;
 	spinlock_t		 fault_reset_work_lock;