From: David Woodhouse <dwmw2@infradead•org>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: linux-next@vger•kernel.org, "David S. Miller" <davem@davemloft•net>
Subject: Re: linux-next: firmware tree build failure
Date: Wed, 15 Apr 2009 02:56:41 +0100 [thread overview]
Message-ID: <1239760601.29206.29.camel@macbook.infradead.org> (raw)
In-Reply-To: <20090414141254.70ddc8ce.sfr@canb.auug.org.au>
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
next prev parent reply other threads:[~2009-04-15 1:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 4:12 linux-next: firmware tree build failure Stephen Rothwell
2009-04-14 12:25 ` David Woodhouse
2009-04-15 1:56 ` David Woodhouse [this message]
2009-04-15 2:03 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2008-07-22 8:04 Stephen Rothwell
2008-07-22 8:25 ` Jaswinder Singh
2008-07-22 7:57 Stephen Rothwell
2008-07-22 7:47 Stephen Rothwell
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=1239760601.29206.29.camel@macbook.infradead.org \
--to=dwmw2@infradead$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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