Received: by 10.192.165.156 with SMTP id m28csp835824imm; Thu, 19 Apr 2018 08:19:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/jR9W+tQJ8n69bX22OYk4v62e4wWNjREh2ezSx29f8137pUlmqf44kjQmwB6drgcsdNljr X-Received: by 2002:a17:902:9a49:: with SMTP id x9-v6mr6417310plv.94.1524151144929; Thu, 19 Apr 2018 08:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524151144; cv=none; d=google.com; s=arc-20160816; b=j7VGOO5FC2uzfMyOttZn0EVKD4Dyo66NNNPczz0ndNwie8zWCeYcRE1ejhdnIfFbuw /K1Y8O19DWhKQD0DBz6nj1XblhF+q18j0M5DfeawnxH1cLeMigr/4BSnaokdCn4dXXKH 66roh8vIcEkRbbwY9v9SITv4UOH5RmHKdcLD5OiWL7isLWrUfV6doPKfjAu7j/FHyea+ hgtqYWdMC815s+pNKdvutdpFBhTD6hzoo5xcZgy6GNq/lbADdLHtN7OVU+FFylZAgKaw 5Aj3alcfeUCr4OsyoNAfD6voEoZZLuYXphs9sHSovaoYVZk9Quc/0JuuQyVjoPMGXc1/ i6sA== 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:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=mPOgo/dByaoCTEYOsVdoywlzTDcgTu3qovDzbz3cYBU=; b=xhipovwRQ2CPA6aVRYo1o0HxF8Ik3xLZPJBKFGCk3QlAxwqQzKpoZVr5Qs+jYs/LhD iTfX0pYQVYp1ReRjPh+XTMRKGJCJg+/HWQPef4RgQ7mko7O2IdQfTnqRoXfZgGYbx06D uXqfdpwF3MwLv6nRYR4GWaW66T6BA4A6c6JlXzJlDGqlUNROtmGI8xnQYPEbrApWwF1g 5/h68DhbVHkvZvBZKWUnW9Y0upn1tq3qeoJ7+icwky8/TCoPTjP6bx5t8FOwQFkEuIYM 01XAIVndXDs2jhAiJbyRcJh3asbPAwwWl/RAgcKDXh3l/NeCNXIl3lB/NZqiOqllkbwc /9ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZTjVEvD8; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZTjVEvD8; 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 y7-v6si3640445plt.287.2018.04.19.08.18.51; Thu, 19 Apr 2018 08:19:04 -0700 (PDT) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZTjVEvD8; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZTjVEvD8; 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 S1752986AbeDSPQe (ORCPT + 99 others); Thu, 19 Apr 2018 11:16:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55006 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbeDSPQb (ORCPT ); Thu, 19 Apr 2018 11:16:31 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 79ADE60A06; Thu, 19 Apr 2018 15:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524150990; bh=wBrtEf/7Hhxodkh9uTetfYcm5BklyxN83i+mZO7crTo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZTjVEvD84oAq6J0okzC6fts1hCKdGXDXh8tdFT1URTWQ/7blqGiFuXs0GOmuFdnRC h17E7Tq0T7ZHBz8d6YBV5Ox3whMSc8ISlbNe34Y0TAnxlLcAvxyenos8xhISLJThQh GQueW9VccrzSkZ/U0K59NDzZYPhmBtpx9tHT5Elc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.150] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2589760500; Thu, 19 Apr 2018 15:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524150990; bh=wBrtEf/7Hhxodkh9uTetfYcm5BklyxN83i+mZO7crTo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZTjVEvD84oAq6J0okzC6fts1hCKdGXDXh8tdFT1URTWQ/7blqGiFuXs0GOmuFdnRC h17E7Tq0T7ZHBz8d6YBV5Ox3whMSc8ISlbNe34Y0TAnxlLcAvxyenos8xhISLJThQh GQueW9VccrzSkZ/U0K59NDzZYPhmBtpx9tHT5Elc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2589760500 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH 09/61] dmaengine: qcom: simplify getting .drvdata To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Andy Gross , David Brown , Vinod Koul , Dan Williams , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, dmaengine@vger.kernel.org References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-10-wsa+renesas@sang-engineering.com> From: Sinan Kaya Message-ID: <0d22fa16-1511-33ed-363e-fc42e4287aa0@codeaurora.org> Date: Thu, 19 Apr 2018 11:16:26 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180419140641.27926-10-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/19/2018 10:05 AM, Wolfram Sang wrote: > We should get drvdata from struct device directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang > --- > > Build tested only. buildbot is happy. Please apply individually. > > drivers/dma/qcom/hidma.c | 3 +-- > drivers/dma/qcom/hidma_mgmt_sys.c | 6 ++---- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c > index 963cc5228d05..43d4b00b8138 100644 > --- a/drivers/dma/qcom/hidma.c > +++ b/drivers/dma/qcom/hidma.c > @@ -616,8 +616,7 @@ static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg) > static ssize_t hidma_show_values(struct device *dev, > struct device_attribute *attr, char *buf) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct hidma_dev *mdev = platform_get_drvdata(pdev); > + struct hidma_dev *mdev = dev_get_drvdata(dev); > > buf[0] = 0; > > diff --git a/drivers/dma/qcom/hidma_mgmt_sys.c b/drivers/dma/qcom/hidma_mgmt_sys.c > index d61f1068a34b..cbb89eafd844 100644 > --- a/drivers/dma/qcom/hidma_mgmt_sys.c > +++ b/drivers/dma/qcom/hidma_mgmt_sys.c > @@ -107,8 +107,7 @@ static struct hidma_mgmt_fileinfo hidma_mgmt_files[] = { > static ssize_t show_values(struct device *dev, struct device_attribute *attr, > char *buf) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); > + struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); > unsigned int i; > > buf[0] = 0; > @@ -125,8 +124,7 @@ static ssize_t show_values(struct device *dev, struct device_attribute *attr, > static ssize_t set_values(struct device *dev, struct device_attribute *attr, > const char *buf, size_t count) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); > + struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); > unsigned long tmp; > unsigned int i; > int rc; > Reviewed-by: Sinan Kaya -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.