Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2234724rwi; Tue, 1 Nov 2022 05:35:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yXVyFLQ7otbndAIAqc2a5KyWkRnXhgURDaMRdB6F9E/P3y0JTgxQXsOmxQemGStiVi748 X-Received: by 2002:a05:6a02:10a:b0:461:26b8:1c95 with SMTP id bg10-20020a056a02010a00b0046126b81c95mr16254740pgb.503.1667306106939; Tue, 01 Nov 2022 05:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667306106; cv=none; d=google.com; s=arc-20160816; b=pemNZtHQK+xfEUsaMStp5FZYtcqj6UGOI+bHQPJgB+Xck5lyNJrdZceaylDQKV4ZRQ yiYO0oRNIRiwEsW0hgBKOzfAQ63x8kaEaSx4tsVBVCrb3rLMsrieFs5i5fu+wVTVoXCr PI3TyBTojNVXHD7rt15k92muaEk6iUl3yTahdpD1TK0uQ46sAFC5Wq2OfguSe+f+hNDb gQ/NXZbyeXFdpqw4jJbC8cuPa3fRpRRsrIAIfRYCTrDpydvRJ3y5kYmlo8WXARnmRk85 BX0O8OjxOimuKBGbdoL99avqzyFJnp/HlMhVVIAGAe+FMzzkXALfQaTxjS+4tVvssdIY uzSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=rVA1TY32Z+O/vuIwNPa6xKrmjDKfreWscCJ2vj+pqHw=; b=N9r/eCvQHSIJepLu7znnF7J3zbtcUnOmrs0R4VDYe+gWm+k3/A8hwkSaee5o7AoBEo g8gY5cGMtZ8EWcLAhgGTtxtHI54fH6ap1dGQCGarD+rczsQOf33qfcf1r2Q9ZEAKHFfC JCkGx+bl/d/bACCsja0klDbOJduvPz1TDgNyinHMmKUXKL8gi7Q/tQTa0d/WzSA7stuj pVNNn9hJ8wYwt+G9pWIk9prPqB1eeP5xesgId92DSDUDoL1KghK5r1VaAANPJAtGN7Z8 WJoBUVi5RLTfMotc6CD+Afd0znM2jvA0hqr6ybaa/ZBezkcuS3GNiIm334KQAThKTI/h uMAw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 130-20020a621488000000b00562bd090afcsi11004305pfu.305.2022.11.01.05.34.50; Tue, 01 Nov 2022 05:35:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbiKAMUB (ORCPT + 97 others); Tue, 1 Nov 2022 08:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiKAMT6 (ORCPT ); Tue, 1 Nov 2022 08:19:58 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947FE167CA for ; Tue, 1 Nov 2022 05:19:56 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-321-cgaiRFvXNJ2qCkCMR_nIOQ-1; Tue, 01 Nov 2022 12:19:53 +0000 X-MC-Unique: cgaiRFvXNJ2qCkCMR_nIOQ-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 1 Nov 2022 12:19:51 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.042; Tue, 1 Nov 2022 12:19:51 +0000 From: David Laight To: 'Szabolcs Nagy' CC: Theodore Ts'o , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: linux interprets an fcntl int arg as long Thread-Topic: linux interprets an fcntl int arg as long Thread-Index: AQHY7dH4b5GlkmHz9EyVI+/nub6Ts64p0qEQgAAgcACAAAds0A== Date: Tue, 1 Nov 2022 12:19:51 +0000 Message-ID: <0030a20a94cd49628c5461d044bb28ed@AcuMS.aculab.com> References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 RnJvbTogJ1N6YWJvbGNzIE5hZ3knIDxzemFib2xjcy5uYWd5QGFybS5jb20+DQo+IFNlbnQ6IDAx IE5vdmVtYmVyIDIwMjIgMTE6NDUNCj4gDQo+IFRoZSAxMS8wMS8yMDI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