Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp554020pxu; Thu, 7 Jan 2021 11:41:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoREmcpBHR9e4EVTkQ38h9y7hZpiEiCJzyPaeCsXJpsmXqQT4VPMR0vC2Y/KhA7+UjY9e6 X-Received: by 2002:a17:906:a8e:: with SMTP id y14mr263370ejf.47.1610048469736; Thu, 07 Jan 2021 11:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610048469; cv=none; d=google.com; s=arc-20160816; b=dt5oxci1Sw43IZinNUVyL90NN2TjgXM+bjag0aIvzhT2c/Gls1vhBBG2lHdOjkDw2N X9T+4snR+x7VByL00IyE7MjGZUEazOkoF9vFDRu54dZpzDwDnMr8u2YxD5l+VP56Qcuo GzkMSFQ6mFkXD6NqmyDu9DNhJsz/tEX788bjYqO3aCX0cxiOrMcOCYfSGH49SVMVZEmQ u7inb56X4FtPgAH/lPw7j+UE9h4cN6EfUDkF6ytYejU0c0wKEtkWcwG942i/eB1zK7P1 hBzTgwnYNx79R5sis8UmLzyNwF7WSbR/BzCvY2Q6sNvPYPM82goN1QFVsSxo47UhR7Ik izGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NmzTv3k77uTdCqmkJvw5A3Ly7vG9atthR0BcPxb1esM=; b=qtmb4WrO/4bDZCUFwmGocoGbiHeYxbz/kfRUyUoyLphJKAYmVgp20BYpJRXrHNQewm OmZIWVyGm2WJpzTodr+9VWe0WCfNgnI6aLiaVAq+XXBh82WnlA5gF+bMKlfwc/GAzXjI M3EHyQWJMK32X8WkyDnqr9uWVL9Om88i0lgMT8GGPA7k+MWtsWv3inx31K4D2bGdN1U1 i0zQ2nD36e9dT+t6ecUQiSY6WbXKqI+JHe2kzFEYP4yphFzcm3sFLjbHz7JVa5uzR830 8FhjOQzV7TMwB2KwFIkEShOXXEkeCyvI6gJJlJmSRO8PRPW74aaFTcDbwJ4SE72wz4/O VmQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jTDM5V7j; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si2568276edr.305.2021.01.07.11.40.46; Thu, 07 Jan 2021 11:41:09 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jTDM5V7j; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbhAGTjp (ORCPT + 99 others); Thu, 7 Jan 2021 14:39:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:47954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbhAGTjp (ORCPT ); Thu, 7 Jan 2021 14:39:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D304233CF; Thu, 7 Jan 2021 19:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610048344; bh=QXIAGs3pY4yrERUbkDGVHnZ5YsZncF7q756owJanuS8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jTDM5V7j8E5piHv9zVnQwwl/c8JGpWu04un8eycixO0yCRpRX9mNki/K78rEJAj7y NmuW8AqC9s1GxtUoDxEjaGzw0qOHlja1IzRpTI6qS7sJSyV1fzMIzKqGOLqeZ8+kXZ Nwqakv9e0E3oE4O8t0WnGdB9prxtB6ZuGi3Mw0FQ= Date: Thu, 7 Jan 2021 20:40:24 +0100 From: Greg KH To: Mike Ximing Chen Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, dan.j.williams@intel.com, pierre-louis.bossart@linux.intel.com, Gage Eads Subject: Re: [PATCH v8 03/20] dlb: add resource and device initialization Message-ID: References: <20210105025839.23169-1-mike.ximing.chen@intel.com> <20210105025839.23169-4-mike.ximing.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210105025839.23169-4-mike.ximing.chen@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 08:58:22PM -0600, Mike Ximing Chen wrote: > Introduce dlb_bitmap_* functions, a thin convenience layer wrapping the > Linux bitmap interfaces, used by the bitmaps in the dlb hardware types. No, you created custom #defines: > --- a/drivers/misc/dlb/dlb_hw_types.h > +++ b/drivers/misc/dlb/dlb_hw_types.h > @@ -5,6 +5,15 @@ > #define __DLB_HW_TYPES_H > > #include > +#include > + > +#include "dlb_bitmap.h" > + > +#define BITS_SET(x, val, mask) (x = ((x) & ~(mask)) \ > + | (((val) << (mask##_LOC)) & (mask))) > +#define BITS_CLR(x, mask) ((x) &= ~(mask)) > +#define BIT_SET(x, mask) ((x) |= (mask)) > +#define BITS_GET(x, mask) (((x) & (mask)) >> (mask##_LOC)) We have functions for this, use them, don't create custom macros for them. Use the Linux functions please. thanks, greg k-h