Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5733812imb; Fri, 8 Mar 2019 00:45:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxEmCj52bIbaMJSBXE2UNtoixNpOw2wjMLlgvvorFUZp+DMLrmkYYsiBvtxw8Tmzq0B8aUn X-Received: by 2002:a62:b508:: with SMTP id y8mr17467206pfe.140.1552034742081; Fri, 08 Mar 2019 00:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552034742; cv=none; d=google.com; s=arc-20160816; b=WspbkNgqXJSYQRjbgH68WLGBvoa1Cs1d+patZ3ovAMic0t+i0Z7qRsgh+cpI9vl7lL 5i0Mv5RCsH0phFhJFnG2CXlzoV+YE5ua/fTc6Tba2yXoz1Yvzt9hhF90ASKDaMpl8Mi+ djsUsiotStPZ/AQNDyuuYe+XRFjlnsRmz+hwkD5wGqACxbmGOB48JvDu3+h5krhUQtyI RGqIWGoEMdco2Q07uhCvTckJJiAjUUW57TKseCXvcl1QFPHjZg/ycfAvNqK5MHpnpg4F 8YKY2vZV/SxHDKRNLcsG5Ql1hB3forekQz3pQ2bUtbTblwHp9z9qlQGawcNNhLoF52wA I5Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=T5TB1zEnhGijryWTftekKJExzXrg65haXM0De1FodHc=; b=Dov2sO9wviB3gTGSym+bZ52PdbILlnvoYkU7lluOBYmM+ITioJ3e4K9vbTpDZEilxt SS9xDaXVEHQS2GvvsL1CE3m/yI3EpsWiutx1lwt7e9lOYMTL3RdlgOlhXnWWF0gY7wOw ph4ntU9+wYBH36af0+M9J+I6PW7LxGZvWvi2TaV8VW9drr4XzLOQhh7qA6/upk+nx6EG zvjlVgW0YGEom/c0GUkq3tM0UOkYRIqbcy6WBMkvFuvmjjzAI//LUjG++po5QWWYv682 TNhJhyhl7lDtmWvKCfcrdSxHwDe0MuLEmrytt/YaIHf3WoUKObDAzA1nN0k1ND5q9ZrR ZEsQ== 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 h1si6530926plh.265.2019.03.08.00.45.26; Fri, 08 Mar 2019 00:45:42 -0800 (PST) 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 S1726324AbfCHIpG (ORCPT + 99 others); Fri, 8 Mar 2019 03:45:06 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:54394 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725789AbfCHIpG (ORCPT ); Fri, 8 Mar 2019 03:45:06 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x288a82D016023; Fri, 8 Mar 2019 09:44:43 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2qyhknmfsx-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 08 Mar 2019 09:44:43 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 475A731; Fri, 8 Mar 2019 08:44:42 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E81582B22; Fri, 8 Mar 2019 08:44:41 +0000 (GMT) Received: from [10.48.0.237] (10.75.127.47) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 8 Mar 2019 09:44:41 +0100 Subject: Re: [PATCH V2 6/6] mmc: mmci: replace blksz_datactrlXX by get_datactrl_cfg callback To: Russell King - ARM Linux admin CC: Ulf Hansson , Rob Herring , , Alexandre Torgue , , , , Maxime Coquelin , , References: <1551976742-4358-1-git-send-email-ludovic.Barre@st.com> <1551976742-4358-7-git-send-email-ludovic.Barre@st.com> <20190307164649.ywhgdikxf4nhb2sd@shell.armlinux.org.uk> From: Ludovic BARRE Message-ID: Date: Fri, 8 Mar 2019 09:44:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190307164649.ywhgdikxf4nhb2sd@shell.armlinux.org.uk> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-08_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi Russell, Ulf On 3/7/19 5:46 PM, Russell King - ARM Linux admin wrote: > On Thu, Mar 07, 2019 at 05:39:02PM +0100, Ludovic Barre wrote: >> - if (data->flags & MMC_DATA_READ) >> - datactrl |= MCI_DPSM_DIRECTION; > > Given that this is currently an invariant between all, it doesn't make > sense to have a separate public function and combine it into the > get_datactrl_cfg() implementations. You may as well leave it in place > here, after you call get_datactrl_cfg(). > >> + datactrl = host->ops->get_datactrl_cfg(host); > > Otherwise, I don't see a problem with this, although it would be nice to > avoid the overhead of so many public functions, which could be done by > adding them as inline functions in mmci.h > To combine your comments (above and https://lkml.org/lkml/2019/3/6/318). I could regroup mmci_dctrl_dir & mmci_dctrl_ddr & mmci_dctrl_sdio in a common function mmci_dctrl_common and call by: -Each get_datactrl_cfg variant -Or in mmci_start_data What do you prefer ? Regards, Ludo