From patchwork Mon Apr 17 07:55:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 84047 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1957220vqo; Mon, 17 Apr 2023 01:11:22 -0700 (PDT) X-Google-Smtp-Source: AKy350Zttu19iVTQXGQB6zR8lkk0Ycl5OLpPSR0Vh0BjNL6hl/RMNMkehv7XhC0Oy0UTysuHj0F9 X-Received: by 2002:a05:6a20:69a8:b0:ef:abaa:741b with SMTP id t40-20020a056a2069a800b000efabaa741bmr3602298pzk.7.1681719081857; Mon, 17 Apr 2023 01:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681719081; cv=none; d=google.com; s=arc-20160816; b=PHBuikHJPqjKLIKsXK6qYhFChxmrlNWgorKyjmwXWxAOr5MPMXsyxJhp9y85/fLaZw oSjl7VKQ7Wl8+ni8y4KtaV2ZSpW09FnTAZ2bJwQuPGRteAjwHYm2Tk9dhZWzbHF/DoUu KiEehf4AvZ0DJfuKktF9kx00c5wgIapIdaGQM50qH/LeqVafaxpbpVUWO92xsVUv70IX n3l+tdiEPStFxaG8DYA392opAvlgwBw/9srqgsLwJ4JVV3Zd/KcsbqmESKIFSQdqQBUG j1ktetJEzxd95V963WUXbrbAyyybmAP51i2s6aIJwe/jVsq3GOOaljrMiVTzpf+IwoQs fMkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=WctxKpomw5MLFuTazOUJElliLOUHb46B+NNI3oGGJOk=; b=UaTF9YKrUmiYnwWKHbFG9QRhoNrEyJkpL2fZuM8j7nJi8UdSqf5vxLG35eKYJPRMdp UrD3J4pjupEd8ZpprIfQTSsXnG6eP/xNKVZWLhloyOGxbiKuVjeN0Kd4M4psSGicMbyw VIiqMVdE7t7zmOpOzlRIyNRiOZ5T9VAH/ODkTStRpXcTM4DsmKBkXAh5zbleEsH2EZNe 8ACnxPNoHkMPimGb34nApr3VMrUp2CXavwXwbVvUGF4WsrY9K1faLwNezQ89yNmThviv K4mkMKiTZ4Xg1gbhORtBbaVqKDYI+KRfDieddBzXGx9lZ/C7P7bZ9Ayyi7nvAoRvSvQn Ij9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nrm3vCoD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a656110000000b00519b9bfd43dsi10287647pgu.480.2023.04.17.01.11.09; Mon, 17 Apr 2023 01:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nrm3vCoD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231239AbjDQH4a (ORCPT + 99 others); Mon, 17 Apr 2023 03:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbjDQH4C (ORCPT ); Mon, 17 Apr 2023 03:56:02 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5933C35 for ; Mon, 17 Apr 2023 00:55:59 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4ec9ccab8bbso1203365e87.2 for ; Mon, 17 Apr 2023 00:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681718157; x=1684310157; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WctxKpomw5MLFuTazOUJElliLOUHb46B+NNI3oGGJOk=; b=nrm3vCoDnCsGk5roNJOkOPJb/qrgzSDL7HZTpjuS0DYFM6k0XGk3ilID4Iatv3LMvT U8XRVJCyLpQPX9QHRfpxzhPr+M0L7uNCX/jXSFPGuAct/7na75uNhvspwNSp+NPOOgy2 c5sf/zmkK6CZ4sSFs4FPA+pTrK5+A6eQfN2XMWFzbyvyf0fKZzzaenFoeKS3LNFBdHez 7Cpjj8F9/dvQDjk24cKykEUjvRQCrPGJwkXmFFL2E04fQ0gOv9h34nIfWleyj3Q+tie1 6lbhupaT40ktTPvKuE2LOCfoE9spvTMDf8WK04iGb50AQ3vq605S/bKk3klAWPhdAT0S muzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681718157; x=1684310157; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WctxKpomw5MLFuTazOUJElliLOUHb46B+NNI3oGGJOk=; b=AeMrAki204gDmn8vN1n6uOxBRj+ZrujHqPF4t2OP9lXi+YCVyPxfuaxrFN3Ej5NNEa fLOj5OkOGtnoQwidvSdlsFW8Sml9yfMImM9m5l8+4EsdnXd4cMydaJLF8/pu08hEXsMI O6kYf7KPm2IPmgFr25qJlpAz7wsdIOzxwsZb636QRMwZz7FtCbWiX1rprpXF1FcKmTAI GlZHts+tXXNcINRBpki+5gMXVmgNct9P1z7Cmp9MqzjnkIshvuOC7RMDP2QL2BIgjwA2 d5PkLW+tuTb5Q+FLe0X4IK5bCIK6je0CjMxArpgG60570wwpe963BiWk+SNZbdCISiVk I2fQ== X-Gm-Message-State: AAQBX9e/mpuhfOuzcwxVSbRRsA3kQ9uUI2zNazWhoLOeD4axreZXF/Z2 2KaNrP19wHk4DMywRDD5rGlInG+ZhAgavj+fuIo= X-Received: by 2002:a05:6512:924:b0:4eb:274b:a69 with SMTP id f4-20020a056512092400b004eb274b0a69mr2163114lft.26.1681718157639; Mon, 17 Apr 2023 00:55:57 -0700 (PDT) Received: from [192.168.1.2] (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id p2-20020a19f002000000b004eb274b3a43sm1952547lfc.134.2023.04.17.00.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 00:55:57 -0700 (PDT) From: Linus Walleij Date: Mon, 17 Apr 2023 09:55:50 +0200 Subject: [PATCH 5/7] dmaengine: ste_dma40: Pass dev to OF function MIME-Version: 1.0 Message-Id: <20230417-ux500-dma40-cleanup-v1-5-b26324956e47@linaro.org> References: <20230417-ux500-dma40-cleanup-v1-0-b26324956e47@linaro.org> In-Reply-To: <20230417-ux500-dma40-cleanup-v1-0-b26324956e47@linaro.org> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763410267679205777?= X-GMAIL-MSGID: =?utf-8?q?1763410267679205777?= The OF platform data population function only wants to use struct device *dev, so pass that instead. This change makes the compiler realize that the local platform data variable is unused, so drop that too. Signed-off-by: Linus Walleij --- drivers/dma/ste_dma40.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index e5df28cdc4c8..fe98f12b8130 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3480,14 +3480,14 @@ static int __init d40_lcla_allocate(struct d40_base *base) return ret; } -static int __init d40_of_probe(struct platform_device *pdev, +static int __init d40_of_probe(struct device *dev, struct device_node *np) { struct stedma40_platform_data *pdata; int num_phy = 0, num_memcpy = 0, num_disabled = 0; const __be32 *list; - pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; @@ -3500,7 +3500,7 @@ static int __init d40_of_probe(struct platform_device *pdev, num_memcpy /= sizeof(*list); if (num_memcpy > D40_MEMCPY_MAX_CHANS || num_memcpy <= 0) { - d40_err(&pdev->dev, + d40_err(dev, "Invalid number of memcpy channels specified (%d)\n", num_memcpy); return -EINVAL; @@ -3515,7 +3515,7 @@ static int __init d40_of_probe(struct platform_device *pdev, num_disabled /= sizeof(*list); if (num_disabled >= STEDMA40_MAX_PHYS || num_disabled < 0) { - d40_err(&pdev->dev, + d40_err(dev, "Invalid number of disabled channels specified (%d)\n", num_disabled); return -EINVAL; @@ -3526,7 +3526,7 @@ static int __init d40_of_probe(struct platform_device *pdev, num_disabled); pdata->disabled_channels[num_disabled] = -1; - pdev->dev.platform_data = pdata; + dev->platform_data = pdata; return 0; } @@ -3534,7 +3534,6 @@ static int __init d40_of_probe(struct platform_device *pdev, static int __init d40_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct stedma40_platform_data *plat_data = dev_get_platdata(dev); struct device_node *np = pdev->dev.of_node; struct device_node *np_lcpa; int ret = -ENOENT; @@ -3544,7 +3543,7 @@ static int __init d40_probe(struct platform_device *pdev) int num_reserved_chans; u32 val; - if (d40_of_probe(pdev, np)) { + if (d40_of_probe(dev, np)) { ret = -ENOMEM; goto report_failure; }