Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp612711rdb; Thu, 22 Feb 2024 13:51:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWv6OAA7V8E+kXIwOYShSa2TKT3KvfFbd1Bd8ef2AQxiC8T0g5rBT7t2oP8CwTulE3gf5S3WQANn77oUffcCOyHf9olahBzI8LfOzDDHw== X-Google-Smtp-Source: AGHT+IF+UD1s5C7k3U1iUWz0zNQTp/KkcP+Y4gk4plmYAxqMkCTYhYVNvNd6hbJm1AZ4d0nFa/Lw X-Received: by 2002:a0d:df50:0:b0:604:9167:ccf2 with SMTP id i77-20020a0ddf50000000b006049167ccf2mr454735ywe.42.1708638672329; Thu, 22 Feb 2024 13:51:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708638672; cv=pass; d=google.com; s=arc-20160816; b=FY5bKefQwNz63Gu/11b68kpY3aAX2NO4RH5m47usSwxadPyV5qD1bO9GN7uf9Ti4K2 b1VCe03kVSII1BeaHxDMKOpe+Jf54g9uQ7j+9Xe6PSeLX+JKUArkImVm+SpS9clDPECf 1rdZjEcIwD7OUK8X4HosEMuiHEFj5k+S/W4GkwP22jypJ4+Iez//ptoIv8gzEOGaXthB o9QdSwO4zb2rrINCvFHZMKkaeWtU8g/UVw/EZ7ts4Zj5q3BdRa0qQYY3ObwQ6huOTDDP +I2xT6Fu6c5XJL6gZ8rRxS52ReZvpakr2EwObNYXVDIqNhYeuXd6qjdSQLYlndI2kuKi Ri8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GbRtgjzmc+Ky8Y7MGw/x7vZn3ys1w90kiZLMg7mLUbQ=; fh=ZrERUlwecsUrchmxCOHr/64/fPh/LDuS91bf/FpLEoo=; b=gzKlfGtByd8IAVZl51NUIw23NZCzEoHeZhv2CS5jrYb9MEgZr5yQagpsucq0QY768y zvQ38kr5tFDriaK8OkHusRehr3eKVkloHz67FyaR3dzVV0z5PJldDFaNPLfEzJsbQtAI w+xfoqMM46wy/OcLE+s05FxMvKyouq08NT6nuYLo3bFCRYz/iVORGQH6NKHU8AsWEM8Z sUVLYSP55WgyqqUzFusIn2MA3tNP11poDjKiVJZSA5QOcgfbe84xkKTsgCFDVPUIh35e et73xRia2npG5Hwq/YMa0oyv4aolEC3sCijzjG2y2t38a1QX4ce6JlPmo53zROT9mvoU 8xFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hBWFPxqU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77425-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d19-20020a05620a167300b00786cb786cb7si13826157qko.499.2024.02.22.13.51.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:51:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77425-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hBWFPxqU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77425-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 11ED91C246E2 for ; Thu, 22 Feb 2024 21:51:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 428C9131E32; Thu, 22 Feb 2024 21:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hBWFPxqU" Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (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 05C711B5B7; Thu, 22 Feb 2024 21:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708638652; cv=none; b=U9H69Sk6ydf62ilRd73FGojsx8Kbm9klO/8km1nhAwuVywGxTGlO5UtTybYrWkGF4QvW8jcCzocN1gIJFcuGSBdeCCIAfk6svs/aMlcm2JTbBneIwAgsj8g4uOnkAd7M0F3OXaQq8BqYIrEghFttRFChg+SKkjyh2UYq05TGlBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708638652; c=relaxed/simple; bh=dGBN9a0Yzjh5p3hNPbycVeDbYgbRSgSZY+zTThjTCG4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ej5Y04ZBLHtyY3Jt4V4cFmKwqI67r2m/ux35SmjIV8WmC//LJC3o88Dvw+in+hVQurcdINojV2zP0o3DligIIEVmAW/xSZ0iJDVSB1H2NHDP7aKWU5hvtpcIZpKIJbMR1kKkpJUXu+pCsKAXN3/wzKSFoPG1f9ZeB0rH7EVJ3Sw= 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=hBWFPxqU; arc=none smtp.client-ip=209.85.219.174 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 Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-dcd7c526cc0so227457276.1; Thu, 22 Feb 2024 13:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708638650; x=1709243450; 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=GbRtgjzmc+Ky8Y7MGw/x7vZn3ys1w90kiZLMg7mLUbQ=; b=hBWFPxqUC6km/QcxqhPAsxQzdnduPlnxb4cM36IYdj6T5m2xPFk0wgUfyH1KX/yaa2 l2uo0Crjz3J9EEcDfCh5tlVKOer0HZWRn0IgcoJynV2sYKiw3SGEwLhYxz8RzUwq080L SgiOJGV7nlL8hTSRsJk8qfe8f4VvJBM/3UcOzzoAhxSRtqgVCP+YUhiiCd1s0RYMCe6S 53KE/jU8zEOPBVB7LfT9b/brZNsy5qoR/NuilhAKNOYlOHAUtwUP1i9CFrJtc0Iju8n5 ziuMTIc81QbSZdN23dhHyaXvX+OTdBgtsXjLiUBl2V/DSoNQwVEGrJ68ycR7jQrSQvOM AD2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708638650; x=1709243450; 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=GbRtgjzmc+Ky8Y7MGw/x7vZn3ys1w90kiZLMg7mLUbQ=; b=aytIeUxck2yXGmnVDNRo7vxCGlHpiJ5OPsgkL9NWRD5vu9yZ4b6zjt1U1cBp2YME7D waM/B+G5u0LA71Vmsw1QXRvGIaufvmYuRgW7OaajPxqrre+3JpZ4S5DDBh5CQHQpn6Om zynFQg5d6kOpGslnjfz8YYWXVtgW60kJqnSkWNckYrp50CdF98h72E4x6eg6/ABxFIE6 kCOCn6tH6oGizDZepbfuTXYP+wc+rOOFrG+QrgTHzihnRGSdU+2NsOb8hgL2q6LxEHpM d8HM9DvLDuLqewqDZAJ/IP03u5W0z/CMHkI0yxez92UKfF+xM0MFtVRGlkoK+A7i06xh 8oig== X-Forwarded-Encrypted: i=1; AJvYcCXk8JgSoUDTKIpz65pVptpm0YQtX2HplyQh0AT9Z/zTTBniSwIDXONAHOMZpRCjmnZPX2bR+JoAdbOYzUvXjf5tTwAJ5+N8F0+fn7UMewK0m7AY8Q7fySv3U9Aqj3/s5cTgHtNm X-Gm-Message-State: AOJu0YwBAlfoTKGX8mLXStbxhKkroUF5694E7mQ71ecW91l+pIaxiL4M WuR+hvaC05RpP3kb5j1Jsap5GygS9yVAsPcxB9Mv/DM4gFS8kuBq X-Received: by 2002:a05:6902:543:b0:dcf:3f11:633a with SMTP id z3-20020a056902054300b00dcf3f11633amr152678ybs.35.1708638649689; Thu, 22 Feb 2024 13:50:49 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:6d56:5106:b1c5:46d5]) by smtp.gmail.com with ESMTPSA id e2-20020a256902000000b00dc6e5ea9152sm3072361ybc.29.2024.02.22.13.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:50:49 -0800 (PST) Date: Thu, 22 Feb 2024 13:50:48 -0800 From: Yury Norov To: Herve Codina Cc: Andy Shevchenko , Vadim Fedorenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasmus Villemoes , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Andrew Lunn , Mark Brown , Christophe Leroy , Thomas Petazzoni Subject: Re: [PATCH v4 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers Message-ID: References: <20240222142219.441767-1-herve.codina@bootlin.com> <20240222142219.441767-4-herve.codina@bootlin.com> <20240222174959.7097c29b@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240222174959.7097c29b@bootlin.com> On Thu, Feb 22, 2024 at 05:49:59PM +0100, Herve Codina wrote: > Hi Andy, Yury, > > On Thu, 22 Feb 2024 17:39:27 +0200 > Andy Shevchenko wrote: > > ... > > > + * bitmap_scatter() for the bitmap scatter detailed operations). > > > > > + * Suppose scattered computed using bitmap_scatter(scattered, src, mask, n). > > > + * The operation bitmap_gather(result, scattered, mask, n) leads to a result > > > + * equal or equivalent to src. > > > > This paragraph... > > > > > + * The result can be 'equivalent' because bitmap_scatter() and bitmap_gather() > > > + * are not bijective. > > > > > > > + * The result and src values are equivalent in that sense that a call to > > > + * bitmap_scatter(res, src, mask, n) and a call to bitmap_scatter(res, result, > > > + * mask, n) will lead to the same res value. > > > > ...seems duplicating this one. > > > > I would drop the latter one. > > I would like to give details about the 'equivalent' in this scatter/gather case. If you would like - please do! :) > If Yury is ok, I can drop this last paragraph. The original bitmap_onto() description is 3 times longer, and barely that descriptive. I'm OK with your working and especially pictures. Thanks, Yury