* [PATCH] raid6/algos.c : bug fix : Add the missing definitions to the pq.h file
@ 2016-01-21 22:02 Gayatri Kammela
2016-01-21 23:05 ` Shaohua Li
0 siblings, 1 reply; 2+ messages in thread
From: Gayatri Kammela @ 2016-01-21 22:02 UTC (permalink / raw)
To: linux-raid
Cc: linux-kernel, Gayatri Kammela, NeilBrown, Anton Blanchard,
Fenghua Yu
Adding these pr_info and pr_err definitions so as to allow code to be
compiled successfully for testing in userspace, since the printk has
been replaced by pr_info and pr_err in algos.c
Absence of these definitions result in the compilation errors
such as ' undefined reference to `pr_info' ' ' undefined reference to
`pr_err' '
Cc: NeilBrown <neilb@suse.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
include/linux/raid/pq.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index a7a06d1dcf9c..a0118d5929a9 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -152,6 +152,8 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
# define jiffies raid6_jiffies()
# define printk printf
+# define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__)
+# define pr_info(format, ...) fprintf(stdout, format, ## __VA_ARGS__)
# define GFP_KERNEL 0
# define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \
PROT_READ|PROT_WRITE, \
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] raid6/algos.c : bug fix : Add the missing definitions to the pq.h file
2016-01-21 22:02 [PATCH] raid6/algos.c : bug fix : Add the missing definitions to the pq.h file Gayatri Kammela
@ 2016-01-21 23:05 ` Shaohua Li
0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2016-01-21 23:05 UTC (permalink / raw)
To: Gayatri Kammela
Cc: linux-raid, linux-kernel, NeilBrown, Anton Blanchard, Fenghua Yu
On Thu, Jan 21, 2016 at 02:02:39PM -0800, Gayatri Kammela wrote:
> Adding these pr_info and pr_err definitions so as to allow code to be
> compiled successfully for testing in userspace, since the printk has
> been replaced by pr_info and pr_err in algos.c
>
> Absence of these definitions result in the compilation errors
> such as ' undefined reference to `pr_info' ' ' undefined reference to
> `pr_err' '
>
> Cc: NeilBrown <neilb@suse.com>
> Cc: Anton Blanchard <anton@samba.org>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
> ---
> include/linux/raid/pq.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
> index a7a06d1dcf9c..a0118d5929a9 100644
> --- a/include/linux/raid/pq.h
> +++ b/include/linux/raid/pq.h
> @@ -152,6 +152,8 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
>
> # define jiffies raid6_jiffies()
> # define printk printf
> +# define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__)
> +# define pr_info(format, ...) fprintf(stdout, format, ## __VA_ARGS__)
> # define GFP_KERNEL 0
> # define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \
> PROT_READ|PROT_WRITE, \
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-21 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 22:02 [PATCH] raid6/algos.c : bug fix : Add the missing definitions to the pq.h file Gayatri Kammela
2016-01-21 23:05 ` Shaohua Li
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).