linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: firmware tree build failure
@ 2008-07-22  7:47 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2008-07-22  7:47 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, Jaswinder Singh

Hi Dave,

Today's linux-next build (sparc32 defconfig) failed like this:

drivers/scsi/qlogicpti.c:637: error: implicit declaration of function `release_firwmare'

I applied the following patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

>From da4d0d77ba523128e2996f96b5576fcb8d673b57 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 22 Jul 2008 17:45:13 +1000
Subject: [PATCH] firmware: fix typo in qlogicpti.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/scsi/qlogicpti.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index e829d43..3e71436 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -634,7 +634,7 @@ static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti)
 out:
 	spin_unlock_irqrestore(host->host_lock, flags);
 outfirm:
-	release_firwmare(fw);
+	release_firmware(fw);
 	return err;
 }
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: firmware tree build failure
  2009-04-15  1:56 ` David Woodhouse
@ 2009-04-15  2:03   ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-04-15  2:03 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

Hi Dave,

On Wed, 15 Apr 2009 02:56:41 +0100 David Woodhouse <dwmw2@infradead.org> wrote:
>
> I've updated the firmware tree with the following. Thanks.

Thanks - I have picked that up for today's linux-next.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: firmware tree build failure
  2009-04-14  4:12 Stephen Rothwell
  2009-04-14 12:25 ` David Woodhouse
@ 2009-04-15  1:56 ` David Woodhouse
  2009-04-15  2:03   ` Stephen Rothwell
  1 sibling, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2009-04-15  1:56 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, David S. Miller

On Tue, 2009-04-14 at 14:12 +1000, Stephen Rothwell wrote:
> Today's linux-next build (sparc64 defconfig) failed like this:
> 
> drivers/base/firmware_class.c: In function 'firmware_loading_store':
> drivers/base/firmware_class.c:173: error: 'PAGE_KERNEL_RO' undeclared
> (first use in this function)

I've updated the firmware tree with the following. Thanks.

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 90cb7c2..f19afa8 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -125,6 +125,10 @@ static ssize_t firmware_loading_show(struct device *dev,
 	return sprintf(buf, "%d\n", loading);
 }
 
+/* Some architectures don't have PAGE_KERNEL_RO */
+#ifndef PAGE_KERNEL_RO
+#define PAGE_KERNEL_RO PAGE_KERNEL
+#endif
 /**
  * firmware_loading_store - set value in the 'loading' control file
  * @dev: device pointer
@@ -224,7 +228,7 @@ firmware_data_read(struct kobject *kobj, struct bin_attribute *bin_attr,
 		void *page_data;
 		int page_nr = offset >> PAGE_SHIFT;
 		int page_ofs = offset & (PAGE_SIZE-1);
-		int page_cnt = min(PAGE_SIZE - page_ofs, count);
+		int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
 
 		page_data = kmap(fw_priv->pages[page_nr]);
 
@@ -318,7 +322,7 @@ firmware_data_write(struct kobject *kobj, struct bin_attribute *bin_attr,
 		void *page_data;
 		int page_nr = offset >> PAGE_SHIFT;
 		int page_ofs = offset & (PAGE_SIZE - 1);
-		int page_cnt = min(PAGE_SIZE - page_ofs, count);
+		int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
 
 		page_data = kmap(fw_priv->pages[page_nr]);
 

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: firmware tree build failure
  2009-04-14  4:12 Stephen Rothwell
@ 2009-04-14 12:25 ` David Woodhouse
  2009-04-15  1:56 ` David Woodhouse
  1 sibling, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2009-04-14 12:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, David S. Miller

On Tue, 2009-04-14 at 14:12 +1000, Stephen Rothwell wrote: 
> Hi Dave,
> 
> Today's linux-next build (sparc64 defconfig) failed like this:
> 
> drivers/base/firmware_class.c: In function 'firmware_loading_store':
> drivers/base/firmware_class.c:173: error: 'PAGE_KERNEL_RO' undeclared (first use in this function)
> 
> Caused by commit 0bb1338d4467c143987560f841130292c124074c ("firmware:
> speed up request_firmware()").  PAGE_KERNEL_RO appears to not be defined
> for several architectures.
> 
> I have reverted that commit for today.

Ah, thanks. The fix for lack of PAGE_KERNEL_EXEC in vmalloc.c seems to
be:

#ifndef PAGE_KERNEL_EXEC
# define PAGE_KERNEL_EXEC PAGE_KERNEL
#endif

I think I'll do the equivalent for PAGE_KERNEL_RO, and at least we'll be
mapping the firmware images as read-only on _some_ architectures.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

^ permalink raw reply	[flat|nested] 8+ messages in thread

* linux-next: firmware tree build failure
@ 2009-04-14  4:12 Stephen Rothwell
  2009-04-14 12:25 ` David Woodhouse
  2009-04-15  1:56 ` David Woodhouse
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Rothwell @ 2009-04-14  4:12 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Hi Dave,

Today's linux-next build (sparc64 defconfig) failed like this:

drivers/base/firmware_class.c: In function 'firmware_loading_store':
drivers/base/firmware_class.c:173: error: 'PAGE_KERNEL_RO' undeclared (first use in this function)

Caused by commit 0bb1338d4467c143987560f841130292c124074c ("firmware:
speed up request_firmware()").  PAGE_KERNEL_RO appears to not be defined
for several architectures.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: firmware tree build failure
  2008-07-22  8:04 Stephen Rothwell
@ 2008-07-22  8:25 ` Jaswinder Singh
  0 siblings, 0 replies; 8+ messages in thread
From: Jaswinder Singh @ 2008-07-22  8:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Woodhouse, linux-next

Hello Stephen,

On Tue, 2008-07-22 at 18:04 +1000, Stephen Rothwell wrote:
> Hi Dave,
> 
> Today's linux-next build (sparc32 defconfig) failed like this:
> 
> drivers/scsi/qlogicpti.c: In function `qlogicpti_load_firmware':
> drivers/scsi/qlogicpti.c:476: error: structure has no member named `sbus'
> 
> I applied the following patch.
> 
> I think we can conclude that this was never build tested.  :-(

I am sorry for this.

This patch will solve both issues :-

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index e829d43..010372f 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -475,7 +475,7 @@ static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti)
 	unsigned long flags;
 	int i, timeout;
 
-	err = request_firmware(&fw, fwname, &qpti->sbus->ofdev.dev);
+	err = request_firmware(&fw, fwname, &qpti->sdev->ofdev.dev);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       fwname, err);
@@ -634,7 +634,7 @@ static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti)
 out:
 	spin_unlock_irqrestore(host->host_lock, flags);
 outfirm:
-	release_firwmare(fw);
+	release_firmware(fw);
 	return err;
 }
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* linux-next: firmware tree build failure
@ 2008-07-22  8:04 Stephen Rothwell
  2008-07-22  8:25 ` Jaswinder Singh
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2008-07-22  8:04 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, Jaswinder Singh

Hi Dave,

Today's linux-next build (sparc32 defconfig) failed like this:

drivers/scsi/qlogicpti.c: In function `qlogicpti_load_firmware':
drivers/scsi/qlogicpti.c:476: error: structure has no member named `sbus'

I applied the following patch.

I think we can conclude that this was never build tested.  :-(
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

>From 6c5369981d0b90c76286263dfca0e94b3987f9d8 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 22 Jul 2008 18:02:15 +1000
Subject: [PATCH] firmware: another typo in the conversion

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/scsi/qlogicpti.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 17df63e..1b6594e 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -473,7 +473,7 @@ static int __devinit qlogicpti_load_firmware(struct qlogicpti *qpti)
 	unsigned long flags;
 	int i, timeout;
 
-	err = request_firmware(&fw, fwname, &qpti->sbus->ofdev.dev);
+	err = request_firmware(&fw, fwname, &qpti->sdev->ofdev.dev);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       fwname, err);
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* linux-next: firmware tree build failure
@ 2008-07-22  7:57 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2008-07-22  7:57 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, Jaswinder Singh

Hi Dave,

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

drivers/scsi/qlogicpti.c:55:27: qlogicpti_asm.c: No such file or directory

I applied the following patch.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

>From c64dd1dfd140eb249684d85e927c7bae6f9d5328 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 22 Jul 2008 17:56:30 +1000
Subject: [PATCH] firmware: conversion fallout in qlogicpti.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/scsi/qlogicpti.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 3e71436..17df63e 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -52,8 +52,6 @@
 
 #define DEFAULT_LOOP_COUNT	10000
 
-#include "qlogicpti_asm.c"
-
 static struct qlogicpti *qptichain = NULL;
 static DEFINE_SPINLOCK(qptichain_lock);
 
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-04-15  2:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-22  7:47 linux-next: firmware tree build failure Stephen Rothwell
2008-07-22  7:57 Stephen Rothwell
2008-07-22  8:04 Stephen Rothwell
2008-07-22  8:25 ` Jaswinder Singh
2009-04-14  4:12 Stephen Rothwell
2009-04-14 12:25 ` David Woodhouse
2009-04-15  1:56 ` David Woodhouse
2009-04-15  2:03   ` Stephen Rothwell

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).