Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1239891rdb; Fri, 20 Oct 2023 12:22:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGnBF5rSmT6gg791II3wlFRMUH/sqn3GyVarUodhrcQJsdxVLtmZMY++I9VL6x8r/xa9AL X-Received: by 2002:a05:6a00:21c7:b0:690:c75e:25c8 with SMTP id t7-20020a056a0021c700b00690c75e25c8mr3202610pfj.7.1697829765786; Fri, 20 Oct 2023 12:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697829765; cv=none; d=google.com; s=arc-20160816; b=oGBGHT5TkeTh6BOaAQAtKKD0y76hxS0Ef6cf6ma6/ti5AaI/AhXL2U8OPrkufZ76yt Kvc/hzo3zQLULa78Ej/spxECw3ErYckqcc6pvSfh3SlN4xA7BsITDnUglt8xy04rGRnb 5ZZjuXpLj865tjq/4H7Q4C+V4oq4cYYecTg4RHoVQYqcwlPQKQpWrADvLXD23FykOEZR kKg2MJ6ya+ccPxVihoSGJzLlPZaCMJR/U7LnGhE3M1N0s5mHCaz6Rt0nsg247hrDxBA6 IKxa/xn3FWGUY/WwnaDm03gG3ABpu+NeO2GEYtfwEWisafEgKzUfH6gPiWGnOB2JFrS7 xh8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=mhwaY714pmmJodfkJbhWejTB5KjKjLUwZhhxjHaw+K4=; fh=InAQUjgxRCzqSNW9g11z3JHPRQV1BqsQDuZzXHaBjSE=; b=vwKPXMqGVobnboT3P+280kSAen/Sxwh5DvhpEtGIPVr2XVbVSO9FxBkmhkXmBUKVl8 6nwaUOQMQUzVW7373EDuuVL58NrFgYknHgIeKD15H92QbH6vlBkUg+/FNedoVP3LeoZP izHe+bDglK8lH+ePL/1O8tDRuuwghh+SUXOSZPjL3OGCuRlaIvz/mmapN7vZG7RgKGLj 5aeqqWwWyRKlBPtWnLrowZRrv4/UFS0DJrVlhFY1mfvAyJfIXoJbE9TI26tuSptSrFv7 DEujwYT8TsVNDePQBnyjQxIUOuqDliJ1TPXhydBThNNX5h2lz1ARPZOvceLDqeEoQyAI KegQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=odQm5THC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u28-20020a63b55c000000b005b0545c6384si2402266pgo.77.2023.10.20.12.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 12:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=odQm5THC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 12F038301035; Fri, 20 Oct 2023 12:22:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbjJTTWP (ORCPT + 99 others); Fri, 20 Oct 2023 15:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbjJTTWL (ORCPT ); Fri, 20 Oct 2023 15:22:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A0A4D41; Fri, 20 Oct 2023 12:22:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FC81C433C8; Fri, 20 Oct 2023 19:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697829729; bh=tURciTQclBfgEIbO47BJ7qrPj5Gyb3NVEPoOlslHMzM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=odQm5THCIczSy3qQHKgscLkiFBw00Ekbo2mzdQf96X5KdbdJUMbO0AtEIVwMiCTcr B1PMTsYqwd2tGwRK/8pO3c8GHlFJFQbC9HWxogQtxKO7r+0T+eaB046bTk+5+dRzpA f+Lk3+WmFrbVqcy9qM/++UYniBvi+Bh5kRZ3QIBP/hLmfTlJSWUUIF3pBrrU4lczSt /Pt/Ew3srWcfzUA+/1RSfDuUnE/QUnC/7zawcQfFvBS8TR/FmffXaKVuZzqCcklZeW /fE2eQSQlYCU2jJvsw4Xpn0TbYZYzaC4/RYwL8rTmXIPIc8TCdqd5BiVdPAg0gNy1p B9Mg3zerYd2jQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id A8904CE0AE2; Fri, 20 Oct 2023 12:22:08 -0700 (PDT) Date: Fri, 20 Oct 2023 12:22:08 -0700 From: "Paul E. McKenney" To: Pedro Falcato Cc: rcu@vger.kernel.org, Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Remove unused macros from rcupdate.h Message-ID: Reply-To: paulmck@kernel.org References: <20231020173015.30509-1-pedro.falcato@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231020173015.30509-1-pedro.falcato@gmail.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 12:22:33 -0700 (PDT) On Fri, Oct 20, 2023 at 06:30:15PM +0100, Pedro Falcato wrote: > ulong2long, USHORT_CMP_GE and USHORT_CMP_LT are redundant and have been > unused for quite a few releases. > > Signed-off-by: Pedro Falcato > --- > Just a boring chore patch that cleans up a few unused macros. > > I'm *very* interested in knowing how that ulong2long macro came along, > though. What was wrong with '(long) a'? Signed integer overflow, if I remember correctly. But the Linux-kernel build process forced signed integer overflow to be defined. Queued for v6.8, thank you! Thanx, Paul > include/linux/rcupdate.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h > index 5e5f920ade9..b9b6b828115 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -34,9 +34,6 @@ > > #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) > #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) > -#define ulong2long(a) (*(long *)(&(a))) > -#define USHORT_CMP_GE(a, b) (USHRT_MAX / 2 >= (unsigned short)((a) - (b))) > -#define USHORT_CMP_LT(a, b) (USHRT_MAX / 2 < (unsigned short)((a) - (b))) > > /* Exported common interfaces */ > void call_rcu(struct rcu_head *head, rcu_callback_t func); > -- > 2.42.0 >