Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1628039rda; Mon, 23 Oct 2023 20:22:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTPxRk64DEzJfGCRPlWTKLfn8LHNypWJG3PXSjzQtFINPStIMh/31mmw8Ic10tQSTfJ9vw X-Received: by 2002:a05:6358:810d:b0:168:dfe6:c549 with SMTP id p13-20020a056358810d00b00168dfe6c549mr4190504rwk.9.1698117738038; Mon, 23 Oct 2023 20:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698117737; cv=none; d=google.com; s=arc-20160816; b=A2nKbOUIKwfp4r3BACyOl/swiYRtzCzk5ChPmDL6wLv4SPMykdDQ19Tcz2FYbJkyJs 26ybiKNhE63KCcBZgVZvZ/sFjwd1t4nLXcj23Gzlr/EEDfPOc1GNhpxKdTLF1pOnaTD5 MFQAze5vZw/wPHNzpPO9apjvuAeRpLwUmjIZrlPlEtlX8iAOVdQlihiEiUd2DUOC3t5m sNkKv9DxUursl9qM/3IhGu4GHBRq9at+1XY5xuVfvMbRCDhNVKRpe25FQcXkIREOPYKk CdZlL4DTzY4neaaZ2X9WBuXvwxesK4jQLM9EY0uIjoO/ZmVChDcOYAUh5Uo64T+5Saxr sDzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=atLd/XsfBtuODVrf8BwbGbwqfzpm/EVtiwnpkWQfSN8=; fh=ZAw3KADZcEeTNXSzhtJoIDtWfTq8GBH9A5pJRjX1XaQ=; b=aVAXF/eP12vTGAh602Kks/yH7xa7r4Y111qRwgsEMe9Px6vOf/l866oyXrvdKnfFwK SHSPcjjyYszEhM5n/8fjWWVJ0vOnaucf8d7+qj8Q0uZO5Mg3Uk6/HEkwdmvgF4J0ztdR 3ifeQOqwd0eNnrSPisY76zDPZgVFL5+X7TgtVpW8vtZiCZ1EmRyX58hlDM0eFOBJuint TLgVKHGcu7Ym/P91+TsW7jQELjrHZAFOQQULA/EjDUkpm90I7+kfvNr5K5HuKktG5Tym bIrCAQXlosLZcKm63aYOoLLnSoJ5nmHQC+xiiNf2dMu/gSh/926eZ8iL2GEpDDUI02/c cn3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=nGW0wjMb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id 4-20020a630204000000b00563f72935e3si7435722pgc.608.2023.10.23.20.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 20:22:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=nGW0wjMb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9D0FB8075DE9; Mon, 23 Oct 2023 20:22:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjJXDWI (ORCPT + 99 others); Mon, 23 Oct 2023 23:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjJXDWH (ORCPT ); Mon, 23 Oct 2023 23:22:07 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C479B8F for ; Mon, 23 Oct 2023 20:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=atLd/XsfBtuODVrf8BwbGbwqfzpm/EVtiwnpkWQfSN8=; b=nGW0wjMbs/ltjp1PlmIBLFfbxd RPFVi8eufEe/bnRl3wMPlvXpa5ZHKERLC9pC8DoXBS0udHvMUS47WYdBWi7Xf9/hyuDuYAMnS0rrX nEYh2ma+NUwJsUw+bIuBLi85UlCaS8ODG6w4+Td1z8Fwry8vcoYIsClWOFoKLLLagYPBeWMsze9pi qMBVq+YNWchZlSnJ1HL6HMZa0QazcZ8W+u4T2uR7F7e2uZSP5oT6qEkEEFwD+QyehazW+rQ3UrCK5 a1F5JE/lOZvVCruszSJV7iHTEoa8COXw8HBJ7Wz8JYhGg8815sUA5JsJOAQdQCXq3JAt0GA6WZjwq hgqnVqJA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qv7dg-004jND-2X; Tue, 24 Oct 2023 02:59:28 +0000 Date: Tue, 24 Oct 2023 03:59:28 +0100 From: Al Viro To: David Laight Cc: Eric Dumazet , gus Gusenleitner Klaus , Al Viro , Thomas Gleixner , lkml , Ingo Molnar , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "David S. Miller" , "dsahern@kernel.org" , "kuba@kernel.org" , Paolo Abeni Subject: Re: AW: [PATCH] amd64: Fix csum_partial_copy_generic() Message-ID: <20231024025928.GD800259@ZenIV> References: <20231019050250.GV800259@ZenIV> <20231019061427.GW800259@ZenIV> <20231019063925.GX800259@ZenIV> <20231019080615.GY800259@ZenIV> <20231021071525.GA789610@ZenIV> <20231021222203.GA800259@ZenIV> <5487af5c8c184ac896af2d0b32b3ff42@AcuMS.aculab.com> <20231022111153.GB800259@ZenIV> <2a4555bf640e4bc4b76e1ae14e5cb5e1@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a4555bf640e4bc4b76e1ae14e5cb5e1@AcuMS.aculab.com> Sender: Al Viro X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 23 Oct 2023 20:22:15 -0700 (PDT) On Mon, Oct 23, 2023 at 08:16:59AM +0000, David Laight wrote: > From: Al Viro > > Sent: 22 October 2023 12:12 > > > > On Sun, Oct 22, 2023 at 11:03:39AM +0000, David Laight wrote: > > > > > > + return -1; > > > > > > If you are going to return -1 the return type should be signed. > > > > It's a perfectly valid C to have return -1 in a function that > > returns unsigned long long (or any other unsigned type, really)... > > It is also valid C to return a pointer :-) No, it is not. Conversions done for return are the same as for assignments; in particular, conversion from any integer type to any unsigned integer type is done by taking the value modulo the range of target type. Conversion from pointer to an integer, OTOH, is a constraint violation. > I also suspect that sparse will complain massively and > require a lot of the horrid (__force) casts. > (They should really be a function so that they are completely > ignored by the compiler - unless the compiler needs a cast as well.) Why would sparse "complain massively" about operations with u64? I realize that you've slapped "I suspect" in front of that particular load of fertilizer, but... seriously, your output is very hard to distinguish from ChatGPT drivel ;-/