From patchwork Tue Jan 17 15:28:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Pappas X-Patchwork-Id: 44717 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1826128wrn; Tue, 17 Jan 2023 07:40:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXuiXn/w+WLyTZfNLGua41WUTmfyu5rfvBrp3BiKQJcXxVnm+flVqWmWaCi4U1W5ALI+rGCF X-Received: by 2002:a05:6a20:491a:b0:b5:df4f:6731 with SMTP id ft26-20020a056a20491a00b000b5df4f6731mr3796751pzb.17.1673970018652; Tue, 17 Jan 2023 07:40:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673970018; cv=none; d=google.com; s=arc-20160816; b=CNNpvEA9bli2vcG95nfgkRxdyrTzjHZgECP4vPiV9WVCoWzLWI5m2DP/keyXdZbjmq NvLNGAZIfTAmgsISJ1rSzLJMOMyteDV2ujSBJL8J2tscX7P02lRMJMKCuX1ySw2foLAs 0pVCW+UZJ2KyxrimCqBmGy2kkXia8DYxaj6JFfmuQnTNjydPMSlg/QE1JhUI44vqQ/QJ AmA4QCLi7/lD5RG2jdmRsD1/Er/Al8GFBlr9gj/eoGhgUxrf3PPT+NeRsm2hUnFywgW/ xmq57FPgjo2pBDDRVADhAWbt/qb2isuw610FRdQnmCX2iRRzhfjIMfBQRS3ogV+PRE/U sx2g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HYFd4snmeNUI0QOF0BJS41v4fv3lXvV6XQFll/2MGpw=; b=X7SGEAmLPoAlCjtfTH/gNZSjACX0j0nfvwu7K3r/puSlagYtPR1rhTZaTieQu9Usx0 ggU6EHoBCbn/k1WbJk6tlPTQ6aMddX8k74/d747etX1vqlkbtuZu1DN1LgK4Ue7Nccut lZfR+L87APrUpOEk3FmrkkHzpQ7jiHdsZxO/RRaqpsp8tvylJ/6uJs6PhY0+DzhAkL+m AVp1k0sXdJdKslOUFIGZBDPFSCIb5/s68PazfO5Xawn25GwDkRocZxXf7ZPRSDV8ue2C cNsrg1L1za1LgVZDxQ4YRWSNpi+DW4PtNCe2iOHDLo5dQ5Qh1r3MDLkCUoEwRqJt7EA8 5PRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pappasbrent.com header.s=default header.b=bwEbeFA0; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a63fc0c000000b0046f63218914si32023243pgi.311.2023.01.17.07.40.05; Tue, 17 Jan 2023 07:40:18 -0800 (PST) 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=bwEbeFA0; 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 S232754AbjAQP3k (ORCPT + 99 others); Tue, 17 Jan 2023 10:29:40 -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 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,RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755284785967127568?= X-GMAIL-MSGID: =?utf-8?q?1755284785967127568?= Replace the macro irq_data_to_gpio_chip with a static inline function to comply 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; +} static int gb_gpio_line_count_operation(struct gb_gpio_controller *ggc) {