Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp496470yba; Fri, 12 Apr 2019 07:44:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVgLPNThqpvH7IKBcuSWWC+cj/xcjproYAzuAX1MRkeQGDdL9yMpA88r2glH1M+8iW/OIQ X-Received: by 2002:a62:1881:: with SMTP id 123mr57021015pfy.25.1555080263667; Fri, 12 Apr 2019 07:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555080263; cv=none; d=google.com; s=arc-20160816; b=deIJiaS1u5gFy56+X47EzmCK9BNMu/nVW2cEJWoWzxRvHbX4InzaUwhiGM1LfyiaFm C6M/B0e1fyDdvlKvRprsLT/wvzYLcrqWcpFJSbPBBU8i25MT2YCENhpojl+0jcbffhTe 2ba0JPDBlfqDXt1fyf33KAar2tppZlBIYxe3yORjzDPFjmp923lpM1z4eUqFWsRiHe6g r8f04WEK//BZf9cE/R8djA1KQ4AgyVfrt0bYaAAQcehXkz044Xm8HWbVN6t4uhxaufXb pq7onVzfCU0js3hdBydE4VmCdOllKyQzK+peJ9LHyIlwxaC62/JgPF8R2sfMS2rdQCoS KlRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+2EUgIX8bJUiZT0Ly48kfo4K5EATvNzoEnsiFCe8wng=; b=inVvBjCahf2fe9OnjZt8ow204baasZzFfzG3uPhtSwTNE2Zt7/5tsYJPvFfmGCHxMo e26NKPx/T2aFjapfNzbabc0EcUSdkyvQpNXYmwsO9eG7Y0BnOFDYjgXZKVO/QN2ynH7S Ww0ihgxDbp1crZJ87mZeUb2oqN4b6RBry6NYhjKgRzhPeMTEoKanWduUgRGV172j3WOB xdh+LLtTKKRxbgqm5TwSUgNy2cp6YRzJvSNBLgjMdICYA3l1TBBhbe8JukNnAeyRbGZh nn47BWO/G/AVmckfXf/nhcgz2Nh58RdFmtNuySvDHdymz/5vSmWslPOlkpuBe3iGi/sn yV3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39si22285476pla.437.2019.04.12.07.44.07; Fri, 12 Apr 2019 07:44:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbfDLOmH (ORCPT + 99 others); Fri, 12 Apr 2019 10:42:07 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42175 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbfDLOmG (ORCPT ); Fri, 12 Apr 2019 10:42:06 -0400 Received: by mail-qt1-f196.google.com with SMTP id p20so11451710qtc.9; Fri, 12 Apr 2019 07:42:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+2EUgIX8bJUiZT0Ly48kfo4K5EATvNzoEnsiFCe8wng=; b=aJxs6fCtav3XaN9hDa6WLmQLJqdqY1NtM6zxgIG9i8357snWqRfBVrzUVCsJ9MJzlt XysrH5SKUKrxPD7fpMne8cWNfZnf1xs63k7wYTjw6vhIwe1RLTaWHq3f8OgbXagJoCGN pw+xBUESFcBhpvhqDhVtskWrYx2lCumcxHpIOiL5/qKfApcM+Ur+2bO4zaIPRqk4pQfm QomFl9FUtnjOEE/Jn8OMmE45VPGzXk47rCNO5WLSz3GJ3N9Zb4+Y38lIi+zNp2LEhuG5 VnD19PfTI7dlBiOOedb2gYMt0i0aGTje6IDPPOEE3YQX8+RAkOk4I8qSSaU8mFBJvaND XYFg== X-Gm-Message-State: APjAAAUv0o8dEv5fNWwH1q/Czn1HyaE9VobkscTEJYaI8oBN/42zPtGo RRN8oUg9oC2d/9dAes5WCgledoljsVrWgzmQUr8= X-Received: by 2002:a0c:9ac1:: with SMTP id k1mr48250047qvf.36.1555080125561; Fri, 12 Apr 2019 07:42:05 -0700 (PDT) MIME-Version: 1.0 References: <20190412095332.41370-1-Zhiqiang.Hou@nxp.com> <20190412095332.41370-5-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190412095332.41370-5-Zhiqiang.Hou@nxp.com> From: Arnd Bergmann Date: Fri, 12 Apr 2019 16:41:49 +0200 Message-ID: Subject: Re: [PATCHv5 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); > + if (!pcie) > + return -ENOMEM; > + > + mv_pci = devm_kzalloc(dev, sizeof(*mv_pci), GFP_KERNEL); > + if (!mv_pci) > + return -ENOMEM; > + Just fold the two structures into one, and use pci_alloc_host_bridge() to allocate everything. Arnd