Skip to content

Commit 922b0dc

Browse files
mslusarzpmundt
authored andcommitted
sh: use printk_once
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent e290861 commit 922b0dc

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎arch/sh/mm/ioremap_64.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ static struct resource *shmedia_find_resource(struct resource *root,
9494
static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
9595
const char *name, unsigned long flags)
9696
{
97-
static int printed_full;
9897
struct xresource *xres;
9998
struct resource *res;
10099
char *tack;
@@ -108,11 +107,8 @@ static void __iomem *shmedia_alloc_io(unsigned long phys, unsigned long size,
108107
tack = xres->xname;
109108
res = &xres->xres;
110109
} else {
111-
if (!printed_full) {
112-
printk(KERN_NOTICE "%s: done with statics, "
110+
printk_once(KERN_NOTICE "%s: done with statics, "
113111
"switching to kmalloc\n", __func__);
114-
printed_full = 1;
115-
}
116112
tlen = strlen(name);
117113
tack = kmalloc(sizeof(struct resource) + tlen + 1, GFP_KERNEL);
118114
if (!tack)

0 commit comments

Comments
 (0)