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 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 D28B4C001DB for ; Sat, 5 Aug 2023 18:31:27 +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:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=weKl8A2AqQrZ+J203v1ZWTRG4lQx4fXy89iGL4pQbuI=; b=mcq/rixDgDuz0r f9KOy+LGp98yjQ4XBNQZn0gT6+WJEJr0tRFe9fACl27eLU24er2lVq5vHOINqk3nZRuIAvOtv5rwk 700iwBfMrAvfj4byN0awGI/osPKxNeHFuuhxEQJ/0nBCjSLhAQzxcMKCgdBkeCbCj5vUTZN9PiPcY UEuncWemPyOxjAMZsPuCxay9FAVQBX6Wsu5/D3nbsyY6jSLloLgryGsTkoYb8D/oQzMT0B50z1rkJ OQrWhnO8NlBaFf0BX5286UVkxIys1nN9fJK6G9Omk1jlKuQA+U05R72NhdpN9VSAV2y8wahnKyEXK 8udcxcQIGJIoWQoUJGIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSM3Q-00ESXe-0M; Sat, 05 Aug 2023 18:31:08 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSM3K-00ESWv-16 for linux-arm-kernel@lists.infradead.org; Sat, 05 Aug 2023 18:31:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5357060DEB; Sat, 5 Aug 2023 18:31:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C6F2C433C7; Sat, 5 Aug 2023 18:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691260260; bh=8A0dIW8Ncx95axIcP4Bjov5VDnhG33vLjWhpY8dE0f4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i5PiXd4rnGVWyam+yeyRvqSbBy3qYS7ih/44/RmHm2/i2s143mEYoP33L7gw8s7wy OOSTE/BRpZx5rRk3GrKogKm+fHMTc95gdpl5Z+gLtyOIAz/2lpr0zKSGu1I5Tphauh 1jJaStj2FWU5/6DSrabMJe/8M3H/dNCmL/h0fqAuqK3ozaDcXWsBPsTHJ2OwrTxjsn Cn2IhSjU+iJNBwb4KRkV/OP8ilu5COn1KNfLDuoaWvPHpXdHYv5AXaCCt7yduvSKJ1 sX2ZqPsH1bl8DJDr+VLIIx72d7IPCfVJWMmIU4BNmLyXvcCEM/XCbqdZvm9hM5DKI/ nmA4Gw5RZdd1Q== Date: Sat, 5 Aug 2023 19:30:52 +0100 From: Jonathan Cameron To: Andrei Coardos Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-iio@vger.kernel.org, alexandre.torgue@foss.st.com, mcoquelin.stm32@gmail.com, lars@metafoo.de, Alexandru Ardelean Subject: Re: [PATCH v2] iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata() Message-ID: <20230805193052.690c87e8@jic23-huawei> In-Reply-To: <20230802133509.29381-1-aboutphysycs@gmail.com> References: <20230802133509.29381-1-aboutphysycs@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230805_113102_443589_309A4777 X-CRM114-Status: GOOD ( 23.01 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 2 Aug 2023 16:35:09 +0300 Andrei Coardos wrote: > 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 > --- > > Changelog V1->V2: > > * https://lore.kernel.org/linux-iio/CAH3L5QpuoDYU6qvWH7_z5Yx0cW2qPMbCA8AFEYAPsiEkSzCiwQ@mail.gmail.com/T/#t > * Adjusted the returning values of the function > > > drivers/iio/trigger/stm32-lptimer-trigger.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c > index df2416e33375..ab1cc6a05f26 100644 > --- a/drivers/iio/trigger/stm32-lptimer-trigger.c > +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c > @@ -88,11 +88,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev) > priv->dev = &pdev->dev; > priv->trg = stm32_lptim_triggers[index]; > > - ret = stm32_lptim_setup_trig(priv); > - if (ret) > - return ret; > - > - return 0; > + return stm32_lptim_setup_trig(priv); Both of us failed to notice ret isn't used any more. Anyhow, I cleaned that up after spotting the build warning. Jonathan > } > > static const struct of_device_id stm32_lptim_trig_of_match[] = { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel