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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21D97C47DD9 for ; Wed, 28 Feb 2024 16:20:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EB22660E7F; Wed, 28 Feb 2024 16:20:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nY5fNaHpBqgH; Wed, 28 Feb 2024 16:20:54 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6425760E79 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1709137254; bh=mdo+WCwYssTHA5Y/xcZDi9YAkmpmO4mLfP1Bdut2TaY=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=R6FCf6n+yD8cAqFAa/Rbs80xOCIDQNh+DpD2KeVRhYZP5fU4CGnqdjgfAv1wPLShU xoZ6ThtbTt6SCk/5OUSck6k3OWPMq7jjOrL8EGDjwzTyrA0kmgD9jWxevtkwzsVcAM mEG4qCIAKphhhP8jhnopbVgripp4mrW/hJk0Nu2S9FGofHP7GS4FkPjtEvH7q7HG5Y SQO197vwsdzJnYyQnyjXafd6J+pf4s3tRosu8m4VBTXMe/Lz7W8i7nBLu9Ft8kt6Gw ZniLfFnD0N7/3gqW1ETYJ1fPpMxL1pgXB4e9OJinuczBOJUcCPeIdCVlvAZzjaaESL TrqU5a8XpKx/Q== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 6425760E79; Wed, 28 Feb 2024 16:20:54 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7CD461BF2B3 for ; Wed, 28 Feb 2024 16:20:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 68B2181495 for ; Wed, 28 Feb 2024 16:20:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JzYkZwiD90I7 for ; Wed, 28 Feb 2024 16:20:51 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::112b; helo=mail-yw1-x112b.google.com; envelope-from=yury.norov@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org A8AE38148B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A8AE38148B Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by smtp1.osuosl.org (Postfix) with ESMTPS id A8AE38148B for ; Wed, 28 Feb 2024 16:20:51 +0000 (UTC) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-608ed07bdc5so38350717b3.3 for ; Wed, 28 Feb 2024 08:20:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709137250; x=1709742050; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mdo+WCwYssTHA5Y/xcZDi9YAkmpmO4mLfP1Bdut2TaY=; b=w0SfXN6H3jVzb92aoea5Asa8CAVvASPgC4dAHcuWEHM59L/bHlMgy68S2V0It6ISWG GZP7sih35Gqh/Z80bB4Ld/DzNC4sbTP/nTuBL4mE3i62fxCNbuWVZ0nTZ1IZzATHNc+1 fNWnr3fAjk3pxnGKDijHZuc0VqOdQBBfeCGtPhoriHC+/Jmc5bvYVP6vMMo2VZrMaXhC m9IZbp8YbHQYcx6/TKYUVi7q5copmndfhi8zXQ3dIODEdin0g4ae/XGZKJ5P4O+6ouUF WmAd6hVsVCGeof6ieawekCSxYaUe5HQjDppHd5+pyNfMrAMetlnRIhr/4e1tSkF+CogY qf6g== X-Forwarded-Encrypted: i=1; AJvYcCULm0OLfSiPjyJoxjLoOaCumMOEIue6Rm0tZBeqkLegbEkHPu9VrNyevCNREpKaCew1ZdVYZhFeZ9wsPYjT1saP5SVgVu4OP9bAuzF8v+JKsQ== X-Gm-Message-State: AOJu0YyiuZ7zlv/gFUWjGfUtIyeOIJ6o+8FmWMHNqOqiOYiS4cmc9aYY 4g38IadQcnGF7AmTQmRcPI2HTuF3+4Ky3Rf3QtmIpinpfLHsd7KO X-Google-Smtp-Source: AGHT+IFog7Zlb1nyvjIUA4ujLfkoca4T12KmwBu9waTIaa8SAH+ATAMvMCHoJTwS61raA1yWNAPR4A== X-Received: by 2002:a81:e349:0:b0:608:d188:6fd9 with SMTP id w9-20020a81e349000000b00608d1886fd9mr5510309ywl.33.1709137250415; Wed, 28 Feb 2024 08:20:50 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:2256:57ae:919c:373f]) by smtp.gmail.com with ESMTPSA id v1-20020a81a541000000b005fff0d150adsm2393743ywg.122.2024.02.28.08.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 08:20:50 -0800 (PST) Date: Wed, 28 Feb 2024 08:20:49 -0800 From: Yury Norov To: Alexander Lobakin Message-ID: References: <20240201122216.2634007-1-aleksander.lobakin@intel.com> <20240201122216.2634007-6-aleksander.lobakin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201122216.2634007-6-aleksander.lobakin@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709137250; x=1709742050; darn=lists.osuosl.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mdo+WCwYssTHA5Y/xcZDi9YAkmpmO4mLfP1Bdut2TaY=; b=if0VktKgsHuMATu+OdWYZng9ksp0Lc55etMaz4hwPwEA56LFtp59U2TOPGWNDfsXGZ NFrx5BMB3AooPKv53gA5zvXPCoHZy4pIGzqGtWIOIDMF9tNmfy0LL5InTWFSDw0NsQih pND2saXEUOnz9Kn4KohjdnPAolpMsHOTI87SahgW7fuiqEgXRYaOcqFbCTl99etHJVrS JjjdVIqylgtq0mrLCLX4/OxBwNNHlqYDDebV/uBiOcItOrIz4odUXH0wkZkWytH6iUI6 vSOXuPX+L4wXbE7Ck6oXKTHfatArzJfxpcOhr7DoECyKlfArqhEeTm7NBs5t1dpHdMp0 13KA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=if0VktKg Subject: Re: [Intel-wired-lan] [PATCH net-next v5 05/21] bitops: make BYTES_TO_BITS() treewide-available X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rasmus Villemoes , dm-devel@redhat.com, Alexander Potapenko , Jiri Pirko , linux-s390@vger.kernel.org, Przemek Kitszel , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , Wojciech Drewek , Ido Schimmel , Andy Shevchenko , Andy Shevchenko , Eric Dumazet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Marcin Szycik , Simon Horman , Michal Swiatkowski , ntfs3@lists.linux.dev, "David S. Miller" , linux-btrfs@vger.kernel.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Feb 01, 2024 at 01:22:00PM +0100, Alexander Lobakin wrote: > Avoid open-coding that simple expression each time by moving > BYTES_TO_BITS() from the probes code to to export > it to the rest of the kernel. > Simplify the macro while at it. `BITS_PER_LONG / sizeof(long)` always > equals to %BITS_PER_BYTE, regardless of the target architecture. > Do the same for the tools ecosystem as well (incl. its version of > bitops.h). The previous implementation had its implicit type of long, > while the new one is int, so adjust the format literal accordingly in > the perf code. > > Suggested-by: Andy Shevchenko > Reviewed-by: Przemek Kitszel > Signed-off-by: Alexander Lobakin Acked-by: Yury Norov From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 953CB6EEE0; Wed, 28 Feb 2024 16:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709137254; cv=none; b=JAwqOBj4FLRl8BRQW5jn2MwaDVJD8RLTY2WNBJF9rZmqxbMQ1J70Mtcfc5jBl64RFzpjHk8irc3ry0UObIFZsVvFjVs6ZA6xtKEV0rq7MZXJR4wV73sgsKXytGJUYRhw/Qs98jcCy6WUMPXnj98gEGP84sDy2WfJwcc1PNuWIYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709137254; c=relaxed/simple; bh=P/cOkDLDSSyk4DgZbvtQrFoF7aMyarAs6VHUkE+AZ9o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Uql1XxUk29Sm1IUO9mxO3+BLr7BT9yCHV8b1KBOsd186ZlLRl0TYwbo5ZSUqrJtBPi/fX9NFmwpMKdpQkbksgbmTjgk+JD9kGQ2+2ReFK6WSBZzGS95R7TpgGG5Phb/kTQco1gWdeoOshkA551fqZzJhHp7iKZq2aQKpRMui0+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MKTPSRUm; arc=none smtp.client-ip=209.85.128.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKTPSRUm" Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-6095dfcb461so448747b3.2; Wed, 28 Feb 2024 08:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709137250; x=1709742050; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mdo+WCwYssTHA5Y/xcZDi9YAkmpmO4mLfP1Bdut2TaY=; b=MKTPSRUmGu/7nNdbXvU9YmTV4SuB6ddMkTgLHhTjaivzKhkNZ0hASkZLCw+Bftb+UF nRKTCqxAW59UWet0ert6rIU3Sb0ckjofcjiNGca6BWgGZPZ3ZfupYKQI1PJcIT0TCWC+ TVgrTyadB2j0nR/QX2X+uQN4Q6d1YuD6jma653VEYJwWRU9grUw0pJxSpVsHB9tnnpVW 5Lz7Dnj/tiSWXFYufj/AP3eJkiVWsGAqc8b1vnV67EbhKNvpTiJzEOrUDKaKRCm1oEVt Gv7b/dJTFqnKEFjrjACUYQIw/HytZczHNi+evhgWMLLFa/iBSV4LmG8ABtzl5KFu7mmo NUxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709137250; x=1709742050; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mdo+WCwYssTHA5Y/xcZDi9YAkmpmO4mLfP1Bdut2TaY=; b=UXQuSSV6FRkV3NqufVPWTnMyRKjh4SgD7IpSdhPqDWXUD1FoZds6TLtQbVSaGx1P1P 3Q4LYs8tTw7k7UZ0tdf2fXngAY6LC3qoi4VXT1ojf7xsBnUqSMwyGLhy19uvGS5KIfRS 3MBgkiS/vguVjmK9VCQzDB3rYCT97gQlZe1PN7i0WiruJRzY2/F9pqf2OswHhz24a3vT A8rFAJlRPxVcZ7oBxFZYWF2WN68uKYk9fjKcy7t/Yl/gKyt7Eq58Wy3eGcG0fcSuYPfm MDYjOuMtjTihfyeegeaWKJqSjkMuw1XvPssvHe46OMRan3Gjmi+fcdn8hDOnSoADcZ2c 0v1Q== X-Forwarded-Encrypted: i=1; AJvYcCXXqa+DUpG1a4cMEWQF1B4gfWQyZerbW03sP7wKabeBVQXIsRE9UvYkgQpdRIWqf2MeZmsYSJ/cIr/1z4ukrah3VLq5LRSKQg642NBVGNGqAMqo6AoCWlHNPVaW4Z0FJTFg4GOpL0NzRUpzAsMqzBrXMg83y8ynwnz/PaampE6Eg1DGK+CFh8eBxORudEahB5GvbiAmo5WruZM7UORH X-Gm-Message-State: AOJu0YzXEtgpB6u+AcwLE6f83RNU28+dWvd+VHdjebWzq3t6A/Ujzm1B P0C6vKIQSLLd3Ps9L+5DdiyA3hEKLISa84aGHWs37E/h98WOy3uR X-Google-Smtp-Source: AGHT+IFog7Zlb1nyvjIUA4ujLfkoca4T12KmwBu9waTIaa8SAH+ATAMvMCHoJTwS61raA1yWNAPR4A== X-Received: by 2002:a81:e349:0:b0:608:d188:6fd9 with SMTP id w9-20020a81e349000000b00608d1886fd9mr5510309ywl.33.1709137250415; Wed, 28 Feb 2024 08:20:50 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:2256:57ae:919c:373f]) by smtp.gmail.com with ESMTPSA id v1-20020a81a541000000b005fff0d150adsm2393743ywg.122.2024.02.28.08.20.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 08:20:50 -0800 (PST) Date: Wed, 28 Feb 2024 08:20:49 -0800 From: Yury Norov To: Alexander Lobakin Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Swiatkowski , Marcin Szycik , Wojciech Drewek , Andy Shevchenko , Rasmus Villemoes , Alexander Potapenko , Jiri Pirko , Ido Schimmel , Przemek Kitszel , Simon Horman , linux-btrfs@vger.kernel.org, dm-devel@redhat.com, ntfs3@lists.linux.dev, linux-s390@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko Subject: Re: [PATCH net-next v5 05/21] bitops: make BYTES_TO_BITS() treewide-available Message-ID: References: <20240201122216.2634007-1-aleksander.lobakin@intel.com> <20240201122216.2634007-6-aleksander.lobakin@intel.com> Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201122216.2634007-6-aleksander.lobakin@intel.com> On Thu, Feb 01, 2024 at 01:22:00PM +0100, Alexander Lobakin wrote: > Avoid open-coding that simple expression each time by moving > BYTES_TO_BITS() from the probes code to to export > it to the rest of the kernel. > Simplify the macro while at it. `BITS_PER_LONG / sizeof(long)` always > equals to %BITS_PER_BYTE, regardless of the target architecture. > Do the same for the tools ecosystem as well (incl. its version of > bitops.h). The previous implementation had its implicit type of long, > while the new one is int, so adjust the format literal accordingly in > the perf code. > > Suggested-by: Andy Shevchenko > Reviewed-by: Przemek Kitszel > Signed-off-by: Alexander Lobakin Acked-by: Yury Norov