From: Joel Soete <soete.joel@tiscali.be>
To: Joel Soete <soete.joel@tiscali.be>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] printk cleanup
Date: Sat, 27 Dec 2003 18:06:24 +0000 [thread overview]
Message-ID: <3FEDCA20.3030003@tiscali.be> (raw)
In-Reply-To: <3FEDC568.30006@tiscali.be>
[-- Attachment #1: Type: text/plain, Size: 897 bytes --]
oops sory,
Joel Soete wrote:
> Hi all,
>
> May I sugest following printk changes:
> =========><=========
> diff -Naur linux-2.6.0-pa5/include/asm-parisc/pci.h
> linux-2.6.0-pa5.new/include/asm-parisc/pci.h
> --- linux-2.6.0-pa5/include/asm-parisc/pci.h 2003-12-27
> 16:36:55.000000000 +0100
> +++ linux-2.6.0-pa5.new/include/asm-parisc/pci.h 2003-12-27
> 18:12:53.303140000 +0100
> @@ -29,7 +29,8 @@
> #ifdef PCI_DEBUG
> #define ASSERT(expr) \
> if(!(expr)) { \
> - printk( "\n" __FILE__ ":%d: Assertion " #expr "
> failed!\n",__LINE__); \
> + printk("\n%s:%d: Assertion " #expr " failed!\n", __FILE__,
there is a typo ^^
should be better read __FILE__, \
> + __LINE__); \
> panic(#expr); \
> }
> #else
> =========><=========
>
Appologies,
J.
[-- Attachment #2: PrintK.diff --]
[-- Type: text/plain, Size: 4913 bytes --]
diff -Naur linux-2.6.0-pa5/arch/parisc/kernel/pci-dma.c linux-2.6.0-pa5.new/arch/parisc/kernel/pci-dma.c
--- linux-2.6.0-pa5/arch/parisc/kernel/pci-dma.c 2003-12-27 16:36:55.000000000 +0100
+++ linux-2.6.0-pa5.new/arch/parisc/kernel/pci-dma.c 2003-12-27 17:51:39.000000000 +0100
@@ -261,11 +261,13 @@
} else if(pages_needed <= 32) {
PCXL_FIND_FREE_MAPPING(res_idx, mask, 32);
} else {
- panic(__FILE__ ": pcxl_alloc_range() Too many pages to map.\n");
+ panic("%s: pcxl_alloc_range() Too many pages to map.\n",
+ __FILE__);
}
dump_resmap();
- panic(__FILE__ ": pcxl_alloc_range() out of dma mapping resources\n");
+ panic("%s: pcxl_alloc_range() out of dma mapping resources\n",
+ __FILE__);
resource_found:
@@ -319,7 +321,8 @@
} else if(pages_mapped <= 32) {
PCXL_FREE_MAPPINGS(res_idx, mask, 32);
} else {
- panic(__FILE__ ": pcxl_free_range() Too many pages to unmap.\n");
+ panic("%s: pcxl_free_range() Too many pages to unmap.\n",
+ __FILE__);
}
pcxl_used_pages -= (pages_mapped ? pages_mapped : 1);
diff -Naur linux-2.6.0-pa5/arch/parisc/math-emu/decode_exc.c linux-2.6.0-pa5.new/arch/parisc/math-emu/decode_exc.c
--- linux-2.6.0-pa5/arch/parisc/math-emu/decode_exc.c 2003-12-27 16:36:55.000000000 +0100
+++ linux-2.6.0-pa5.new/arch/parisc/math-emu/decode_exc.c 2003-12-27 16:47:42.000000000 +0100
@@ -347,7 +347,7 @@
return SIGNALCODE(SIGFPE, FPE_FLTRES);
default:
update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
- printk(__FILE__ "(%d) Unknown FPU exception 0x%x\n",
+ printk("%s(%d) Unknown FPU exception 0x%x\n", __FILE__,
__LINE__, Excp_type(exception_index));
return SIGNALCODE(SIGILL, ILL_COPROC);
case NOEXCEPTION: /* no exception */
diff -Naur linux-2.6.0-pa5/drivers/parisc/ccio-dma.c linux-2.6.0-pa5.new/drivers/parisc/ccio-dma.c
--- linux-2.6.0-pa5/drivers/parisc/ccio-dma.c 2003-12-27 16:36:55.000000000 +0100
+++ linux-2.6.0-pa5.new/drivers/parisc/ccio-dma.c 2003-12-27 16:55:57.000000000 +0100
@@ -364,11 +364,11 @@
CCIO_FIND_FREE_MAPPING(ioc, res_idx, mask, 64);
#endif
} else {
- panic(__FILE__ ": %s() Too many pages to map. pages_needed: %ld\n",
- __FUNCTION__, pages_needed);
+ panic("%s: %s() Too many pages to map. pages_needed: %ld\n",
+ __FILE__, __FUNCTION__, pages_needed);
}
- panic(__FILE__ ": %s() I/O MMU is out of mapping resources.\n",
+ panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__,
__FUNCTION__);
resource_found:
@@ -441,7 +441,7 @@
CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 64);
#endif
} else {
- panic(__FILE__ ":%s() Too many pages to unmap.\n",
+ panic("%s:%s() Too many pages to unmap.\n", __FILE__,
__FUNCTION__);
}
}
@@ -1447,7 +1447,8 @@
ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL,
get_order(ioc->pdir_size));
if(NULL == ioc->pdir_base) {
- panic(__FILE__ ":%s() could not allocate I/O Page Table\n", __FUNCTION__);
+ panic("%s:%s() could not allocate I/O Page Table\n", __FILE__,
+ __FUNCTION__);
}
memset(ioc->pdir_base, 0, ioc->pdir_size);
@@ -1461,7 +1462,8 @@
ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL,
get_order(ioc->res_size));
if(NULL == ioc->res_map) {
- panic(__FILE__ ":%s() could not allocate resource map\n", __FUNCTION__);
+ panic("%s:%s() could not allocate resource map\n", __FILE__,
+ __FUNCTION__);
}
memset(ioc->res_map, 0, ioc->res_size);
diff -Naur linux-2.6.0-pa5/drivers/parisc/sba_iommu.c linux-2.6.0-pa5.new/drivers/parisc/sba_iommu.c
--- linux-2.6.0-pa5/drivers/parisc/sba_iommu.c 2003-12-27 16:36:55.000000000 +0100
+++ linux-2.6.0-pa5.new/drivers/parisc/sba_iommu.c 2003-12-27 16:57:40.000000000 +0100
@@ -579,7 +579,8 @@
if (pide >= (ioc->res_size << 3)) {
pide = sba_search_bitmap(ioc, pages_needed);
if (pide >= (ioc->res_size << 3))
- panic(__FILE__ ": I/O MMU @ %lx is out of mapping resources\n", ioc->ioc_hpa);
+ panic("%s: I/O MMU @ %lx is out of mapping resources\n",
+ __FILE__, ioc->ioc_hpa);
}
#ifdef ASSERT_PDIR_SANITY
@@ -1781,7 +1782,8 @@
if (NULL == sba_dev->ioc[i].res_map)
{
- panic(__FILE__ ":%s() could not allocate resource map\n", __FUNCTION__ );
+ panic("%s:%s() could not allocate resource map\n",
+ __FILE__, __FUNCTION__ );
}
memset(sba_dev->ioc[i].res_map, 0, res_size);
diff -Naur linux-2.6.0-pa5/include/asm-parisc/pci.h linux-2.6.0-pa5.new/include/asm-parisc/pci.h
--- linux-2.6.0-pa5/include/asm-parisc/pci.h 2003-12-27 16:36:55.000000000 +0100
+++ linux-2.6.0-pa5.new/include/asm-parisc/pci.h 2003-12-27 18:55:56.233140000 +0100
@@ -29,7 +29,8 @@
#ifdef PCI_DEBUG
#define ASSERT(expr) \
if(!(expr)) { \
- printk( "\n" __FILE__ ":%d: Assertion " #expr " failed!\n",__LINE__); \
+ printk("\n%s:%d: Assertion " #expr " failed!\n", __FILE__, \
+ __LINE__); \
panic(#expr); \
}
#else
next prev parent reply other threads:[~2003-12-27 18:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-27 17:46 [parisc-linux] printk cleanup Joel Soete
2003-12-27 18:06 ` Joel Soete [this message]
2003-12-27 23:16 ` Helge Deller
2004-01-20 1:50 ` Grant Grundler
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=3FEDCA20.3030003@tiscali.be \
--to=soete.joel@tiscali.be \
--cc=parisc-linux@lists.parisc-linux.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