Re: [Pcihpd-discuss] [PATCH 1/4] Fix PCIe hotplug for non-ACPI ExpressCard slots (version 2)

From: Matthew Wilcox
Date: Wed Oct 17 2007 - 10:02:39 EST


On Wed, Oct 17, 2007 at 09:09:24AM -0400, Mark Lord wrote:
> > I'd argue these comments fall under "stating the bleedin' obvious", but
> > that's Kristen's call.
>
> Hey, they're original to the file. I'm just keeping checkpatch.pl happy here.
> Ditto for everything else you commented on.

I can see that they were there before. I just think the appropriate
patch is to delete them rather than to move them

> >> case INT_PRESENCE_OFF:
> >> if (!HP_SUPR_RM(ctrl->ctrlcap))
> >> break;
> >> - dbg("Surprise Removal\n");
> >> + dbg("Surprise Event\n");
> >> update_slot_info(p_slot);
> >> handle_surprise_event(p_slot);
> >> break;
> >
> > That doesn't seem like an obviously correct change to me. Can you
> > explain?
>
> Yeah. You clipped the top line: case INT_PRESENCE_ON:
> So that code can be run for both hot plug and hot remove operations.

I didn't clip it -- diff did when it inserted three lines of context.

> ..
> >> - temp_word = (temp_word & ~intr_enable) | intr_enable;
> >> + temp_word = (temp_word & ~intr_enable) | intr_enable;
> >
> > *boggle*
>
> Dig out your text editor, and notice the excess whitespace at the end of the line,
> along with similar stuff on most other lines in this patch.

You, however, did clip the important line.

> > temp_word |= intr_enable;

which is what I was saying the above is equivalent to.

> This is all just stuff that checkpatch.pl complains about when
> the later patches are applied, so patch 01_... serves to reduce
> the noise level from checkpatch.pl for the *real* patches which follow.

I know, but if you're going to remove whitespace from a line, you might
as well change the line to look like idiomatic C rather than something
an Ada programmer wrote.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/