Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp257921rwl; Sat, 25 Mar 2023 01:36:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Y1dNwcyN0pDjt3wKkt+JVd+Pc192p4NKrmKhlnOJEBODPkCO1+s691xK8nlopEDQ+ChTfj X-Received: by 2002:a17:90b:4a45:b0:23b:d506:226e with SMTP id lb5-20020a17090b4a4500b0023bd506226emr5688523pjb.42.1679733409701; Sat, 25 Mar 2023 01:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679733409; cv=none; d=google.com; s=arc-20160816; b=AESHQX2q43TA8WbcVAGRqoaQOUQDGUKvVAU1POPPPpykBsvhBk1z2gdHyGSndrv7xP U+g2RqJvWIiZNjFAvFi6wBWIg7Zh4l2eFGS1wO4NzY4NJjBjCph+GV4RetViD4YG2EB9 yLLTW3utkkCzOfIMklEDLFtzS7WnX5ITRkZc1QWCWCBYtMplDTOLJhT7qxMbXzFXpKnZ r+UPz756QN80mQm4OQGTlcz0GIKfAolWbkXELJz9iDqGdcdknzmA94QiWkObMl5iJjxP 1HNB8SALpUMHTl18LtmLIOBUCEtBL/qcoyJD2Q5fZboIYLcrElszBTOUYshZ8KRJfQDa +qLg== 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=rZRk78dM+sIDcTF06PFu8cSmlnVuUZmfpf5YGgQ/R64=; b=j5K6lOVbQ2ezYinHAmOFw6O/K2/dYZOPfcMdD84uMk6nGzA23N5Sf/OLobE5T0yFXM xrQpYJd4rGCi0EAOxNH0ZwBbqbqwW6YBND1Fo6VKNvDQen28GzJzcMx9M0aQFdgamE3+ fyrsM/FGZAK4q4nCx00OtPPc4ei29kF+DoeVCv0B8jskcwqYVSPG275apdghuLCQw5Ld pBUHCkzSemocMUTSuOLsSeqJuoJbK2rTDtJGxXcRCIbOJZVyNz2tuExKFjmC7oKmbB+p juAS3m5eIvspry9vO6z8djtbxUQhzU4sCNEVX0/OfQ6/Q/iWdM8Fu3NPHuVkjKzJHiyA IWSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HgZotS7C; 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 iq24-20020a17090afb5800b002333adf6321si1701107pjb.47.2023.03.25.01.36.37; Sat, 25 Mar 2023 01:36:49 -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=HgZotS7C; 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 S231980AbjCYIcv (ORCPT + 99 others); Sat, 25 Mar 2023 04:32:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbjCYIcu (ORCPT ); Sat, 25 Mar 2023 04:32:50 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A8B18155 for ; Sat, 25 Mar 2023 01:32:48 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id dw14so2649085pfb.6 for ; Sat, 25 Mar 2023 01:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679733168; 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=rZRk78dM+sIDcTF06PFu8cSmlnVuUZmfpf5YGgQ/R64=; b=HgZotS7CNv8U8GKTbwzwaX9ktzODi2OfWdl7CnvyiyiZBIvcGFPB9aZYPtM0+NxAAa 65o2MsIyYii9yQz7c1Y0VQw4HafGwYxCOXn3N2E1jWpfTZVOE+sc1l0Sj8Gp9ZlkHFjD eeEsi1WzsA3Pnd/lId0u2m0rA3PgHJlJS5mrIe5pdUUbGLXKtRVgmdsVyAXysNf3LdbV 0FpEbGccM8JNzG6oz9cjdByjZikUo0673yJI4A4uvJa8PpIUbmi9LjniUCHq5x7KLqCX vY3Veu32Gm/HvmjeYEeRkMpmP15EimNKRqj4SuUQaipnZRxKCASMxkQzffLByQeOf0T1 vwZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679733168; 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=rZRk78dM+sIDcTF06PFu8cSmlnVuUZmfpf5YGgQ/R64=; b=E0hrECwAcZ995huvSlo6vpIJrXo9yjSSXZTcGycBFDp1XGS5pdt6WDU2Bzo1sosUfe 4vQ0uUctYXbfC6clax76LD7rd5TIuX3FsylGBv5sCj8I9qIoETs3+FsiWR33DSX/tqxg haKwRBKSuLJDBgDEnSyAsuRopVcMd8oWidhR7L1b/AHiK5By688K4LjHQXJZkspa0ZZY eI8uTVmdrKQfzQgpyZm2nNI7clR/BY52iUKtVPxvve0m3XOu5L24N31RqQYT9mOhySaL NDOz7HFhjq5Zr6hbw708/lyCFeaYr27++5aHQVjA6GoY+/mCiTT3NBqo6ScTe6/9siC4 F/hA== X-Gm-Message-State: AAQBX9eIgCMrBgVZczus9VcvwM7a4sj5cTwR3jeDNV+qe86bzS/4aZQB Bp5pKQqv8uVVm9zABjYz89mbhmTz2XbAL44r X-Received: by 2002:a62:5e81:0:b0:627:fd49:9ab with SMTP id s123-20020a625e81000000b00627fd4909abmr5191177pfb.28.1679733168222; Sat, 25 Mar 2023 01:32:48 -0700 (PDT) Received: from ubuntu.localdomain ([117.245.251.101]) by smtp.gmail.com with ESMTPSA id m33-20020a635821000000b0050927cb606asm14290224pgb.13.2023.03.25.01.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 01:32:47 -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 2/3] staging: greybus: Inline gb_audio_manager_module() Date: Sat, 25 Mar 2023 01:31:06 -0700 Message-Id: <7470bf9d9a57e8bf27e55bd5e3791c5e0ee31385.1679732179.git.sumitraartsy@gmail.com> 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 'gb_audio_manager_module' 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/audio_manager_module.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c index 81b4ba607a0e..5f9dcbdbc191 100644 --- a/drivers/staging/greybus/audio_manager_module.c +++ b/drivers/staging/greybus/audio_manager_module.c @@ -12,8 +12,11 @@ #define to_gb_audio_module_attr(x) \ container_of(x, struct gb_audio_manager_module_attribute, attr) -#define to_gb_audio_module(x) \ - container_of(x, struct gb_audio_manager_module, kobj) + +static inline struct gb_audio_manager_module *to_gb_audio_module(struct kobject *kobj) +{ + return container_of(kobj, struct gb_audio_manager_module, kobj); +} struct gb_audio_manager_module_attribute { struct attribute attr; -- 2.25.1