From patchwork Tue Mar 4 17:05:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 14001242 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 B98EEC021B8 for ; Tue, 4 Mar 2025 18:30:53 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3YUs05DhFs+LgAiWCc16LXWwILhsHrllKlQ8YfVHzKU=; b=1lfEqAN2qmmk/n DcOyjQkhZgRkRYg8M4HrMsD76Ampr7TBMwMztcQgylTg9sX/ZmVZSltNg5u+aSe7uXVotTYKbBPA9 Wm7ULD1eRjOmOmmmUV/odTdfekrXa/uTlZs8v5wOExc9gLs2N6CvM8D4vfz0NZY/wRwPPk9LyENgL wqS0kBLpuD8a0IfXQcyOtTHM0hfWt4oNm4aDKCcPI+Rcv0ZSjU62gDgsubWuYQPTGO7re5FLsUlDD 9kBMZhVGfLMeYzrzWHPOX0wcr0lAkbqRXFZThxVp9rA6jfWRls/A7j0LhFgS5ab4Qh4o9Uhd1fL1K A8iy80LXp/eT1SCkwAqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tpX2Y-00000005r8Y-2Kr4; Tue, 04 Mar 2025 18:30:50 +0000 Received: from mail-ej1-f53.google.com ([209.85.218.53]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tpVi4-00000005YAI-2uDh for linux-amlogic@lists.infradead.org; Tue, 04 Mar 2025 17:05:37 +0000 Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-ab744d5e567so998009266b.1 for ; Tue, 04 Mar 2025 09:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741107934; x=1741712734; darn=lists.infradead.org; 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=D0DbxfKxGvd2WW4HNIqxG+j4XJyJfuCMmLSYkWj7Rsc=; b=HTuCJfvYaW9iA83wrLWbMwOiDuSHeyh5f9M/YtpHhTlbmmxFU7cwQAzrGRKrd6Exy2 y0vqpA0FEy+S/s3m7J55BNJYwvfWbfswWokElsu2AZXYM3AsI/hRSPBMd6uIOxQrMVcF Lyau/ot+g1MEs1OEp0DK36K7/Bfx4PLVVyvsY2iqS6AqvjVsaSknz6dAJ/hNyvLvuc8p fvp/dQqE9dr9uy31S8RJlbyfHg9XIDR8ewJRxNHfo73Q8Vy7ehEc9SthUahmTF0o9EHC LTR5BbZxcrnaIBbmnY0ZEx4qDXt3/dunkL3ZkIM9c1N4SNmMPqpzlm61GB/0gUWxtC3u lDrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741107934; x=1741712734; 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=D0DbxfKxGvd2WW4HNIqxG+j4XJyJfuCMmLSYkWj7Rsc=; b=tMQt1xZ7IIshHCUstzIVmBbijSdli6VqPO69IFlk8XCilrUYn3qcuwnrmSvTQEvJLt fRXq071FsSmQM+jOrr3VjZ3m3enfWRIVDNFeSg3NmmVhWOBihnN0CsK4rV74Y84E5Tfq +0yAamQZfRemX6p7rVjh12JdvdsEIo6gbw4hTFvm/7skutHh12cuN3WT1oE+SuFj3rBo fBtJhGbAqvStXJs0JUIHNPJKm2QF3Yhk7jzWQRTpB7PMJHZmq4I1l22TP7gCtEoBK4UT CCey/P0ko7CT/5KA6N/e34jTDrZIahwskDGOny1IhkeCj91MYAUVlzLTVUqpOzCgRjjW XayQ== X-Forwarded-Encrypted: i=1; AJvYcCWf8JMNNVU0E0jGBwKCeTZ0s72+gh2roPYZpQMXh17zDFzHGNcZ3m5rKBLhSKS52DWVSy58KV+nFfj0ELcI@lists.infradead.org X-Gm-Message-State: AOJu0Yxpcst5a+q1AVEBaJFs+uCmLjYtadRycFhZnpRjOQlkpZsMdQkc LisXoYST16J4J9j5g5bTpWbPXzsRcx+7eqaFf5JeHrMb6GYTWb+S9uJ7E6EcBuE= X-Gm-Gg: ASbGncsYZQAWkowI2uY9ZzW0sWTneoVI8vbCP7Z/uL1YYLjeBsCtqakkMs2Z3utCzmb p/R5oqLg8hczVnFH3wV1EcrLOPT+O5sf2ma2/MC0hQe+LXPz552+sHI0cpGwlv0R0D3TuyCluJ4 rLrx0yKewJvN/Zm4m6t5XbuZxRdrTmTvixccFxGgqipa2nU5MhCJ47jOqK64sI36c2BrBTkfrs/ paKHhZa8Zhdw+oEdspXFbNO8reb+YPrzAzTS5paMYLLniPif8UJDFnV16Nm4LYpKo/uJjiPyA1A 4G57fHhqfirj5V9XEV7X82oHtI2LZFH84WncNmK84s2I2CZu0eQITOyL0LZnC3RmUdO8G3QaqKL R+L3+wjaWT3oeSjLZbPhYe9AWye4v X-Google-Smtp-Source: AGHT+IGsdjvAcycMp31oFEdsdwWFqJQmXbxtDBoL5DRz6SC3HgSNRmbkL1ZXNDzmFm2b5aF1OyYNnA== X-Received: by 2002:a17:906:c150:b0:abf:4a62:6e5b with SMTP id a640c23a62f3a-ac1f0e60023mr427555766b.5.1741107934486; Tue, 04 Mar 2025 09:05:34 -0800 (PST) Received: from puffmais.c.googlers.com (30.171.91.34.bc.googleusercontent.com. [34.91.171.30]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abf795ba15esm367589066b.131.2025.03.04.09.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Mar 2025 09:05:34 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 04 Mar 2025 17:05:33 +0000 Subject: [PATCH v2 05/16] rtc: ep93xx: drop needless struct ep93xx_rtc::rtc member MIME-Version: 1.0 Message-Id: <20250304-rtc-cleanups-v2-5-d4689a71668c@linaro.org> References: <20250304-rtc-cleanups-v2-0-d4689a71668c@linaro.org> In-Reply-To: <20250304-rtc-cleanups-v2-0-d4689a71668c@linaro.org> To: Chanwoo Choi , Krzysztof Kozlowski , Alexandre Belloni , Joel Stanley , Andrew Jeffery , Hans Ulli Kroll , Linus Walleij , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , =?utf-8?b?VMOz?= =?utf-8?b?dGggSsOhbm9z?= , Dianlong Li , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-amlogic@lists.infradead.org, llvm@lists.linux.dev, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250304_090536_729964_1639B372 X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The memory pointed to by the ::rtc member is managed via devres, and no code in this driver uses it past _probe(). We can drop it from the structure and just use a local temporary variable, reducing runtime memory consumption by a few bytes. Signed-off-by: André Draszik --- drivers/rtc/rtc-ep93xx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 1fdd20d01560ef4fae2b996cf366b4f812329225..dcdcdd06f30d1ff6d0939f6bcad2c17c03c5a65e 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -28,7 +28,6 @@ struct ep93xx_rtc { void __iomem *mmio_base; - struct rtc_device *rtc; }; static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, @@ -123,6 +122,7 @@ static const struct attribute_group ep93xx_rtc_sysfs_files = { static int ep93xx_rtc_probe(struct platform_device *pdev) { struct ep93xx_rtc *ep93xx_rtc; + struct rtc_device *rtc; int err; ep93xx_rtc = devm_kzalloc(&pdev->dev, sizeof(*ep93xx_rtc), GFP_KERNEL); @@ -135,18 +135,18 @@ static int ep93xx_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ep93xx_rtc); - ep93xx_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); - if (IS_ERR(ep93xx_rtc->rtc)) - return PTR_ERR(ep93xx_rtc->rtc); + rtc = devm_rtc_allocate_device(&pdev->dev); + if (IS_ERR(rtc)) + return PTR_ERR(rtc); - ep93xx_rtc->rtc->ops = &ep93xx_rtc_ops; - ep93xx_rtc->rtc->range_max = U32_MAX; + rtc->ops = &ep93xx_rtc_ops; + rtc->range_max = U32_MAX; - err = rtc_add_group(ep93xx_rtc->rtc, &ep93xx_rtc_sysfs_files); + err = rtc_add_group(rtc, &ep93xx_rtc_sysfs_files); if (err) return err; - return devm_rtc_register_device(ep93xx_rtc->rtc); + return devm_rtc_register_device(rtc); } static const struct of_device_id ep93xx_rtc_of_ids[] = {