From nobody Tue Apr 28 22:05:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEA38C38A2B for ; Fri, 27 May 2022 12:17:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354035AbiE0MRD (ORCPT ); Fri, 27 May 2022 08:17:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352588AbiE0MD4 (ORCPT ); Fri, 27 May 2022 08:03:56 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42D63149164; Fri, 27 May 2022 04:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653652415; x=1685188415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZtvwdBswObarSG+JCXhEU2uLIuCFq0FhxZEUfuA19u0=; b=JkHtmSU14EYPemC5M4HQJJx9j/G/ZQU1yT9zaveePaTwWc4O0JWdDAfE pneG/5C1mO8ytIuuErHVG38kE/5YSAmTd1cyRxVOQnH1cGnP0SRaJcvy9 4bmtMBYJh/TrOX2CZbwGEzsrdX6gJ3Rr9HK1E+0BRP0JuyEmD1Xfp3KC/ SBS0wo2jKbrM01rHxFjjLnbGI1bWGnhT7jh9R8tQHmif8jGwpLlziZhn3 ibq/JsMOPngsC7jiWfBdxat8is/o/NXi+7kI4hOIxE37mqZ13Snptdd42 M/t0RMrK8v2Okg5GdBlWKz6+0yhtbi5BFhAHW0BmmezFgRzEptFL17fRE A==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="274464808" X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="274464808" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 04:53:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="746889599" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga005.jf.intel.com with ESMTP; 27 May 2022 04:53:32 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: Vineet Gupta , Geert Uytterhoeven , "David S . Miller" Cc: Guenter Roeck , linux-snps-arc@lists.infradead.org, linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski Subject: [PATCH v2 1/3] ARC: bitops: Change __fls to return unsigned long Date: Fri, 27 May 2022 13:53:43 +0200 Message-Id: <20220527115345.2588775-2-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> References: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As per asm-generic definition and other architectures __fls should return unsigned long. No functional change is expected as return value should fit in unsigned long. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz S=C5=82awi=C5=84ski --- arch/arc/include/asm/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h index bdb7e190a294..f5a936496f06 100644 --- a/arch/arc/include/asm/bitops.h +++ b/arch/arc/include/asm/bitops.h @@ -82,7 +82,7 @@ static inline __attribute__ ((const)) int fls(unsigned in= t x) /* * __fls: Similar to fls, but zero based (0-31) */ -static inline __attribute__ ((const)) int __fls(unsigned long x) +static inline __attribute__ ((const)) unsigned long __fls(unsigned long x) { if (!x) return 0; @@ -131,7 +131,7 @@ static inline __attribute__ ((const)) int fls(unsigned = int x) /* * __fls: Similar to fls, but zero based (0-31). Also 0 if no bit set */ -static inline __attribute__ ((const)) int __fls(unsigned long x) +static inline __attribute__ ((const)) unsigned long __fls(unsigned long x) { /* FLS insn has exactly same semantics as the API */ return __builtin_arc_fls(x); --=20 2.25.1 From nobody Tue Apr 28 22:05:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2A15C38A2D for ; Fri, 27 May 2022 12:17:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354193AbiE0MRP (ORCPT ); Fri, 27 May 2022 08:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352339AbiE0MEP (ORCPT ); Fri, 27 May 2022 08:04:15 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2309114A247; Fri, 27 May 2022 04:53:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653652418; x=1685188418; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iXa9tysKL8dYSNPB5yR6GZnkuyZOW6oS/kYddLRiRMc=; b=STauIsVNXgCZyQ+r/COd1NHEdN7nTB99EPI3LmU4ciJkWxvTEq/Pq1nm 1BH4gIiEoEKmK73E0TxWNPEgeq21aMT33f0PPB114mIyf3ZwsvufAMMsA 0yDTYe3qud3NwBJOlomm8M9A/sTu5WMJrNqPJE1CF3M9v72qGpfkvZH+g N6OW4ZSJFFCCYmlWHPL9nIjZVJ6Uu7tAFZSRDGNYKd/2uo7apG6nElnaW JxW4w69z07VXPi99sNVQmjiPc8bk1KHRxI3YUHdAfxAjbzNniDVGKcrG0 CuB9hgFrS7WAALhIQwgxSLaipSjoiL1syRzy8P+HO/KQ54lC0c2WteVAw A==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="274464815" X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="274464815" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 04:53:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="746889626" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga005.jf.intel.com with ESMTP; 27 May 2022 04:53:35 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: Vineet Gupta , Geert Uytterhoeven , "David S . Miller" Cc: Guenter Roeck , linux-snps-arc@lists.infradead.org, linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski Subject: [PATCH v2 2/3] m68k: bitops: Change __fls to return and accept unsigned long Date: Fri, 27 May 2022 13:53:44 +0200 Message-Id: <20220527115345.2588775-3-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> References: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As per asm-generic definition and other architectures __fls should return and accept unsigned long as its parameter. No functional change is expected as return value should fit in unsigned long. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz S=C5=82awi=C5=84ski Reviewed-by: Geert Uytterhoeven --- arch/m68k/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index 51283db53667..87c2cd66a9ce 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -510,7 +510,7 @@ static inline int fls(unsigned int x) return 32 - cnt; } =20 -static inline int __fls(int x) +static inline unsigned long __fls(unsigned long x) { return fls(x) - 1; } --=20 2.25.1 From nobody Tue Apr 28 22:05:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC5EEC433EF for ; Fri, 27 May 2022 12:17:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354159AbiE0MRM (ORCPT ); Fri, 27 May 2022 08:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352379AbiE0MEP (ORCPT ); Fri, 27 May 2022 08:04:15 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8235914A268; Fri, 27 May 2022 04:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653652420; x=1685188420; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vuMs6VJt08rsTnYrQbFKCLWhZ1eIAOf5fKrz74zRkw0=; b=bkPxNI9RMPjF243yqx64n7hGe3o1zbhmam6Q7T1qyyzxjBNOFX8lWNfg dot/BQ94Zqm81fAZDBaH4pOwZIE8u8tvmhZ3qndsphXo9MBgxQ0TU7W0k 7nzUAp0XhYocvZorU11YbtVxxMzxYEk6GjHJleObRv6In4hbjBnlgVVLj uRX+iDKGOZiA24toUMy98APepXn4YU/euI2g6NQNKwKdPyYlrww+iQPkt PifgNhOYiNCG/GbvY6g1rRTqszHzRSiCD0Neiht24KAavtr+XFBtMlQ9E RbwEzEWPCdj8VpodQTiREcAiG2Ma2S1aOvD5dv4iKIEtZFiTEZ9Njrd58 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="274464822" X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="274464822" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 04:53:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="746889640" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga005.jf.intel.com with ESMTP; 27 May 2022 04:53:37 -0700 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= To: Vineet Gupta , Geert Uytterhoeven , "David S . Miller" Cc: Guenter Roeck , linux-snps-arc@lists.infradead.org, linux-m68k@lists.linux-m68k.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski Subject: [PATCH v2 3/3] sparc64: bitops: Change __fls to return unsigned long Date: Fri, 27 May 2022 13:53:45 +0200 Message-Id: <20220527115345.2588775-4-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> References: <20220527115345.2588775-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As per asm-generic definition and other architectures __fls should return unsigned long. No functional change is expected as return value should fit in unsigned long. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz S=C5=82awi=C5=84ski --- arch/sparc/include/asm/bitops_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/include/asm/bitops_64.h b/arch/sparc/include/asm/bi= tops_64.h index 005a8ae858f1..cdac39bd7b32 100644 --- a/arch/sparc/include/asm/bitops_64.h +++ b/arch/sparc/include/asm/bitops_64.h @@ -24,7 +24,7 @@ void clear_bit(unsigned long nr, volatile unsigned long *= addr); void change_bit(unsigned long nr, volatile unsigned long *addr); =20 int fls(unsigned int word); -int __fls(unsigned long word); +unsigned long __fls(unsigned long word); =20 #include =20 --=20 2.25.1