From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 113F8CD5BA6 for ; Tue, 19 Sep 2023 12:15:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbjISMPi (ORCPT ); Tue, 19 Sep 2023 08:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjISMPg (ORCPT ); Tue, 19 Sep 2023 08:15:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56184E3; Tue, 19 Sep 2023 05:15:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96AB2C433C7; Tue, 19 Sep 2023 12:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695125731; bh=xvCx7ZWNm6jnB4edU9vEvToGC6Z5Sc/hEVmL8SgiqZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HZseuY35WtH77s0q6NFTQCnN8iQjLfnq+vTD+TAUlrk1wwvuAA+DFYeeWDHg+Fvv2 2p6iwRJRenvbl6ao3MJAEqtuyGay6DGmaLxjZg6b1l2VHtsnzUtBHtes7Oij33Zb77 ZfFX+F1k6Mf3stSs08AxTMhP+Go1OwBLN5x1+1uwlvf/2EhbrGuYo3QXWoHcFjP2Gw ZyDw0apc9XL/oqWyk+cv6tI5vgjRRTRkDU87aT5x4nGDyfPua3g5WTFmVoZeyMe+LT 5Nt4CcQC2lHyCUj1KsDJGxI7CwdjierL8EemVsHwQ7gRYVYCp+RKS6T+xspknKRDa9 bZAI19Hco5l0g== Date: Tue, 19 Sep 2023 14:15:24 +0200 From: Manivannan Sadhasivam To: Dmitry Baryshkov Cc: Can Guo , quic_nguyenb@quicinc.com, quic_nitirawa@quicinc.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel , open list , "open list:ARM/QUALCOMM SUPPORT" , "open list:GENERIC PHY FRAMEWORK" Subject: Re: [PATCH 4/6] phy: qualcomm: phy-qcom-qmp-ufs: Move data structs and setting tables to header Message-ID: <20230919121524.GD4732@thinkpad> References: <1694411968-14413-1-git-send-email-quic_cang@quicinc.com> <1694411968-14413-5-git-send-email-quic_cang@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On Thu, Sep 14, 2023 at 03:28:59PM +0300, Dmitry Baryshkov wrote: > On Mon, 11 Sept 2023 at 09:01, Can Guo wrote: > > > > To make the code more readable, move the data structs and PHY settting > > tables to a header file, namely the phy-qcom-qmp-ufs.h. > > > > Signed-off-by: Can Guo > > --- > > drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 802 +------------------------------ > > drivers/phy/qualcomm/phy-qcom-qmp-ufs.h | 805 ++++++++++++++++++++++++++++++++ > > 2 files changed, 806 insertions(+), 801 deletions(-) > > create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-ufs.h > > Is there any reason to do so? Other than just moving stuff around, it > doesn't give us anything. This header will not be shared with any > other driver. Just moving data tables to the header (ugh, static data > in the header) doesn't make code more readable. > I think the motive here is to move the static tables to one file and have the rest of the code in another. Because, the static tables itself occupy 1.2k LoC now and it is going to grow. So let's keep them in a single file to avoid mixing it with rest of the driver code. - Mani > If you really would like to clean up the QMP drivers, please consider > splitting _common_ parts. But at this point I highly doubt that it is > possible in a useful way. > > -- > With best wishes > Dmitry -- மணிவண்ணன் சதாசிவம்