Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751358AbdFEG23 (ORCPT ); Mon, 5 Jun 2017 02:28:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33088 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbdFEG21 (ORCPT ); Mon, 5 Jun 2017 02:28:27 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 05 Jun 2017 11:58:21 +0530 From: kgunda@codeaurora.org To: Stephen Boyd Cc: Abhijeet Dharmapurikar , Greg Kroah-Hartman , David Collins , Subbaraman Narayanamurthy , Christophe JAILLET , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, adharmap@quicinc.com, aghayal@qti.qualcomm.com, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V1 02/15] spmi: pmic-arb: rename spmi_pmic_arb_dev to spmi_pmic_arb In-Reply-To: <20170602182946.GO20170@codeaurora.org> References: <1496147943-25822-1-git-send-email-kgunda@codeaurora.org> <1496147943-25822-3-git-send-email-kgunda@codeaurora.org> <20170531004637.GT20170@codeaurora.org> <2bfcb67b77b7bbd1eccd3aeaf11dc75d@codeaurora.org> <20170602182946.GO20170@codeaurora.org> Message-ID: <937c6334af67f7ca263d4184039ee29e@codeaurora.org> User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1276 Lines: 30 On 2017-06-02 23:59, Stephen Boyd wrote: > On 06/01, kgunda@codeaurora.org wrote: >> >>@@ -209,23 +210,24 @@ static void pa_read_data(struct >> >>spmi_pmic_arb_dev *dev, u8 *buf, u32 reg, u8 bc) >> >> * @buf: buffer to write. length must be bc + 1. >> >> */ >> >> static void >> >>-pa_write_data(struct spmi_pmic_arb_dev *dev, const u8 *buf, u32 >> >>reg, u8 bc) >> >>+pa_write_data(struct spmi_pmic_arb *pa, const u8 *buf, u32 reg, >> >>u8 bc) >> >> { >> >> u32 data = 0; >> >>+ >> >> memcpy(&data, buf, (bc & 3) + 1); >> >>- __raw_writel(data, dev->wr_base + reg); >> >>+ pmic_arb_base_write(pa, reg, data); >> > >> >This is an unrelated change. Not sure what's going on with this >> >diff but we most likely want to keep the __raw_writel() here. See >> >how renames introduce bugs and why we don't value them? >> > >> Actually pmic_arb_base_write has the writel_relaxed inside it. >> that's why we removed the __raw_writel to use the common function. >> Anyways, we drop the renaming patch from this patch series. > > __raw_writel() is there on purpose because we're reading bytes at > a time and the CPU could be big-endian or little-endian. > readl_relaxed() would do a byte swap which we don't want. ok. Thanks for clarifying it. We do not remove the __raw_writel.