From patchwork Tue Nov 9 02:33:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12609493 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE8D1C433EF for ; Tue, 9 Nov 2021 02:33:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 88C8261207 for ; Tue, 9 Nov 2021 02:33:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88C8261207 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2C2D56B00BE; Mon, 8 Nov 2021 21:33:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 272B36B00BF; Mon, 8 Nov 2021 21:33:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13B9C6B00C0; Mon, 8 Nov 2021 21:33:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 011506B00BE for ; Mon, 8 Nov 2021 21:33:41 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C2B0F7CA48 for ; Tue, 9 Nov 2021 02:33:41 +0000 (UTC) X-FDA: 78787821042.31.F08A999 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf19.hostedemail.com (Postfix) with ESMTP id 2F50CB000442 for ; Tue, 9 Nov 2021 02:33:33 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D86D61288; Tue, 9 Nov 2021 02:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636425220; bh=RjE5RxYsZU9Qh+HrmBiXf3gnXhHo5ONjJcPje1h75CE=; h=Date:From:To:Subject:In-Reply-To:From; b=asm+jQl0Var3gGkzYVyiohkhRdFoaRDlZjFqA79ga/uAdpDETUWajFCLTGFC9lgz0 75eVqEdwJSqgiH3PvpC+RqDqnvpq9V4R2ZwSKpiGaPnn07OIf9lY2Wt5dVZfrHcetn oISo6a11o1SD4OrlYDo7c6AC3BZo0ydPEdS6OWMs= Date: Mon, 08 Nov 2021 18:33:40 -0800 From: Andrew Morton To: adobriyan@gmail.com, akpm@linux-foundation.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 43/87] ELF: simplify STACK_ALLOC macro Message-ID: <20211109023340.BlCjvnGzu%akpm@linux-foundation.org> In-Reply-To: <20211108183057.809e428e841088b657a975ec@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=asm+jQl0; spf=pass (imf19.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2F50CB000442 X-Stat-Signature: 98tqx6wsshcjaz7bntf3ctszc5ow6fcn X-HE-Tag: 1636425213-35977 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Alexey Dobriyan Subject: ELF: simplify STACK_ALLOC macro "A -= B; A" is equivalent to "A -= B". Link: https://lkml.kernel.org/r/YVmcP256fRMqCwgK@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton --- fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/binfmt_elf.c~elf-simplify-stack_alloc-macro +++ a/fs/binfmt_elf.c @@ -156,7 +156,7 @@ static int padzero(unsigned long elf_bss #define STACK_ADD(sp, items) ((elf_addr_t __user *)(sp) - (items)) #define STACK_ROUND(sp, items) \ (((unsigned long) (sp - items)) &~ 15UL) -#define STACK_ALLOC(sp, len) ({ sp -= len ; sp; }) +#define STACK_ALLOC(sp, len) (sp -= len) #endif #ifndef ELF_BASE_PLATFORM