From nobody Mon Sep 15 01:57:33 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 763C5C3DA78 for ; Tue, 17 Jan 2023 15:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjAQP3l (ORCPT ); Tue, 17 Jan 2023 10:29:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbjAQP3R (ORCPT ); Tue, 17 Jan 2023 10:29:17 -0500 Received: from h5.fbrelay.privateemail.com (h5.fbrelay.privateemail.com [162.0.218.228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ACCA23868 for ; Tue, 17 Jan 2023 07:29:14 -0800 (PST) Received: from MTA-12-4.privateemail.com (mta-12-1.privateemail.com [198.54.122.106]) (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 h5.fbrelay.privateemail.com (Postfix) with ESMTPS id 7A72A60003 for ; Tue, 17 Jan 2023 15:29:13 +0000 (UTC) Received: from mta-12.privateemail.com (localhost [127.0.0.1]) by mta-12.privateemail.com (Postfix) with ESMTP id 78BE018007B8; Tue, 17 Jan 2023 10:29:11 -0500 (EST) Received: from bpappas-XPS-13-9310.ucf.edu (050-088-208-136.res.spectrum.com [50.88.208.136]) by mta-12.privateemail.com (Postfix) with ESMTPA id 914EE18007B2; Tue, 17 Jan 2023 10:29:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pappasbrent.com; s=default; t=1673969350; bh=DcuerZeOumw84rDdMN0oRM675FUBgF4UGDCfY2qoPwI=; h=From:To:Cc:Subject:Date:From; b=bwEbeFA0cowSHaIAvq/EZXnha1OvxObmQ5G00PLitt4WTMiv36bBVhb4xjIvU1Eqq igZ3/dAkBJnIMnCiXfZGIpi8ITrqMQoDdI5xKvuWUSiZfpoWYYoP+TWc2V3/uHu4gO XkzS21LJ8QW0xAH5oIBeQfh4A7Xx+nXkqcluH4MJGsLH7b0gDDAM1hCVkDpE3uUfgb 7e1zgPkz10cFqLXJ3//D0crOTF8TvKo6VcvKBuOf/ECVUSFQViz5WSdi9ULy4u4aHC ycEpBrNjkyUT/RgxjTc8YkcmrNFJySRiw2r08gg9UXlUQp6Yd318rzfmXdhh/g0Ekw +vnKBnkJIQcdg== From: Brent Pappas To: rmfrfs@gmail.com Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Brent Pappas Subject: [PATCH v2] staging: greybus: gpio: Replace macro irq_data_to_gpio_chip with function Date: Tue, 17 Jan 2023 10:28:57 -0500 Message-Id: <20230117152857.22141-1-bpappas@pappasbrent.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Replace the macro irq_data_to_gpio_chip with a static inline function to co= mply with Linux coding style standards. Signed-off-by: Brent Pappas Reviewed-by: Dan Carpenter --- Changelog: V1 -> V2: Change return type of function from void * to struct gpio_chip *. Remove the inline keyword from the function definition. drivers/staging/greybus/gpio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c index 8a7cf1d0e968..833162ceb385 100644 --- a/drivers/staging/greybus/gpio.c +++ b/drivers/staging/greybus/gpio.c @@ -43,7 +43,11 @@ struct gb_gpio_controller { }; #define gpio_chip_to_gb_gpio_controller(chip) \ container_of(chip, struct gb_gpio_controller, chip) -#define irq_data_to_gpio_chip(d) (d->domain->host_data) + +static struct gpio_chip *irq_data_to_gpio_chip(struct irq_data *d) +{ + return d->domain->host_data; +} =20 static int gb_gpio_line_count_operation(struct gb_gpio_controller *ggc) { --=20 2.34.1