Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1290898rwe; Fri, 14 Apr 2023 18:32:34 -0700 (PDT) X-Google-Smtp-Source: AKy350YPZ5RhuYSerROgLf3Qvox+3T0XOa3l92TcEWIPhTeJuX7x2/f6TXu1bWi7in/fLVI9IwYP X-Received: by 2002:a17:902:dac5:b0:1a2:3108:5cc9 with SMTP id q5-20020a170902dac500b001a231085cc9mr5969329plx.40.1681522354227; Fri, 14 Apr 2023 18:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681522354; cv=none; d=google.com; s=arc-20160816; b=F47MdMjeU2bVHIQmv+PeaM2UppUZPeFi2eIOmksPQn7mo00vnu9hk0I2OZ89blS8cL MKbFbK0/D/Exk8eVSpmxhJmNw3rRGouBiVdZjOWTOV5rFYjQJ511da/G94IQXsLEXiC1 JpsP5YpFg6B+q6CLuwTvgkvX4kcz144Q3psDKqyZjZZ9mBhNp/ZN87jm44aiX0CrDwSk rcSCu9wiQFImAUiBbEbufdf7YNFDdvQGZFXSjHd5w+LuOPMxAuHhYX6mV8j3ok8h8dSs uQdiOQPcxgnYBj2aO6IwdhmMkWVUMrqLIFb3alSti+Cz7W0zsqs7c6esvI6r15x63vHU 4X7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nfZEJcZ+dMg6pXr3JbwHyo+Yg20VqSDXc0DG8M6z22M=; b=ukRDsifevIaXn5onEERoPgSrD/ZyADxpXdxPcrqwlUEXCQGG1pbNqC3ZA3+z30CPUA SHU+L2yRB3GUwMSArXh3/GkRkOCVOD9167hlrwohtkPjxAtH/Wiyfe26DXm5JSYcw3oT mqH+Cc0o1TlKa9sOcw1lNnUQsMCh0iCYdUjlUbASp4oqbrdEUo/NMwPaEl+XN+lMDO6o 9xriVnm4zbNrJIDifjntfyN4+EHAXbUxq57SWDklPHZQRNv3I5hfCQaePtG/Y8313PV6 kaV1j4wyb2Upe/BVZ11744quJAdf8jxv2Zy8yVR16qIQ6w2lB4SqomZKt3/DHi6kgPV5 CvMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="RxVMv/1Y"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix5-20020a170902f80500b001a69eff58f9si2949224plb.235.2023.04.14.18.32.18; Fri, 14 Apr 2023 18:32:34 -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=@kernel.org header.s=k20201202 header.b="RxVMv/1Y"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229893AbjDOB2z (ORCPT + 99 others); Fri, 14 Apr 2023 21:28:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDOB2y (ORCPT ); Fri, 14 Apr 2023 21:28:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C405040E1; Fri, 14 Apr 2023 18:28:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5CE506450A; Sat, 15 Apr 2023 01:28:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67D26C433D2; Sat, 15 Apr 2023 01:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681522132; bh=uUG02w5CTk2pu7MbMecz7O9Xu7eY0dFcJmlanh3cLkI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RxVMv/1YlIFlLsLS1dxTIIsePbxn3H7U946n43Ybk9yTXqpHdkhsyRncgWRWocH9L vgDqyeIYUzQVilW6N1sQ29GOmBHAX0r3RtF63NLDrK+AyotZO6u/B+VfuGrLJdmXxO 1ayPk8CPjLbAyiqEsT6yf0d/BkfbKIba6BNevRr52y0IFM4STlGUAAqMCy+dE/1Yd6 0u+pfXs+Hr4YQVm65Ov5JhQNCo06T0smwFNLC6YzZVt9O1a7IZGF30oroLfwm1Qtt3 713ikRYeXgKXGt20uX+XaolKCE0A0jsd7Vbfg78Hw84Pu9WL6nETlwoCbPTkPH3/ly Nc/keyrMLaRCA== Date: Fri, 14 Apr 2023 18:28:51 -0700 From: Jakub Kicinski To: Alexander Lobakin Cc: Horatiu Vultur , , , , , , Subject: Re: [PATCH net-next] net: lan966x: Fix lan966x_ifh_get Message-ID: <20230414182851.6f776cb7@kernel.org> In-Reply-To: <06722642-f934-db3a-f88e-94263592b216@intel.com> References: <20230414082047.1320947-1-horatiu.vultur@microchip.com> <06722642-f934-db3a-f88e-94263592b216@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Fri, 14 Apr 2023 19:00:20 +0200 Alexander Lobakin wrote: > > @@ -608,6 +608,7 @@ static u64 lan966x_ifh_get(u8 *ifh, size_t pos, size_t length) > > val |= (1 << i); > > Alternatively, you can change that to (pick one that you like the most): > > val |= 1ULL << i; > // or > val |= BIT_ULL(i); // or (u64)1 << i // or, since you're only concerned about sign extension, even 1U << i having the correct type of the lval seems cleaner than masking, indeed.