From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752980AbbJMMsV (ORCPT ); Tue, 13 Oct 2015 08:48:21 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:64020 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbbJMMsT (ORCPT ); Tue, 13 Oct 2015 08:48:19 -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: Tue, 13 Oct 2015 14:47:19 +0200 Message-ID: <6185166.M64gFmBG3u@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <561CFCAA.8030003@huawei.com> References: <1444663237-238302-1-git-send-email-john.garry@huawei.com> <147982224.OvBbMyp8ci@wuerfel> <561CFCAA.8030003@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:8EpU6nnmr2n0k8tuanNKfgOlzWcmSShbPJ5+uJF8VmR6FjtXRBM kA1AlKP8LiIM1dPoJOMAuVVLdMYaoYHQlAKvRCom0dqUTjqdVtb9C4kIXZXvmKCXrikOAHh VvUtsVOKq8coZ9WuYPZU76v0TKCnV3nMnq7UpF+wSYMZ5/uH+hOdJFzsYoXNmouSk06KKge n2musuU0qyvBrF6hm6GLg== X-UI-Out-Filterresults: notjunk:1;V01:K0:qJT1eNkNEt0=:ukyvrmujBq2zBdU9yp3mog LAs7+kkKUBlmVticWcEgu4Km3nvXV6OhpQaArOUXDxBa18KjRsm7PpAk8HRkUJMU+zvyygH4i QE2QJ/IfZiXXtJz0uzXyoPUA64CoF8LDWPTpgJtO3iJd3vl2MPuyP/w/6X1OZa7DIgNUdWtmt PkG5yzd23rEgKqYohg7Zifjyn0bPRibWLVG7KbiSPBDY3smD5NVkk2/strrqAyO3cTOl1GMBy C0Kirsce7dinCltEDWHL0d2AOtXG0fG2y7+vyMmIrkbU4+JoMIH6flxRItYQ0Iy6PeBWf538Q YvfWIuVCBhpsYG511nLMgwHDgTFACt6MzIE/LcoPMWFR5nasG0k29p/xsxoVX//UJFiWQPAC9 10zWMOjiIhmxsM1ffNLAU2GAM+wriCFTqTMmEJiedk26ZOcbJgtL7YAhR8NngC3yK1+0ssON3 bS2j1D7T5lii1hXGxx7MdrvVPRRBnF+J59so4K0Qv9EKLIrtBOQxMJ77x0akFEiPfVclJffB7 s5e1I3r+Jlth5zJ99271/ee46dTvv+Uhb8Uxm8Fy96JdXzgl3OVFBDk3RFDEomfOKaJ7l6LON lXOpQWBlP73XOwqf46TnttjlkNzzDOhd1+Rh4wKqx1y7Bzfyc5Rb86hhhEhJU5d680jLXBIFc e/rzdOdXUqogsaYrVoVyrQ8vO390mGl7DLz6b4aANNhgLBX3MKStRd6F13PYAMzJs/fzeKSH2 3jzdkzB8oIHbauYf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 13 October 2015 13:44:26 John Garry wrote: > Hello, > > Just to be clear, are you saying that you would prefer hisi_sas_probe() > and struct hisi_sas_driver to be relocated to hisi_sas_v1_hw.c? Correct. > I wanted to keep hisi_sas_v1_hw.c containing only code which accesses HW. > > I could consoldate the calls of hw_init_v1_hw(), interrupt_init_v1_hw(), > interrupt_openall_v1_hw(), and phys_init_v1_hw() to a single function hw > init function call. Then most of the code in the probe function will not > be specific to v1. This is more about correct layering of the code. Generally we want the more specific modules on top to call into the more general code in the bottom of the stack. Shared code should know as little as possible about the specific implementations it is shared with. Arnd