Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp258170rwl; Sat, 25 Mar 2023 01:37:09 -0700 (PDT) X-Google-Smtp-Source: AKy350aju0l3EFgn/J4kcZvceYvnBtlPg6pOB0WYXd6S3ipw/eqZbqmUmZD03j52DDzkoI94gP+6 X-Received: by 2002:a17:90b:4b0a:b0:23f:7625:49b6 with SMTP id lx10-20020a17090b4b0a00b0023f762549b6mr5941354pjb.37.1679733429143; Sat, 25 Mar 2023 01:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679733429; cv=none; d=google.com; s=arc-20160816; b=JMNQcc7iHU1bXsrskMbwZ1ZnGnFtZCrvcZUWyqW0+J0nG6otFCSPibdbb9wdXqtH7P gb805xMxM8xs4H9W4TySuZ/ZeUUu9doyYJmVjTsyE2OdWRN30cuH4FBGRCavQ1Y1UNcZ 6nuUaPnmcEaMuW5YfpjKciT1DjyGIiSxDEGOP5S5ZLknuUvLY4/KJxQTXZilV8P9xi5y FOXMT04YlE/hszT7iFSzbFfje1AMJSlqBkl2NGLt/tGZjHhFE0dFBhClnWLwTDXIYM6c 8+OsILSctlQvNNKnxgBRIRFvEPctpapAM2eqJ9BtNItZ5EErnjUfJKtGBkI6zVUfUGLG E27A== 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=BLy7JI055ylxMjsX2/pxkVYjvaOU28P5hVTzIWHfGfMMrMancFBKaqcCLZIfqMST6W WV1jIyK1UUwB2A1LnnwFHaJJ0EGsE8PJjcgwhWzHS/F6HjNlqyvXr99EYXeYeveS8o8w lZfTAQPuY0L3ZJdlKArffmGzgVBPpWtpLi+I1ZbUPvu1gYKm/h4rmkSq7GuIuKWfz3s2 sh8Z6LweYgHwHAthsmE9nf/tztfB9VADK1pnJtIShtrDuz9Jc3VltPJVGBxNpmSB1AEJ +I4Zt+VaPdCI40SS4P/rjI49+hEnFm3Av8TYSFXHZ+GcMr32WAWpK9krLF5CdXn++LX4 g69Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o639WNsL; 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 n9-20020a170902e54900b0019f33c0d583si23136930plf.315.2023.03.25.01.36.58; Sat, 25 Mar 2023 01:37:09 -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=o639WNsL; 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 S232019AbjCYIdU (ORCPT + 99 others); Sat, 25 Mar 2023 04:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbjCYIdS (ORCPT ); Sat, 25 Mar 2023 04:33:18 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E17819A3 for ; Sat, 25 Mar 2023 01:33:17 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso7104355pjc.1 for ; Sat, 25 Mar 2023 01:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679733197; 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=o639WNsLIKilsuSbOUQwSfrRBEy0Ll5v6ntkkD2bVaCkuUpwN37cLOeUhsSmI2yWPg 2oHDK5veQ/gPP4Y6VOOAviErv5ZSsRk9Az81n0plcXMtoUtcAH727Zv2lzW5+8z6dWCd IZzlWtDLt/aIg213mx6VZnAHEGyB9FniS0Z5N6XYiQXNamw5/HjamXl1joGd3zIAstgk ieHPgx+zOgiTjL+QDQ+3ogDtcgbWlpb/+lYwHN1ln0Q+lT+wCObrY9aQVDSCGReZrFj1 dim4Xafs5mOQwBH66ZX6FKC4rDEBow9Wwz9bu15AuYjsFHO0YGHb3J87NkpFi5PDOw9s 7XaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679733197; 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=gdcuUcwuMsivjPMYz1i8pEiCPlZAC2Fxyl6znDEdl2Sq/SHPea2UEcXXcztpGbzX5f vmHs6xWGhK69DOU71elLPNNjUkzVfO7cYLQ+cpfrUGCITz7l3WFLSo3p+E7NYJjEWKmd pxPdCR57KFRKQiDD75Sd5ZtyySGq9INfrKybigkWDePAbLo5T04cj57oHC0DSDHfwC7h xEZktvmKsY31e+KryHUHg6ebGLL+S86bmJiBq0ePYZtmLWgObv6iT8wTHVUojOPa1XYa 3n+mvyncOl2ZCgMCPTMgph6dZumo49xKMzeL65bRyav4TizHSWuVlV1PzuvJeWTRBEOh L0wQ== X-Gm-Message-State: AAQBX9cSBPgv/ma266bKsc5PLmmi26hCLNMEDpdfAOhNhOlukKxckcqa 0CDX2kY8hOAX9Vu+Ncgg3vT/kzx8ccPMbYRH X-Received: by 2002:a17:90b:4c86:b0:237:c565:7bc6 with SMTP id my6-20020a17090b4c8600b00237c5657bc6mr5802024pjb.10.1679733196934; Sat, 25 Mar 2023 01:33:16 -0700 (PDT) Received: from ubuntu.localdomain ([117.245.251.101]) by smtp.gmail.com with ESMTPSA id m33-20020a635821000000b0050927cb606asm14290224pgb.13.2023.03.25.01.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 01:33:16 -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 v3 3/3] staging: greybus: Inline pwm_chip_to_gb_pwm_chip() Date: Sat, 25 Mar 2023 01:31:10 -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