Message ID | 20221018215755.33566-3-giulio.benetti@benettiengineering.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp12455wrs; Tue, 18 Oct 2022 15:24:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jZkK1yt7LMdjFrwKFPfTTCR5vDh74ZROu2lMXfrfVrlBdTw+6KdZ0MisgarX5Ol4yt8IO X-Received: by 2002:a63:2a81:0:b0:43c:5fa6:1546 with SMTP id q123-20020a632a81000000b0043c5fa61546mr4442824pgq.43.1666131878733; Tue, 18 Oct 2022 15:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666131878; cv=none; d=google.com; s=arc-20160816; b=C3z+remTET//bKbAVitlHIGRm3fkbCgG+5Vvo1UB5vla/QpAmL+WpCaToBWXRV1iTM pJM5/mMffiR1lmk49C+4Db/G4tPwZ4QTNGHHaxIGBgK0yDcidQeN6Mi2PCI5nabnhyDb 8fBvgvwb4WGecgkw9huG/vycVW5OOa6AhEiprLck+IfXEKK0JxilHmNV2k2RD6+1pcyO +WX6SmgT8jjRs60cs3EHIh0VcYeEZyleTZNRoSygkf0hZvaNWIsHPKTKQ7vszEWr5ED6 berOH0zXRIwvSwplayPZsJYL5Nxj1YyQJa0vSU6dutpksQYXcNEvpLsOL0W6ROcvayrL t3wA== 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=N4/y4kdfdrAfIe2654HuiSfDSBnmjZESgA9x+j0bl8o=; b=W2eCwrwmZfNBvqA4sY3Ea1mhBHwK5SXgPN+vU35NF11nRaFO/SBxWFGSeavvqVLaAD HVf5T3YgWQlzZQ9QLxd+P2gJPMPVII1NRdzbUSpG+y/G5pm3p5Koo6itWEYgkNo+ZVHm UfVzPf8D9PMyY2fR97DZmgRWmhl2s+iO3KNsBr9pYE1lGyTIcVNmCPcWMMqqts3cGPZr ++bL3xCUVdjau7pcaptXWSp7BdhN7Os6kFydVLMCCDXNnnpMHHsZMHNICOZb7SSNG6yR v43sYv3XtTV1IWqO4BOuUFYGud2tviRZJnYaAIzvnR527SD6Jqa5R0N5ysPy2X35BJ9d os4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=oCQr2GrC; 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 m70-20020a633f49000000b0042bd711f28bsi16249521pga.641.2022.10.18.15.24.21; Tue, 18 Oct 2022 15:24:38 -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=@aruba.it header.s=a1 header.b=oCQr2GrC; 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 S229763AbiJRWQX (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Tue, 18 Oct 2022 18:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbiJRWQO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 18:16:14 -0400 X-Greylist: delayed 1086 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 18 Oct 2022 15:16:11 PDT Received: from smtpcmd02101.aruba.it (smtpcmd02101.aruba.it [62.149.158.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4681D89931 for <linux-kernel@vger.kernel.org>; Tue, 18 Oct 2022 15:16:11 -0700 (PDT) Received: from localhost.localdomain ([146.241.87.206]) by Aruba Outgoing Smtp with ESMTPSA id kub2omqjesjaWkub4oJ4kc; Tue, 18 Oct 2022 23:58:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1666130282; bh=ZwhxLxF6g1lFuT2l3LTNGqDL0I52Ig9aGdGV08f+w3s=; h=From:To:Subject:Date:MIME-Version; b=oCQr2GrCqLrPSn7BIL2PUk6aMU0FvWCF7q6OCMNgpGsmEgtYnBfcai5q2R0ySoba8 Qpu5crxM3dY02lEKLLmx2lH/4/pozFGX37nXXxNe5Wo7pB0MzghKc00NTHPLBYI19S wo5ybgypogTbli7ikx4WpTygwulLb2mjtKuSdAjp1xZOybFiH5zmzw2hJJN/SuZcC6 ffkD0DMiVph2K0vjil8j1a5NOwTnAaQyvbr+0KJA7yZtJWmfHtJaqwaZ/iSRm7lLD+ hRTtMwhbBoPiVkBezezRWYoJZugA+VGj1arRzJ1opXWFgTAzbp8NAyijsVM5EqzlU2 8TfC8VH8aef/g== From: Giulio Benetti <giulio.benetti@benettiengineering.com> To: Arnd Bergmann <arnd@arndb.de>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-raid@vger.kernel.org Cc: "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Mark Brown <broonie@kernel.org>, Song Liu <song@kernel.org>, Giulio Benetti <giulio.benetti@benettiengineering.com> Subject: [PATCH 3/3] raid: substitute empty_zero_page with helper ZERO_PAGE(0) Date: Tue, 18 Oct 2022 23:57:55 +0200 Message-Id: <20221018215755.33566-3-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221018215755.33566-1-giulio.benetti@benettiengineering.com> References: <20221018215755.33566-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfLP2urURZfQFB1yAY55ub1PVpneyUyJ0CHOO3oG9A8j9epcn57H4WVK+0ow2sxVOxI/GMoQzCt3q4X9ONmIe6QPNrjBO+Pu3SC60MP1YHQ0YnsUZpEhs kppXUQ/W23tfU8VcLha7d6EfRUCpvKaOHPmyQj4oDi4PHXJfLl/k5083pJzmbwdKc4sab0oP9kM88PqZjhZbsLlb+7af01eviIlOVmxeQgtfNIrA3r9PtuCM 38tjmV0Rvf8iRqJg3GclatvHMBMastuttgrqZfWIM96yUj/bbZx904Tok7HVi5rbJdmxvhhuXBvEk7pWnsw5AWxBhQRPjCdEQ6cXU1ceWAVoh5EThxOy67mB pnnEoIHN8bPt1SahRnxY7XY5/eUQrxsFole9s6cvRinoSVA7CFTdnkRoCdSgP+BLnjunBjUbAYYXy3q/ZeO0JKDgENo5W0HDcs8Dm2KkEHiYJSE5ebUxorax jmzqjWu4h8c6iyQlNseXLWIrqT+vHcYeO934LA8PJ2Cc5l7QWNvLtXVfQR+EaO/VH7/VS9dA1FMmQ2yT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747065900662822253?= X-GMAIL-MSGID: =?utf-8?q?1747065900662822253?= |
Series |
[1/3] ACPI: scan: substitute empty_zero_page with helper ZERO_PAGE(0)
|
|
Commit Message
Giulio Benetti
Oct. 18, 2022, 9:57 p.m. UTC
Not all zero page implementations use empty_zero_page global pointer so
let's substitute empty_zero_page occurence with helper ZERO_PAGE(0).
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
include/linux/raid/pq.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, Oct 18, 2022 at 11:57:55PM +0200, Giulio Benetti wrote: > #if RAID6_USE_EMPTY_ZERO_PAGE > -# define raid6_empty_zero_page empty_zero_page > +# define raid6_empty_zero_page ZERO_PAGE(0) > #else > extern const char raid6_empty_zero_page[PAGE_SIZE]; RAID6_USE_EMPTY_ZERO_PAGE is never set to a non-zero value. So this is dead code and we can just remove all code related to the RAID6_USE_EMPTY_ZERO_PAGE case.
Hi Cristoph, On 19/10/22 13:00, Christoph Hellwig wrote: > On Tue, Oct 18, 2022 at 11:57:55PM +0200, Giulio Benetti wrote: >> #if RAID6_USE_EMPTY_ZERO_PAGE >> -# define raid6_empty_zero_page empty_zero_page >> +# define raid6_empty_zero_page ZERO_PAGE(0) >> #else >> extern const char raid6_empty_zero_page[PAGE_SIZE]; > > RAID6_USE_EMPTY_ZERO_PAGE is never set to a non-zero value. So this > is dead code and we can just remove all code related to the > RAID6_USE_EMPTY_ZERO_PAGE case. thank you for taking a look. Should I send a patch for removing the code in this v2 patchset? Best regards
Hi Christoph, All, On 19/10/22 13:00, Christoph Hellwig wrote: > On Tue, Oct 18, 2022 at 11:57:55PM +0200, Giulio Benetti wrote: >> #if RAID6_USE_EMPTY_ZERO_PAGE >> -# define raid6_empty_zero_page empty_zero_page >> +# define raid6_empty_zero_page ZERO_PAGE(0) >> #else >> extern const char raid6_empty_zero_page[PAGE_SIZE]; > > RAID6_USE_EMPTY_ZERO_PAGE is never set to a non-zero value. So this > is dead code and we can just remove all code related to the > RAID6_USE_EMPTY_ZERO_PAGE case. Here is a patch that removes that unused code: https://lore.kernel.org/all/20221019160407.7550-1-giulio.benetti@benettiengineering.com/T/#u and then makes this one useless so I ask to drop it please. Thank you! Best regards
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index d6e5a1feb947..2dd46f4c7318 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h @@ -17,7 +17,7 @@ /* We need a pre-zeroed page... if we don't want to use the kernel-provided one define it here */ #if RAID6_USE_EMPTY_ZERO_PAGE -# define raid6_empty_zero_page empty_zero_page +# define raid6_empty_zero_page ZERO_PAGE(0) #else extern const char raid6_empty_zero_page[PAGE_SIZE]; #endif