[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5966D8C0.4090908@huawei.com>
Date: Thu, 13 Jul 2017 10:19:44 +0800
From: wangyijing <wangyijing@...wei.com>
To: John Garry <john.garry@...wei.com>, <jejb@...ux.vnet.ibm.com>,
<martin.petersen@...cle.com>
CC: <chenqilin2@...wei.com>, <hare@...e.com>,
<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<chenxiang66@...ilicon.com>, <huangdaode@...ilicon.com>,
<wangkefeng.wang@...wei.com>, <zhaohongjiang@...wei.com>,
<dingtianhong@...wei.com>, <guohanjun@...wei.com>,
<yanaijie@...wei.com>, <hch@....de>, <dan.j.williams@...el.com>,
<emilne@...hat.com>, <thenzl@...hat.com>, <wefu@...hat.com>,
<charles.chenxin@...wei.com>, <chenweilong@...wei.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
Linuxarm <linuxarm@...wei.com>
Subject: Re: [PATCH v3 6/7] libsas: add wait-complete support to sync
discovery event
在 2017/7/12 21:51, John Garry 写道:
> On 10/07/2017 08:06, Yijing Wang wrote:
>>
>> static void sas_chain_event(int event, unsigned long *pending,
>> @@ -592,9 +596,9 @@ int sas_discover_event(struct asd_sas_port *port, enum discover_event ev)
>> {
>> struct sas_discovery *disc;
>>
>> + disc = &port->disc;
>> if (!port)
>> return 0;
>> - disc = &port->disc;
>>
>> BUG_ON(ev >= DISC_NUM_EVENTS);
>>
>> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
>> index 570b2cb..9d26c28 1
>
> I was just looking through the code and I noticed this, above. Is there a specific reason to move the NULL check, or was it modified accidentally?
>
> I mean, if port is NULL I don't think we would get as far as checking it as we would have already de-referenced it.
Oh, sorry, it's a accidental change, good catch, thanks!
>
>
>
> .
>
Powered by blists - more mailing lists