Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp189519rwb; Thu, 6 Oct 2022 16:52:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5VRk8Bbc/kXV8b9SChKkUbQ1aNvAxvlkS5YEk86gsNzNAvRR8JiADW3oPwg/JyvgWwWrkT X-Received: by 2002:a05:6402:2547:b0:459:1752:2a97 with SMTP id l7-20020a056402254700b0045917522a97mr2058331edb.323.1665100325837; Thu, 06 Oct 2022 16:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665100325; cv=none; d=google.com; s=arc-20160816; b=yhO4BAlRdwGvzboBJ+ggWczLcQMjTChyRD22Gf7vhZW+gBSBC+KdOjSscap4upr8AC Ot0lvaQiX4kWuGfg7CHu+rwJMRUkjpsrdrciXgQkKhhAHLfVZmt53tnmI7hiCiS8sDVA niroRr+GmFoFR63U+ytRnoVYJS1cgHMfM1ec4Dvq2X8FMNaUjoWnO6MIubCWptaf6asa steeu2wIR35s2n+FjJYCjWsYCNZ/FucpLnpmSuyX/4wS9yM/vEFRecDQhQJ9C2/cVIqA EnQ6R+37ux1sYPGEZQMzuZxCVoF2WckbY5+zFbrtbaHtVPokgDrj8atKIg0iCk358URs nz7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+XUdQNj48ncmTu/SQgRtrYpfgHGa2Sa7u3eYn1JUF20=; b=vhgfpGsAu8QJr1GgVf44Uju7xBbFaTDpXt6K4U4cJQUnueCLjCCXOkvrPxhXluik5i O8TEIMAyaahJafWiD475+Zh0Klv0x2jg8DKHQJIuo6m8u5OtoGDWgdbFHtUxGP5Bo0u2 UYLErIoUaqtL9LwTBKZaRzTz9hZhHdVxPfbuuJn/1EXhCjZT9IHyOGcvwhhGKlMw8yns yv5YkwwnPRnkQxmK0NBTXxpCAetrNL4/b7/akNkYCDvRe6t4CcMiZL/1PZ/eF8aspjVd eYsOEgoTNSYmuLrxKWxyYq87HJH/Pzn3rhraT0UjeNDMm78kyn7W1vtJEHfRThTc2SWm W8RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pappasbrent.com header.s=default header.b=JNAYHy+6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020a056402121800b00458b9b7bbc5si603071edw.401.2022.10.06.16.51.40; Thu, 06 Oct 2022 16:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@pappasbrent.com header.s=default header.b=JNAYHy+6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231464AbiJFXPG (ORCPT + 99 others); Thu, 6 Oct 2022 19:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiJFXPD (ORCPT ); Thu, 6 Oct 2022 19:15:03 -0400 X-Greylist: delayed 351 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 06 Oct 2022 16:15:02 PDT Received: from mailout-pe-b.jellyfish.systems (mailout-pe-b.jellyfish.systems [198.54.127.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 374392A424 for ; Thu, 6 Oct 2022 16:15:00 -0700 (PDT) Received: from output-router-58994b6955-749vc (unknown [10.35.5.64]) by mailout-pe-b.jellyfish.systems (Postfix) with ESMTPA id 4Mk6ZS6FQHzDqGn; Thu, 6 Oct 2022 23:09:04 +0000 (UTC) Received: from MTA-07.privateemail.com (unknown [10.50.14.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by NEW-01.privateemail.com (Postfix) with ESMTPS id 9F35818000D0; Thu, 6 Oct 2022 19:09:04 -0400 (EDT) Received: from mta-07.privateemail.com (localhost [127.0.0.1]) by mta-07.privateemail.com (Postfix) with ESMTP id 7DCF318000A3; Thu, 6 Oct 2022 19:09:04 -0400 (EDT) Received: from bpappas-XPS-13-9310.lan (050-088-217-251.res.spectrum.com [50.88.217.251]) by mta-07.privateemail.com (Postfix) with ESMTPA id E17AE18000A1; Thu, 6 Oct 2022 19:08:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pappasbrent.com; s=default; t=1665097744; bh=IVLwuGDOCuSv54DN8iklpx3g2m+wYF3VGkjLroLokTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JNAYHy+6e/+WRzMyobhTT6r2577sR1DeG9piUvsQ09UQn23v0bgZKNsVEYHQq4elP nMtXJGXR+7zdGJ2zzVnnyqSRjD/jKEALhUQ9yI4Tra4jjqVGVWc0ylgbDi+DtZ+7cC ypKt2jnDPmdukmgoaOUMqHTrSKIAmjcl+YNYx03m29tntTQOdSKkNdXkma+tgBsGrE sn0g67wKp8mlFdlIMi8dBkcZtHK1ctBAga0iQ2tiF4rKKKquA4avLyfOh/OZRZglDP 6tg/B7ui34MM/P8TfoLc7SRFFcNkfWypopacDLv0DJbE7KcMZxxemS8Luy6mL3m7dJ lzRhaWEdBXmTw== From: Brent Pappas To: namcaov@gmail.com Cc: cai.huoqing@linux.dev, gregkh@linuxfoundation.org, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, pappasbrent@knights.ucf.edu, Brent Pappas Subject: [PATCH v3] Replace macros HB and LB with static inline functions Date: Thu, 6 Oct 2022 19:07:57 -0400 Message-Id: <20221006230757.33369-1-bpappas@pappasbrent.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221006174436.GA8933@nam-dell> References: <20221006174436.GA8933@nam-dell> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace function-like macros "HB" and "LB" with static inline functions to comply with preferred Linux coding style standards. Signed-off-by: Brent Pappas --- Changelog: V1 -> V2: Resent diff from a mail client that would not replace tabs with spaces so that patch can be successfully applied. V2 -> V3: Created patch using git format-patch. Tested downloading and applying patch. Sent patch using git send-email. drivers/staging/most/net/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.34.1