提交 85ad2721 编写于 作者: P Pierre Morel 提交者: Heiko Carstens

s390/pci: read clp_list_pci_req only once

We do not have to reset the fh_list in the loop.
Signed-off-by: NPierre Morel <pmorel@linux.ibm.com>
Reviewed-by: NNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
上级 ebd9cc65
......@@ -383,8 +383,8 @@ static int clp_find_pci(struct clp_req_rsp_list_pci *rrb, u32 fid,
rc = clp_list_pci_req(rrb, &resume_token, &nentries);
if (rc)
return rc;
fh_list = rrb->response.fh_list;
for (i = 0; i < nentries; i++) {
fh_list = rrb->response.fh_list;
if (fh_list[i].fid == fid) {
*entry = fh_list[i];
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册