Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp683063pxj; Wed, 2 Jun 2021 08:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSlC/Ucfx4KbEXrFA9npF7k+8m7dw+kADapUL5CL7p3S9U71ARX3ugyNPxo9ZVrAAthOL3 X-Received: by 2002:aa7:d905:: with SMTP id a5mr16177522edr.387.1622649023987; Wed, 02 Jun 2021 08:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622649023; cv=none; d=google.com; s=arc-20160816; b=jd197TGmufoNm/+sKfZ0zNJYtUQTY2cbyCk0qggfDBt0Uld/vcA6BzWVeWWuFPkIGD ho2JL0rVsm/GRx/7nPY+8BnQd/CGfoMA4eDq3hjNwIasDuv3E1ox8UoAvCFBqzP4NbS4 lKabD2M45WjW6EpRElNd4IreuMxctvOHY89WwAsqY1QCiC4w7lagPnHPzXJ5fQDkwQLI OGnkdtJKe5VtSshhcStrMYgzYhKjZdgfFDOKF8TB9E4WldJy3OJBqL0ustbuOJYLz/Vq TdZfNiCioS3oQ92BQ4IQyIGIQ86S+2z2L/DoHFoSBomazzQ3WIe9bRZXF/5TU5TC/Rw2 gazA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=S1VDTwjYq7tWH/yG4apNGtzKQ/5vZcuSude3miPsn4k=; b=rqKAmpVbF+xZJtl9bcioc2kj6GEemU3sr9GVfrw1LHZH0Vw1X+rqgMiY7hPzdHbiv5 c9jYZrh7+7kHczrIV5ELdm514+7b5PpEDZx8KbJa3m3wpiMdVma2m4642G4pDYm3tyJv w2V/WHmypb1RlekupstaUFOsFBmMo0j8Y3ppa3qLyQIvL3UfYb6KAe1DXi74ffE/Z1xs Alh3Hlqc84UbaR65embUdJYtnEsbJnQLnZTlzejkQQHd4Ee1OvHK/2sQZKXM5I//8Bd5 Tvwv5gdKPpGYP/eTfJhbrVfFb30y4tBdL/IMad4dE0P/khrjsAJT4qJpbltry7Obd5/z ta4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si269057eje.4.2021.06.02.08.50.00; Wed, 02 Jun 2021 08:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbhFBPuI (ORCPT + 99 others); Wed, 2 Jun 2021 11:50:08 -0400 Received: from mga17.intel.com ([192.55.52.151]:22361 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232143AbhFBPuH (ORCPT ); Wed, 2 Jun 2021 11:50:07 -0400 IronPort-SDR: SDMSRLklSO1j6akGRQWdo4pWitya20itBR4HYjO32wwuNTKvcshQ/0dBeKeYbQHqOeDvkgpHn8 byu8K9QjJm/w== X-IronPort-AV: E=McAfee;i="6200,9189,10003"; a="184187138" X-IronPort-AV: E=Sophos;i="5.83,242,1616482800"; d="scan'208";a="184187138" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 08:47:33 -0700 IronPort-SDR: DbzsOULsi6zea7J8HpmDoYlaiiYgMPSZ3UyaXePMwK6kXJ/BQumGWmKOp/H5POh+E3pCS+R6pY G1NqnWBRgMKw== X-IronPort-AV: E=Sophos;i="5.83,242,1616482800"; d="scan'208";a="550192050" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 08:47:31 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1loT5b-00Gk5b-Fw; Wed, 02 Jun 2021 18:47:27 +0300 Date: Wed, 2 Jun 2021 18:47:27 +0300 From: Andy Shevchenko To: Tian Tao Cc: gregkh@linuxfoundation.org, rafael@kernel.org, akpm@linux-foundation.org, jonathan.cameron@huawei.com, song.bao.hua@hisilicon.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] lib: bitmap: introduce bitmap_print_to_buf Message-ID: References: <1622641734-22538-1-git-send-email-tiantao6@hisilicon.com> <1622641734-22538-2-git-send-email-tiantao6@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1622641734-22538-2-git-send-email-tiantao6@hisilicon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 09:48:52PM +0800, Tian Tao wrote: > New API bitmap_print_to_buf() with bin_attribute to avoid maskp > exceeding PAGE_SIZE. bitmap_print_to_pagebuf() is a special case > of bitmap_print_to_buf(), so in bitmap_print_to_pagebuf() call > bitmap_print_to_buf(). ... > + * The role of cpumap_print_to_buf and cpumap_print_to_pagebuf is * The role of cpumap_print_to_buf() and cpumap_print_to_pagebuf() is ... > + * The role of bitmap_print_to_buf and bitmap_print_to_pagebuf() is * The role of bitmap_print_to_buf() and bitmap_print_to_pagebuf() is ... > + int size; Strictly speaking it should be ssize_t. > + void *data; > + const char *fmt = list ? "%*pbl\n" : "%*pb\n"; Can you use reversed xmas tree order? ... > + return bitmap_print_to_buf(list, buf, maskp, nmaskbits, > + LLONG_MAX, len); It fits one line. -- With Best Regards, Andy Shevchenko