From patchwork Fri Jul 21 13:11:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Coardos X-Patchwork-Id: 13321971 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C362EB64DC for ; Fri, 21 Jul 2023 13:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ryx1XeOXqrJtb0gOtx2ZAl5grVOZ5O8W8yN9dbS2f10=; b=lrOpUlkoZmKyfP WxLx+bvKoPaBt9o56DfFE60CZGLl4zjJk0PrBBkseCTS1oG5W9ggk0KWA//Hjp2mM1DsufAjeP6ro 4KLyFpztJJeoMyXqu5A/ZCQyLB81qpXDbTlrJU0VfvouNWvdKV7eHL+Tn2rMzN0z6wBuy5mgp+zze ySzfBlEPbP04DcoYxfDreZkDw2Wghh/KfWqGjjwI5psULHqMGBjNq2Vr5ypeoBhntx3gy/Rs5AQzb M/h6S9ZwbhDqYExUqKpKr/e1xi6cGwYfsc3GIzUuu8T23rymfUR1NRfMmZsXd7r/7vfXMm6313cKP ySCi+4kv5KqO4GjkTTIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMpvY-00E797-2Z; Fri, 21 Jul 2023 13:12:12 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMpvW-00E78I-1t for linux-arm-kernel@lists.infradead.org; Fri, 21 Jul 2023 13:12:11 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-51ff0e3d8c1so2582299a12.0 for ; Fri, 21 Jul 2023 06:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689945128; x=1690549928; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FLOhJ2rJe0Qc3xeU0mPkMornHnJZ7T3VIe9SRIhazhc=; b=iAYToVXi/ijdwSzHq4d+wkebjmSC99gou5UMnv6zjGjRWP5bI4WTLBhrV1DfagTJan rDpCPIQDkKafttAfARGXZo3KEusmajti9zf90LyJQaP+J0S7Dg7RWFMtEASJMG153pdj 4WpNppMYg+TtP1WjEppm30Mfe3uE5AAJFSeWLVlMOHs6Q6AW7mUZlidmgpsF2zZwKfup 73h5RuuqzNROShZ18hPhOsF24CBNUdrVxZ2wF9V06+QwdnNQKu1uPIEceJZiVoxJSYHB xn1VKZmpdCHP/EpMUii91RdU/Mq3seN7RQUkVvOJnuAxpMbs2aJvs5WxS2rCTivvR3TM LXfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689945128; x=1690549928; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FLOhJ2rJe0Qc3xeU0mPkMornHnJZ7T3VIe9SRIhazhc=; b=cOyi6n7+T6Qnnl/7ETwulgtE6ovZixzUoj14xtrrxPVJlMmN6N9kGRNuX8JSE/1RUq m9gAVwV+RZMbBBcaZsst6lbwt7Qwl7sp6FzNkflP8+h4hXk8BOy/IRJ9bYwHkn3DBjEy uj9dHi+aK+039RJOUKXsQqZKlsJX44qiK6p+c+L3bJRVbVPJvkiKPil8tBraycTGngwq gnb4pBUD+kVFw2m5w0UhFk7EBwnrlJ0T+W5W56cEWbmlB/3a2VPrSRjzNNTT5nfbtSNx EMMS1Qoiv25K7STlBcLXl579ELgM9/r8qoqn+Z+nAGaCMha3Aq+KZJE1Ux/mASovMR94 Qf0w== X-Gm-Message-State: ABy/qLaW6duyCFl6yQwF8V/Eve0iaOCdFKhOg+PexFFKBdpvMQs/ifwQ B+xaB+6fUOpIrJzHI9Uj+Fk= X-Google-Smtp-Source: APBJJlGnJ2hbt7GQPk1lHcmsW/FH7OjoWu8mc2s6uhhRQv7d/aL1OvXGbjhQ3BAjZHskVuObr0dBdA== X-Received: by 2002:aa7:d618:0:b0:51d:b89d:9818 with SMTP id c24-20020aa7d618000000b0051db89d9818mr1412956edr.12.1689945128161; Fri, 21 Jul 2023 06:12:08 -0700 (PDT) Received: from localhost.localdomain ([92.85.190.61]) by smtp.gmail.com with ESMTPSA id t23-20020a05640203d700b0050cc4461fc5sm2104270edw.92.2023.07.21.06.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 06:12:07 -0700 (PDT) From: Andrei Coardos To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy@kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, romain.perier@gmail.com, daniel@thingy.jp, Andrei Coardos , Alexandru Ardelean Subject: [PATCH] gpio: msc313: remove unnecessary call to platform_set_drvdata() Date: Fri, 21 Jul 2023 16:11:57 +0300 Message-Id: <20230721131157.26640-1-aboutphysycs@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230721_061210_647286_0D53DF4C X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file. Reviewed-by: Alexandru Ardelean Signed-off-by: Andrei Coardos Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-msc313.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c index 036ad2324892..8e6835399d24 100644 --- a/drivers/gpio/gpio-msc313.c +++ b/drivers/gpio/gpio-msc313.c @@ -643,8 +643,6 @@ static int msc313_gpio_probe(struct platform_device *pdev) if (IS_ERR(gpio->base)) return PTR_ERR(gpio->base); - platform_set_drvdata(pdev, gpio); - gpiochip = devm_kzalloc(dev, sizeof(*gpiochip), GFP_KERNEL); if (!gpiochip) return -ENOMEM;