Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7297718rwl; Thu, 23 Mar 2023 02:12:46 -0700 (PDT) X-Google-Smtp-Source: AK7set/GBkUVg6vTZ+kmTimMJax+ool4PYYWg4d5urwkrXO8sFuOC8GSbiisQbgWHplO/HoTR5Ys X-Received: by 2002:a05:6a20:1610:b0:da:2b8f:94e1 with SMTP id l16-20020a056a20161000b000da2b8f94e1mr2739811pzj.13.1679562766427; Thu, 23 Mar 2023 02:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679562766; cv=none; d=google.com; s=arc-20160816; b=WNBLAESd8tKy5UdqhIkJngK3Q+tzblcSnNwAR+jAqSAcOi3BImKzei/lkmheaUIZX3 NsX1qr5sD9/Adf+UwjplHs2Kezv/+rxkzs0m0NEif+XsgQBQczoL8/F7Zrm1F62o5hsr 1YDHfksWZ7hpidn9DzwPp5imMAvH9reDj9TUalRGZDoWQQ5bDmEkEUGjnFECUT5YlTRA TOs21UByJUWmisp/yx5XFwIxz/yYJwQatf/1X6dgGMVZkUxk0SqcU7vcEPI/fEzM566t 3sU7DFfZSwq8G9tzXT5zqG7VU/SLLsETd3wisSfMiWN63vmBW6xRbS4f14r2tcKC8oTd E7LQ== 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=i9ruC/xMC7tL0m+Bw7Ok6wqKxtgof/3SmFbXbg58scA=; b=A9NxAK5hXIThuxzPB1W37PsVuRSLtFOX4Ey+Jh25aP0NMarUkSNkq7+JeE1dkukQkT ZaAe6lhYowvlWkii48BIVbLiv8DN+ayyJP0pYF0ENX22xMpSGzXFimxKqCtXbg9LT1/b oasIdydIOGvdoaUiqX6nxZkicwzBg81KEneSm86SlSRrXHC9N8Vv36E+pp/FVXRIqzus LnULIh8nZj3YiZExyBxhWarG/fKBIteVDNxdyGONAy0s42+ZnXLiybW1zJs+mHY5QuGd Sla409fKBDUbcssr9ilTgVoytUq0N1042PnzXy5aGZmKsAphV1kMcqda8svBG6FlltQP 8fJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VovKeNVY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a635f16000000b0050fa785a426si7424102pgb.634.2023.03.23.02.12.30; Thu, 23 Mar 2023 02:12:46 -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=pass header.i=@gmail.com header.s=20210112 header.b=VovKeNVY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231264AbjCWJF0 (ORCPT + 99 others); Thu, 23 Mar 2023 05:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231618AbjCWJFA (ORCPT ); Thu, 23 Mar 2023 05:05:00 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FF8F1C5AF for ; Thu, 23 Mar 2023 02:04:49 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id le6so21671033plb.12 for ; Thu, 23 Mar 2023 02:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679562289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i9ruC/xMC7tL0m+Bw7Ok6wqKxtgof/3SmFbXbg58scA=; b=VovKeNVYIntxSqSwNWdqBNoEkgHtZj1u9gRBjoOhUTw4PVGblIMga680+V+hAKcuu1 9K53BgtPNgXP/RlEwIzsDqktSDJ2DYi1xD8BQ9MhFUeTZojlldhjBlqncCA7Lu5k3BrR 1P5jKkrFeVpSxlwCTyCF2J5GHSzvdOIUN/J9oABTuTuITbiWrc2FWzi7JYmJNBcs46U+ h/QQ+0qOQ9snZEY+MwqAynbRxoUHUKiBHe65wgenOlSKRBmztMNouKK8Vp6lqrrLcKPR Y6FjIRHpvs4T+BX03DM/Ah8ybGbzDZqDH+c9d+SdFIwF2lcN4HHvAEP8wgCNds7exe1P eqcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679562289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i9ruC/xMC7tL0m+Bw7Ok6wqKxtgof/3SmFbXbg58scA=; b=WDpEJIx4NuhO5f8MhKO+OQAX83V4RQyu1CTgQisp6F5E3GfzoSVudJi2Mt+cL+95nq 7pC8aP2xWJelvIl54EkJinWQSurgqDIe3qBvPPS+bf4dIsssnrGX9zG04J8USAk8npIA t5nlNLRbE/d6f5y4CkU8LmUIudBRgtQyz/FJfJpS9NO3BOUObtzcIOihymXYGg3xH0vY 9ZcFTldxWkrMfR4dVZLgII6adS3pIa2KVcDDdSrHjvXqO1MyR6IBKyQMTU7mYLdrpUVK 0coAoI1eN323ssyod2grsBw1T521pypthprglhwOh18BJTvBjwfx4uuLSVlimBRsbSC/ NefA== X-Gm-Message-State: AO0yUKXaQMpYMcfSiXARtTJ6P2O0FMpTlDkvGy8P0gvCm39nUK+mH2yK LcRHZ1KnKUy7GnDLRQjtOjk= X-Received: by 2002:a05:6a20:66aa:b0:d0:212d:ead0 with SMTP id o42-20020a056a2066aa00b000d0212dead0mr2342077pzh.26.1679562288804; Thu, 23 Mar 2023 02:04:48 -0700 (PDT) Received: from ubuntu.localdomain ([117.207.139.205]) by smtp.gmail.com with ESMTPSA id q8-20020a656848000000b005034a57b963sm11277116pgt.58.2023.03.23.02.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 02:04:48 -0700 (PDT) From: Sumitra Sharma To: outreachy@lists.linux.dev 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, Sumitra Sharma Subject: [PATCH 3/3] Staging: greybus: Convert macro struct pwm_chip_to_gb_pwm_chip to an inline function Date: Thu, 23 Mar 2023 02:03:41 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Convert 'pwm_chip_to_gb_pwm_chip' from a macro to a static inline function, to make the relevant types apparent in the definition and to benefit from the type checking performed by the compiler at call sites. Signed-off-by: Sumitra Sharma --- drivers/staging/greybus/pwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c index 3fda172239d2..88da1d796f13 100644 --- a/drivers/staging/greybus/pwm.c +++ b/drivers/staging/greybus/pwm.c @@ -21,9 +21,11 @@ struct gb_pwm_chip { struct pwm_chip chip; struct pwm_chip *pwm; }; -#define pwm_chip_to_gb_pwm_chip(chip) \ - container_of(chip, struct gb_pwm_chip, chip) +static inline struct gb_pwm_chip *pwm_chip_to_gb_pwm_chip(struct pwm_chip *chip) +{ + return container_of(chip, struct gb_pwm_chip, chip); +} static int gb_pwm_count_operation(struct gb_pwm_chip *pwmc) { -- 2.25.1