From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincenzo Frascino Subject: Re: [PATCH 3/4] arm64: compat: Refactor aarch32_alloc_vdso_pages() Date: Tue, 2 Apr 2019 11:06:32 +0100 Message-ID: <5d16a629-d77a-2a98-6ea0-5a6d66dc8057@arm.com> References: <20190401112025.40807-1-vincenzo.frascino@arm.com> <20190401112025.40807-4-vincenzo.frascino@arm.com> <20190401144355.GI14874@arrakis.emea.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190401144355.GI14874@arrakis.emea.arm.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Catalin Marinas Cc: linux-arch@vger.kernel.org, Mark Rutland , Will Deacon , linux-arm-kernel@lists.infradead.org List-Id: linux-arch.vger.kernel.org On 01/04/2019 15:43, Catalin Marinas wrote: > On Mon, Apr 01, 2019 at 12:20:24PM +0100, Vincenzo Frascino wrote: >> +static int __init aarch32_alloc_vdso_pages(void) >> +{ >> + return aarch32_alloc_kuser_vdso_page() & >> + aarch32_alloc_sigreturn_vdso_page(); >> } >> arch_initcall(aarch32_alloc_vdso_pages); > > It probably doesn't matter much but I'd rather not bit-and two error > codes. Just return the non-zero one or pick the first (your choice) if > both are wrong. > > (normally, if you want a non-zero random value if any of them failed, > you'd use bit-or) > Actually this is a good advice, I will change the code accordingly in v2. -- Regards, Vincenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.101.70]:47734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfDBKGf (ORCPT ); Tue, 2 Apr 2019 06:06:35 -0400 Subject: Re: [PATCH 3/4] arm64: compat: Refactor aarch32_alloc_vdso_pages() References: <20190401112025.40807-1-vincenzo.frascino@arm.com> <20190401112025.40807-4-vincenzo.frascino@arm.com> <20190401144355.GI14874@arrakis.emea.arm.com> From: Vincenzo Frascino Message-ID: <5d16a629-d77a-2a98-6ea0-5a6d66dc8057@arm.com> Date: Tue, 2 Apr 2019 11:06:32 +0100 MIME-Version: 1.0 In-Reply-To: <20190401144355.GI14874@arrakis.emea.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Catalin Marinas Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , Mark Rutland Message-ID: <20190402100632.IHks-CzNq2h4V8LezhMwySpkYdmP7tPnFJdCAGwiqXM@z> On 01/04/2019 15:43, Catalin Marinas wrote: > On Mon, Apr 01, 2019 at 12:20:24PM +0100, Vincenzo Frascino wrote: >> +static int __init aarch32_alloc_vdso_pages(void) >> +{ >> + return aarch32_alloc_kuser_vdso_page() & >> + aarch32_alloc_sigreturn_vdso_page(); >> } >> arch_initcall(aarch32_alloc_vdso_pages); > > It probably doesn't matter much but I'd rather not bit-and two error > codes. Just return the non-zero one or pick the first (your choice) if > both are wrong. > > (normally, if you want a non-zero random value if any of them failed, > you'd use bit-or) > Actually this is a good advice, I will change the code accordingly in v2. -- Regards, Vincenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D55DC4360F for ; Tue, 2 Apr 2019 10:06:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FF5620856 for ; Tue, 2 Apr 2019 10:06:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zc12zARF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FF5620856 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2ixXzBf0vVoNirwCAOnB0TpeeO2jJ38ldrCSjE0q1Dc=; b=Zc12zARFBVIKx6 NJuwf2NpgqVOR0tewYNtboIgjEkhz2sxvyVpLc0YEw9oP2qZ9MU96XI0UCQufJKAJj4HasM0ilOAC Om/3e0BBWwWyMz9g5z53BH5QtEX8HhX6PKY98S2cKziXd3EmBvaUfvc8OQlN0JDAKJRrV3G/fjHpD nnqCRP5/6UmC/m6KFoUvquR1IxA05vvrOxPqWVAX2oie9rczZrmS2GgY73sd/Zji1aaH5yETNuDmb 589WCTd2r0t4opKuQlaUj3KdYUNFCcPlP7Bnj5sK/YpnMPGkHXufutL/ipqsVSAuJxgV38wEhkSW7 9aHJag1KzdPqdEVUN58A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBGJU-0007Fl-NF; Tue, 02 Apr 2019 10:06:40 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBGJR-0007FB-3C for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2019 10:06:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ECB1615AD; Tue, 2 Apr 2019 03:06:34 -0700 (PDT) Received: from [10.1.196.72] (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0C5BA3F59C; Tue, 2 Apr 2019 03:06:33 -0700 (PDT) Subject: Re: [PATCH 3/4] arm64: compat: Refactor aarch32_alloc_vdso_pages() To: Catalin Marinas References: <20190401112025.40807-1-vincenzo.frascino@arm.com> <20190401112025.40807-4-vincenzo.frascino@arm.com> <20190401144355.GI14874@arrakis.emea.arm.com> From: Vincenzo Frascino Message-ID: <5d16a629-d77a-2a98-6ea0-5a6d66dc8057@arm.com> Date: Tue, 2 Apr 2019 11:06:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190401144355.GI14874@arrakis.emea.arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_030637_144073_0456FBFF X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Mark Rutland , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 01/04/2019 15:43, Catalin Marinas wrote: > On Mon, Apr 01, 2019 at 12:20:24PM +0100, Vincenzo Frascino wrote: >> +static int __init aarch32_alloc_vdso_pages(void) >> +{ >> + return aarch32_alloc_kuser_vdso_page() & >> + aarch32_alloc_sigreturn_vdso_page(); >> } >> arch_initcall(aarch32_alloc_vdso_pages); > > It probably doesn't matter much but I'd rather not bit-and two error > codes. Just return the non-zero one or pick the first (your choice) if > both are wrong. > > (normally, if you want a non-zero random value if any of them failed, > you'd use bit-or) > Actually this is a good advice, I will change the code accordingly in v2. -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel