From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbbJLSq3 (ORCPT ); Mon, 12 Oct 2015 14:46:29 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55235 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751967AbbJLSq1 (ORCPT ); Mon, 12 Oct 2015 14:46:27 -0400 From: Arnd Bergmann To: John Garry Cc: James.Bottomley@hansenpartnership.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linuxarm@huawei.com, zhangfei.gao@linaro.org, linux-scsi@vger.kernel.org, xuwei5@hisilicon.com, john.garry2@mail.dcu.ie, hare@suse.de Subject: Re: [PATCH 12/25] scsi: hisi_sas: add v1 HW initialisation code Date: Mon, 12 Oct 2015 20:46:19 +0200 Message-ID: <147982224.OvBbMyp8ci@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1444663237-238302-13-git-send-email-john.garry@huawei.com> References: <1444663237-238302-1-git-send-email-john.garry@huawei.com> <1444663237-238302-13-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:YapGvXD9zRcQxImoXAsFk4LVY8Tu3RN6jgAMFR+b8uuWgKYGjiO +Ke2PbV1QkcdT75xPFDRv8s0qZwbrKOGjOtUN9HrKVMy9gwBm9Npbe8z/stwPkwv5sz5ugx zoUztDhjLfOl/cIIqrKilly7Xysi2pWJWfZ3KhL/lMVcaWBcsSJmGNCGE86GFRG1qKk57+A klVyvABWKQbuu11otiwzQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:9uBecysKVCI=:DwOY406QSvDST/PFr9Zls+ IokxrhwSesy4hTX4abn6F71nBww8auSVXSxLhFDW6pO2ZurUadgRPDXKJyCh7c4qdgOHosERQ uSHJBJuPuWTEij4ZnJDUtNxV3upsjSaD8atzbHqgMtJvE/QYmKJ3/bmpaEuYhO5GOAKY9p0cG EY8kcN5b2PxADU2/oeE138Quon8+a4KWsiSf2ju36Ymcwr4PrNtrM6VCyyPvow+xB6JvbrWVU gJW8vOdjM9PKR8zUGaPRv8ALsMSyWWgeT5k2c5leQo33L2CFYkMtRM+HVil7Ge8KvcFXaRaLJ FZvk2rg20cGYXh3AAvJy+7eCozp64HeskVb5N53FdQMRwpVm1UghBswagk7rY7ZrZptz3L4qd X41ivMgCsn2VaAfJTnwr27XX/5st6Rzsn+dMrWubFIZvStuqZ//wHqQbxSjIhiaQjWHwvsGym y+C6sJ8Nm8xYlsqc977o+lh3iVi6BoPRcz8JGoEmTEponmEBmEYcjm0eJksMtCU2n1R26Zrgg R2MO3UCtP6Kx2l+YsrlEhXXuisHQnQVd/ILgS3Bja79pPbjXgzXQQ05VF0kK84SL0AyACsL8s 6Sqa9+SfJFHqyFb9PdepAYn3ydqLvCroc+Km3YxgkKL517lqrS8LHZEh84Ad3L9Ga9tO0VF86 ofnl+9Ydw6u6Wh85YwcEYakLTyC57q/TqXHIt5ut76sLGP3ASrLb8EPuMt6oacEMt7BufCWhA OUBH9oXMObHEFgNK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 12 October 2015 23:20:24 John Garry wrote: > @@ -387,6 +392,21 @@ static int hisi_sas_probe(struct platform_device *pdev) > } > > hisi_sas_init_add(hisi_hba); > + > + rc = hw_init_v1_hw(hisi_hba); > + if (rc) > + goto err_out_ha; > + > + rc = interrupt_init_v1_hw(hisi_hba); > + if (rc) > + goto err_out_ha; > + > + rc = interrupt_openall_v1_hw(hisi_hba); > + if (rc) > + goto err_out_ha; > + > + phys_init_v1_hw(hisi_hba); > + > rc = scsi_add_host(shost, &pdev->dev); > if (rc) > goto err_out_ha; > As the probe function matches against the "hisilicon,sas-controller-v1" compatible string and contains mostly code that is specific to v1, I think it would be cleaner to move that to the hisi_sas_v1_hw.c as well and make the functions above static but make the common functions called here (hisi_sas_init_add etc) global. That would also include the hisi_sas_driver structure. Arnd