From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 C4C7A33F1 for ; Wed, 5 Oct 2022 23:57:46 +0000 (UTC) Received: by mail-ed1-f51.google.com with SMTP id a13so674090edj.0 for ; Wed, 05 Oct 2022 16:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=aEfEliKsuauHqKdKxHLW94n4jylnSfwinxLKm0znj80=; b=eZHoNR9QM8zqCFZEkkIK6CEYP3UvO4RG4LCukozoU4VwLH4Ur2Mt3UHVTW9u9RsiUH UUyC2SRPvE4oekShfuFO0KEr7p+6Eq0+PFf/gdD3j2H/OYzRwYAlqlqYLX6h4iBGhvZI uld/HMXHvk7zAi9IHfZZWZYcBw87folqCnP4OQmrbiFt/iEMZAQoy8rPQY1lCQcRbiJ2 bZDKJhAsJyG0oRNl1yKtFzHs6/9/1l17DOw8eGYWGFp7/5i+nLGjF+/WCM0JQgh4jCVe 4mVkTRwIyotUNaFV214rYRNMmrfRA/D8cRvt8dEni8gobB00Y96HflLssHhEEQZcMX5r pzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=aEfEliKsuauHqKdKxHLW94n4jylnSfwinxLKm0znj80=; b=Ad/LBkH+CiPiR8RaJtx7INNby2cBqa23sBWpp4V5Ej4BCl9fgh7zqaj3CLhjP10pl9 2SZVIwZWP0c7BPcTqR3fjOQybeGi9cT7dq2KokGMDZ7zHO7B9sz+LgCeGHvaCyFwGqnf /RG4Ao05LYUuAC1QBe3f3vlEOZrvrni/kk8njQSjWD6oJgYr/8S8a8AnXmibq3C7FSFG l2aZXxL1K+RiUaYrKbuoYnIXXKDVEPiCfn+X4li6uISnYXEYhB/0MlHEjuWIOoEd//JL 3n3AKBqrcT5b4g/xz7z74v/ru/OR3l3Mi+W1rFbUkE7jZlTQ/uAelaLvuTM7x63BFnwQ Uj2g== X-Gm-Message-State: ACrzQf2aq1c+bT9rHxPYI1P65tIx2q+T807+uqeJHs2dL0oT+Qp1C3dp fwmdM+Rik339QQ9HSYb47hA= X-Google-Smtp-Source: AMsMyM59fRhAVfuLlqqfBsq+sSCqEj3R7DAkNeGkv5SxOuS3qiZQj6bSfe90oMKmAJ9iidqs4rZEqg== X-Received: by 2002:a05:6402:40cf:b0:459:d7de:d5 with SMTP id z15-20020a05640240cf00b00459d7de00d5mr600496edb.288.1665014265007; Wed, 05 Oct 2022 16:57:45 -0700 (PDT) Received: from nam-dell (ip-217-105-46-158.ip.prioritytelecom.net. [217.105.46.158]) by smtp.gmail.com with ESMTPSA id r2-20020a17090609c200b00730b3bdd8d7sm9463175eje.179.2022.10.05.16.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 16:57:44 -0700 (PDT) Date: Thu, 6 Oct 2022 01:57:28 +0200 From: Nam Cao To: Brent Pappas Cc: "gregkh@linuxfoundation.org" , "cai.huoqing@linux.dev" , "kuba@kernel.org" , "linux-staging@lists.linux.dev" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] staging: most: net: Replace macros HB and LB with static inline functions Message-ID: <20221005235728.GA118549@nam-dell> References: Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Oct 05, 2022 at 04:10:44PM +0000, Brent Pappas wrote: > Replace function-like macros "HB" and "LB" with static inline functions > to comply with preferred Linux coding style standards. > > Signed-off-by: Brent Pappas > --- > diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c > index 1d1fe8bff7ee..8a8fbc274b73 100644 > --- a/drivers/staging/most/net/net.c > +++ b/drivers/staging/most/net/net.c > @@ -36,8 +36,8 @@ > #define PMS_TELID_MASK 0x0F > #define PMS_TELID_SHIFT 4 > > -#define HB(value) ((u8)((u16)(value) >> 8)) > -#define LB(value) ((u8)(value)) > +static inline u8 HB(unsigned int value) { return ((u8)((u16)(value) >> 8)); } > +static inline u8 LB(unsigned int value) { return ((u8)(value)); } > > #define EXTRACT_BIT_SET(bitset_name, value) \ > (((value) >> bitset_name##_SHIFT) & bitset_name##_MASK) I cannot apply your patch. I think your email client modified some whitespace characters. Check this for more information: https://www.kernel.org/doc/html/v4.10/process/email-clients.html Best regards, Nam