[PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline
Ian Munsie
imunsie at au1.ibm.com
Mon Sep 7 16:33:43 AEST 2015
No worries. I've been caught out by something similar in the past when I
assumed that something like this:
if (foo)
/*
* A big long
* multiline
* block comment!
*/
do_something()
would surely already have curly brackets around it ;-)
Excerpts from andrew.donnellan's message of 2015-09-07 10:22:31 +1000:
>
> On 07/09/15 09:58, Ian Munsie wrote:
> > Excerpts from andrew.donnellan's message of 2015-09-04 16:20:24 +1000:
> >> + if (!cxl_adapter_link_ok(afu->adapter))
> >> + dev_warn(&dev->dev, "%s: Device link is down, refusing to enable AFU\n", __func__);
> >> + return false;
> >
> > Based on the indentation it looks like you meant to add some curly
> > brackets here.
>
> Indeed I did, and I'd even thought I'd tested it... this is why I
> shouldn't be allowed to submit patches at 4pm on Fridays...
>
> Will submit V2.
>
> (FWIW, I'm a firm believer in braces around single statements in
> conditionals to avoid mistakes like this, but CodingStyle disagrees...)
>
>
> Andrew
>
More information about the Linuxppc-dev
mailing list