From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 9AA3A3851C0D for ; Tue, 18 Aug 2020 17:37:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9AA3A3851C0D Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-6l-ZLgLtPCKAH3hzsTZgWQ-1; Tue, 18 Aug 2020 13:37:10 -0400 X-MC-Unique: 6l-ZLgLtPCKAH3hzsTZgWQ-1 Received: by mail-qk1-f197.google.com with SMTP id a186so13632575qke.1 for ; Tue, 18 Aug 2020 10:37:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Khm4bWuESA6Ng2eVvtCzPdHZnPpjHfULd8wYOjcqz3Q=; b=dQE1zTFADBZ26y2nO0NVq16DOWSF05LWJjbB/3F4uWG0iGiFNz8rdBm0J7cRpQFY85 xdsW1ZXIpUN2bXKO7fWhnlbpRvPfqu5MQ+J5+AeSaA7mLVLRWXnuqiXW3NuskGUasi1m 9/hsxldhOuTJvzG9kEdCffPN/vwRAxaG0zyu5G2OnLpG6YRFK4IDJmpEPvr+JkUXbpCE 5jWlbmjAdzf92dh8hIIkZYEmE338K9Ranyxz1CKZULaqn3K9jEcdzgcfoAYrxzQTZHc6 Eutn4Cb2unGvmH3AXAe+Jnk972xtXCh3fA+uGGmIlKTBNXjTtTJDr7x8aDLXK/UeSjY1 ncBQ== X-Gm-Message-State: AOAM530//dBh1gtY2ZDpB0BnOKlCP6/p2x4LguCuupAHEYag7k3uj7jg +N5hCpMm9XV0Afl8MkbenIiv7AgA7APrAaSTo1zfSSqJPlzjXT1TkS7qQalZSH50BwFQpZrj0f5 jdX6358FBObhXf+QmEL0c X-Received: by 2002:a37:9fd0:: with SMTP id i199mr18718699qke.248.1597772229965; Tue, 18 Aug 2020 10:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM0eGObzXxmXXJfCiiCXY+4Tdw5jFGK/IOOQTOf8Ao2/0rueAdhEJTorUbv/0YXsNorZPozQ== X-Received: by 2002:a37:9fd0:: with SMTP id i199mr18718678qke.248.1597772229621; Tue, 18 Aug 2020 10:37:09 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id z17sm21002472qkj.62.2020.08.18.10.37.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Aug 2020 10:37:08 -0700 (PDT) Subject: Re: [PATCH v4 02/18] RISC-V: Cleanup some of the sysdep.h code To: "Maciej W. Rozycki" , Alistair Francis Cc: libc-alpha@sourceware.org, alistair23@gmail.com References: From: Carlos O'Donell Organization: Red Hat Message-ID: Date: Tue, 18 Aug 2020 13:37:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 17:37:18 -0000 On 8/17/20 9:53 AM, Maciej W. Rozycki wrote: > On Wed, 12 Aug 2020, Alistair Francis wrote: > >> diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h >> index 83e4adf6a2..fbc2436691 100644 >> --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h >> +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h > [...] >> @@ -107,19 +110,7 @@ >> # undef ret_ERRVAL >> # define ret_ERRVAL ret >> >> -#endif /* __ASSEMBLER__ */ >> - >> -/* In order to get __set_errno() definition in INLINE_SYSCALL. */ >> -#ifndef __ASSEMBLER__ >> -# include >> -#endif >> - >> -#include >> - >> -#undef SYS_ify >> -#define SYS_ify(syscall_name) __NR_##syscall_name >> - >> -#ifndef __ASSEMBLER__ >> +#else > > Please comment #else: > > #else /* !__ASSEMBLER__ */ > > especially as the conditional part above is very long. Otherwise OK. > > This is not actually mentioned in our coding style document, unlike > #endif, giving an impression we don't want #else statements commented: > . > This is however covered by the generic GNU Coding Standards document: > . > > Carlos: Do we want our wiki updated here? ISTM we should. WDYT? Yes! The GNU Coding Standard explains that we should comment #else, but doesn't say what kind of comment should be used, and that content is up to the project. The section should cover how glibc is unique and what we expect from the #else comment. Your suggestion looks good to me. -- Cheers, Carlos.