Re: [PATCH] Macintosh: fix brace and trailing statement coding style issues in adb-iop.c This is a patch to the adb-iop.c file that cleans up brace and trailing statement warnings found by the checkpatch.pl tool. Signed-off-by: Michael Beardsworth <m

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2010-03-21 10:15:44
Also in: linux-m68k

On Sun, Mar 21, 2010 at 10:16,  [off-list ref] wrote:
quoted
On Tue, Mar 09, 2010 at 01:46:20PM -0800, Michael Beardsworth wrote:
quoted
...

=C2=A0#ifdef DEBUG_ADB_IOP
- =C2=A0 printk("adb_iop_listen %p: rcvd packet, %d bytes: %02X %02X",=
 req,
quoted
quoted
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (uint) amsg->count + 2, (uint) am=
sg->flags, (uint) amsg->cmd);
quoted
quoted
+ =C2=A0 printk(KERN_WARNING "adb_iop_listen %p: rcvd packet, %d bytes=
: %02X %02X",
quoted
quoted
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 req, (uint) amsg->count + 2, (uin=
t) amsg->flags, (uint) amsg->cmd);
quoted
quoted
=C2=A0 =C2=A0 for (i =3D 0; i < amsg->count; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk(" %02X", (uint) amsg-=
data[i]);
quoted
quoted
=C2=A0 =C2=A0 printk("\n");
quoted
quoted
...
=C2=A0#ifdef DEBUG_ADB_IOP
- =C2=A0 printk("adb_iop_start %p: sending packet, %d bytes:", req, re=
q->nbytes);
quoted
quoted
+ =C2=A0 printk(KERN_WARNING "adb_iop_start %p: sending packet, %d byt=
es:", req, req->nbytes);
quoted
quoted
=C2=A0 =C2=A0 for (i =3D 0 ; i < req->nbytes ; i++)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk(" %02X", (uint) req->=
data[i]);
quoted
quoted
=C2=A0 =C2=A0 printk("\n");
KERN_DEBUG is used for debugging messages, not KERN_WARNING.
And that change is not covered by the patch description.

BTW, pr_debug(), these days.
quoted hunk
 int adb_iop_init(void)
 {
-       printk("adb: IOP ISM driver v0.4 for Unified ADB.\n");
+       printk(KERN_MESSAGE "adb: IOP ISM driver v0.4 for Unified ADB.\n"=
);
       iop_listen(ADB_IOP, ADB_CHAN, adb_iop_listen, "ADB");
      return 0;
}
Not to mention the non-existence of KERN_MESSAGE?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k=
.org

In personal conversations with technical people, I call myself a hacker. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
							    -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help