From patchwork Fri Dec 23 15:38:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 36293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp383672wrn; Fri, 23 Dec 2022 07:39:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXvHncl6VodnG7DUan4TYX0IB/Id4Js7Ej0EirBqbLteyZY44+gQRf9iyaMAvbElMc0Bdpyy X-Received: by 2002:a17:907:c789:b0:7c1:6e08:4c20 with SMTP id tz9-20020a170907c78900b007c16e084c20mr8492411ejc.7.1671809964069; Fri, 23 Dec 2022 07:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671809964; cv=none; d=google.com; s=arc-20160816; b=ELo9jvi2W+YCUY9eBKl6Xys0lTqb4fwPEqFhzUz+HX3fUFJm6Pow8B19dKNb/SuBKQ FuEVQgAYho+FCBQhwQX+zrkU//2imGJiO0R4jFpminN19qmRnK30jFEqa6RkyQROSZyf ZswmUby9hViycieo+1HktFI3hIiHMRO8MSp+up6dubZoyq6VKFKA9Sb0SQMZDLBh07qC XmL7Js98KYCBox8ZlUCzNi6y4VcZwx8dNNEU+uh2y2IK2z3Gwd5q1QSEgmAUMZmzeEen EnKb+s5g9XU58zXBfmBfice6s8QrCwvVYaCwXWyZr7G7GNeEsyHY9ONdr+qYdSLgB13Q b6lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BEOpRioXienSDDf6vjruAkPlsDKDhUNbn1dmZioZ4X4=; b=ZLfgd333Z02zTKgTex1/3xjvFMq/MWDlH6hKqVnAdDOf/xRE/UXf2Dy3Hb6VlQrdvo Ymvuyr6zJTp867QUDt8W9UzlvASncqT3G2jMakDFT8cwxdyEipoaU0Xavvoznv+NiIbo YQGlX+DYIDIgqlezZ9YdK6bMQlUv7dr1Ry8Ljc0YJRaS5bH6j0Pqk7/P7kFQZKoy5KDO 4t1+chDeE9xDa3TlVeT29MDB7iPrYVnNCJGSort200rnsubDmgWmGWBHa3hdBUkd2Kno OZPmYcwIUW/dFC1Qd67MVi5akavx9hMHHudR0QlqAdaKA/DwgNiOO4QHqpXkonvOpnFs L2TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=OyISZS7Q; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn38-20020a1709070d2600b007c10ac7fe46si3019743ejc.19.2022.12.23.07.39.00; Fri, 23 Dec 2022 07:39:24 -0800 (PST) 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=@sifive.com header.s=google header.b=OyISZS7Q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236527AbiLWPik (ORCPT + 99 others); Fri, 23 Dec 2022 10:38:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236362AbiLWPi2 (ORCPT ); Fri, 23 Dec 2022 10:38:28 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9842A37F91 for ; Fri, 23 Dec 2022 07:38:27 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id y8so4872668wrl.13 for ; Fri, 23 Dec 2022 07:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BEOpRioXienSDDf6vjruAkPlsDKDhUNbn1dmZioZ4X4=; b=OyISZS7Qk9t7+FnnDQ85qmPH7Q4kMXOvDS6K7Si+TuKJPmpWpRQD9zlJpYs7Cer2qJ ZFWrUq5ffQhuCEUDwNmKHeBVDFGgUnAJ3dzhKehZSCDEVNgEFAyhMbh6uxEmibNX69xh mL/SAQxcGmilpqWniAHf9b1v2Xw1bnW2pFHaprzQJCJxiEWePQ2LxYfvvR2LeKQsaFkY mci5j1/yweXaePewHVd19jqt1Bq5eipQDJxL8YroiK1WCEYdfYOIRIcOdttunVCQeGmA QHQgusV1tfMJzNFsF/gjdUv1k5m/hKln05peunk2G4Cao2iESlgYVIJorK6C5Axh5U4H ilWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BEOpRioXienSDDf6vjruAkPlsDKDhUNbn1dmZioZ4X4=; b=0rCIPtOhvjLNlLTRHI+lOw8QtUyA9lQ52wQ4m70g9IcC8E5EmoVKqe0TvSmn1ZtIln +3kNnTbbbyRuZ7ukWsZatzYUhhD+QFAWJ39esxuw3xCDvs2IT2lJ+lErGmlWCGpB84JK RHfeTBv7PW1r2pAmlI7hqAo+a3/p3v3P494lRsElbx8ga+kZzGheM81k5ZhVXNgutDO2 CBLMqoCCemWoCkuieIqP3TKFVqP46xr5EipOlQYzPvEHi6V76vce+mPDAKOI2WaFB59t PGtWOhNA4Dp0Nn+8GzOKAh0eISsmKXz/n3Uq8caCscHgflnVstyr3ON4LatLKtVqP2Rk /p6A== X-Gm-Message-State: AFqh2krs4ff6q3WUBdYxpej8xHVaQe70gdr+K3W3NzLZkQa6oh54hscM R3we9LXBpMKKIXRyRNHcX43RmD6z7BAAOH8R X-Received: by 2002:a5d:5d8a:0:b0:274:fae4:a518 with SMTP id ci10-20020a5d5d8a000000b00274fae4a518mr1697816wrb.11.1671809906235; Fri, 23 Dec 2022 07:38:26 -0800 (PST) Received: from rainbowdash.. (cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net. [86.15.83.122]) by smtp.gmail.com with ESMTPSA id m5-20020adfc585000000b00236488f62d6sm3491610wrg.79.2022.12.23.07.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 07:38:25 -0800 (PST) From: Ben Dooks To: linux-pwm@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , u.kleine-koenig@pengutronix.de, Thierry Reding , Krzysztof Kozlowski , Greentime Hu , jarkko.nikula@linux.intel.com, William Salmon , Jude Onyenegecha , Ben Dooks Subject: [PATCH v7 03/10] pwm: dwc: change &pci->dev to dev in probe Date: Fri, 23 Dec 2022 15:38:13 +0000 Message-Id: <20221223153820.404565-4-ben.dooks@sifive.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221223153820.404565-1-ben.dooks@sifive.com> References: <20221223153820.404565-1-ben.dooks@sifive.com> MIME-Version: 1.0 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 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?1753019805310427118?= X-GMAIL-MSGID: =?utf-8?q?1753019805310427118?= The dwc_pwm_probe() assignes dev to be &pci->dev but then uses &pci->dev throughout the function. Change these all to the be 'dev' variable to make lines shorter. Signed-off-by: Ben Dooks Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-dwc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index 7568300bb11e..c706ef9a7ba1 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -202,14 +202,13 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) struct dwc_pwm *dwc; int ret; - dwc = devm_kzalloc(&pci->dev, sizeof(*dwc), GFP_KERNEL); + dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL); if (!dwc) return -ENOMEM; ret = pcim_enable_device(pci); if (ret) { - dev_err(&pci->dev, - "Failed to enable device (%pe)\n", ERR_PTR(ret)); + dev_err(dev, "Failed to enable device (%pe)\n", ERR_PTR(ret)); return ret; } @@ -217,14 +216,13 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) ret = pcim_iomap_regions(pci, BIT(0), pci_name(pci)); if (ret) { - dev_err(&pci->dev, - "Failed to iomap PCI BAR (%pe)\n", ERR_PTR(ret)); + dev_err(dev, "Failed to iomap PCI BAR (%pe)\n", ERR_PTR(ret)); return ret; } dwc->base = pcim_iomap_table(pci)[0]; if (!dwc->base) { - dev_err(&pci->dev, "Base address missing\n"); + dev_err(dev, "Base address missing\n"); return -ENOMEM; }