Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3765668iob; Mon, 2 May 2022 05:17:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhB1hDbHnUq0CzNLi4aX5Yjx8Wv4uYK+Prml+nnwYbEW1GKu8JqBmudQ7ZNEPhFM0+yTf4 X-Received: by 2002:a17:90a:31cf:b0:1c9:f9b8:68c7 with SMTP id j15-20020a17090a31cf00b001c9f9b868c7mr17993716pjf.34.1651493823021; Mon, 02 May 2022 05:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651493823; cv=none; d=google.com; s=arc-20160816; b=b45vOrUWstB/EJX2EcRPIfF16/qXHnaOTzOMWhEvofMvgFHxCGXspYZTd8ypTzOa3i HkZJNwnltWXayWTAYWRosJhI1g4ml5KDvWleFj3IX4vpRlMc2GvNKnoB4oR9h4UGPa+4 urz0HT4NIZ8IG8alXf+Fxx2RIzdXw5dCu5jMJZj6JIVuCpRxKW2p+aUViu9pqqBFOLM1 T3l03oHUaF4W7BAs4LR7nKyNcyETVhif+Vq+eIO02S/ZB/UvpzsmXkyQp2P34Gx86YAW 50Pus1aKUOkZvAlVdGZ+yUb6J6hHDTNrqMDwp/uX68WShm9aDJ8f6PvuSpOC1g5S7YVQ 5Rkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=kxG9R+Mj6hQ/bgRaikLvuXkk5Cew5MDIyTZHQmokcDI=; b=ETobVemrfHCMIjxsSzeuBLDCFnMoisQT05DjhN4Za6ppq3kl/g4HAsm0PXq4qGosvG W92TSgRwQWSgPVzQDIuod5sBX7CsQeu87L1nKW6eugl6+frTH24YuvWub1un5k5D8e8z hIkjAMHzQpMVf1zXSSbihIGCRhmR6c7xTt98D1c6HIroPp7Mx89mZxP2fzITTMqLI6z+ AKIE8veGiWolph1LZc4jJqTI6lGwtcTD9QRMzHaxtuVFZtDcL/qEIL/2SpdFFocXCtas 5LNQ0EQtXeGgfLl7xix0FArQS93GWZH8hlp78rffKQ5exIuOF+wpTSQLC7sm/d0YeLle qb/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XIuFoea3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020a170902934400b0015d19866cf7si12658861plp.345.2022.05.02.05.16.38; Mon, 02 May 2022 05:17:03 -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=@gmail.com header.s=20210112 header.b=XIuFoea3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358986AbiD2Ox3 (ORCPT + 99 others); Fri, 29 Apr 2022 10:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359846AbiD2OxZ (ORCPT ); Fri, 29 Apr 2022 10:53:25 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B968A6E34; Fri, 29 Apr 2022 07:50:07 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id bv19so15916373ejb.6; Fri, 29 Apr 2022 07:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=kxG9R+Mj6hQ/bgRaikLvuXkk5Cew5MDIyTZHQmokcDI=; b=XIuFoea3IeF9X34o7Yg3zdHgCtAAk+fm6rFmlBkDvKIsuVbKd6BjegPYM5Ff6ITCsV tVQNEJdDWkyu6P6GWaDvCaaNnJ1+zZwEtBsbHYJ2ucobJqMh0c3LP6gN/vlBa414vLpQ 4evPmnlzC7/caRAa7gvnKX3ZINny5bmrIOzUnfLAplVm+8DXVwGv2BSjjBTCLpejHL74 ipnx6YhPQbwBXfplA5O/pH9MtM1hTY3yBzMeXTJCPe+QT6kMPV/AGMSJ79miJkeyIzyY H9eCsUHdRmurrohDAZkpO0sWyZL0ppQHR2lxmV8Y+Y/K6SQO90FnwFnm3/F+MpqND12v 4tiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=kxG9R+Mj6hQ/bgRaikLvuXkk5Cew5MDIyTZHQmokcDI=; b=1ng3CYo3djcN7tA5MJsHDAp5YC3TX0NYZLhbsnm6creC0vsrqZzqs6Z7ldhDwhQcpF SjrN4S1QjqbHJthnwusC5MRDuXFd5LVojF8R6QlctiBzNquHuqHj/XjyINgzeA1kOlIR C9a0ZB0hsa4ae/H0TSYKu0BJgJeTFWZ4ybeNkYjhNLIjMQlupfWUxSpz97uH8U/tQbFW 6S5CEZcb0M4oae0pc34hU5v9iVUG2n7B1h+zHG0fGLU6yazDQhXBusq+sVAn8YvrddWq Iqp1M9yDzemz+9mg4Zg93VDVnydhW06F9xTYi2ZvR6qDTOajvoHMZTpf5uinNXojk4L0 rmQw== X-Gm-Message-State: AOAM530cfWFM2SXDJtba7e2v/c0PD9WYEOpS8EedVUWZTq7VFJCq1BqQ iReOhLpIm52cbvKLRheNbJqOK/W21g== X-Received: by 2002:a17:907:2cc6:b0:6f0:2de3:9446 with SMTP id hg6-20020a1709072cc600b006f02de39446mr35955279ejc.690.1651243805956; Fri, 29 Apr 2022 07:50:05 -0700 (PDT) Received: from localhost.localdomain ([46.53.253.143]) by smtp.gmail.com with ESMTPSA id qr48-20020a1709068cb000b006f3ef214e0bsm719709ejc.113.2022.04.29.07.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 07:50:05 -0700 (PDT) Date: Fri, 29 Apr 2022 17:50:03 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH] ELF, uapi: fixup ELF_ST_TYPE definition Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org This is very theoretical compile failure: ELF_ST_TYPE(st_info = A) Cast will bind first and st_info will stop being lvalue: error: lvalue required as left operand of assignment Given that the only use of this macro is ELF_ST_TYPE(sym->st_info) where st_info is "unsigned char" I've decided to remove cast especially given that companion macro ELF_ST_BIND doesn't use cast. Signed-off-by: Alexey Dobriyan --- include/uapi/linux/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h @@ -134,7 +134,7 @@ typedef __s64 Elf64_Sxword; #define STT_TLS 6 #define ELF_ST_BIND(x) ((x) >> 4) -#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) +#define ELF_ST_TYPE(x) ((x) & 0xf) #define ELF32_ST_BIND(x) ELF_ST_BIND(x) #define ELF32_ST_TYPE(x) ELF_ST_TYPE(x) #define ELF64_ST_BIND(x) ELF_ST_BIND(x)