Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp299219rwl; Sat, 25 Mar 2023 02:27:21 -0700 (PDT) X-Google-Smtp-Source: AKy350YrmXIu6tw6OvLxfBqPEMpI5JAZkY67alJTJHO7jw1A1EcKUId3k+resfjAzu4nkCUzrrlx X-Received: by 2002:aa7:d806:0:b0:4ac:b69a:2f06 with SMTP id v6-20020aa7d806000000b004acb69a2f06mr6047839edq.0.1679736441166; Sat, 25 Mar 2023 02:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679736441; cv=none; d=google.com; s=arc-20160816; b=mXx8yharlvzz5si3Lu11YCXKzgNhrOUgxDJn6qp7p/iQRba+h0m3D8VLkHoweytIbw j7WhtFjE1BuUpUwkvLiZihVSm0n7BvufWnG5gcIEPVUIZ4rXNysXOGKgIe3NUDzLkVny Fo15ULpSPPPmyynTGLDOb3BYsrFvEwHSqzTvLLdjAQ4dNdsVY4gmUSruBkqdFJFsQaVb uEkVoz46J7q8VN1aw0w6lJ6KnZdmA0Fq5Rl3MhgAn2jl5SQU5Bx6fnb2jMdAAS0pHYsP SOibsHXh9fQeEwMDmBtelrG2OsA1RpwM3xypKTR7z1CFWXSDymdU+ySDp6ZRoP+4tDKR PsKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sazjvC0a73fvbar70iJg8LesIq7rRkUicCd5/Ff4JxE=; b=J4UhH8Um6HaWJhnvowYfxM2qG9PEoTzskrMRbgnL/WOfZMRV+FkejopQOoR4Tb4+NE ZEFNzv0GuZh+SXLURQuL1elERERHwAxAAQIlqzhtL7Xo15CnuGLwGvgO1TRe6cYpbb3H 6QG2snx9+TjFAO8pNzovG8uPkgfMRtgEmfMLi1wt1SF7QJhGDDOxNd/OiKGX1T4JtkJn YeNeDDDJgD+7n+0CkOuEORNucH3uDxjg0wVwCC5lAzpZ5m9CzGDyful9ij1RP9BsM3y/ uHG+TsrTeZ11ft52yf0gBMoTbVk+RMOUopPhtPrjUXbT63y7lunw7kCp5sASC4f6DyYz OJbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JdeBzSAm; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020aa7d8c3000000b004bc501f34d4si20977502eds.250.2023.03.25.02.26.53; Sat, 25 Mar 2023 02:27:21 -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=@linuxfoundation.org header.s=korg header.b=JdeBzSAm; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231522AbjCYIzx (ORCPT + 99 others); Sat, 25 Mar 2023 04:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjCYIzv (ORCPT ); Sat, 25 Mar 2023 04:55:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339B9DBF4 for ; Sat, 25 Mar 2023 01:55:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DD60FB8069F for ; Sat, 25 Mar 2023 08:55:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E933AC433D2; Sat, 25 Mar 2023 08:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679734548; bh=7u5dawj2c2fO53iR4hy3wYysiDixPMrt/zLjhNT/b28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JdeBzSAmWOb5OtTKlnceOFbh0Y7xF0HS24UVpYblMZH5+h8P/7T1Tb0Oy2T3cN6NE aIzasQ07PK0xoGUTeC1zCJ3ZIJbrykefNg8PDiszW07VZo9GxZJ2jnMD0HnCVGEvUk mKZ/4yIoECOSSTRYLMiCSjgaQHrBt93SNO+OFYp8= Date: Sat, 25 Mar 2023 09:55:45 +0100 From: Greg KH To: Sumitra Sharma Cc: outreachy@lists.linux.dev, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] staging: greybus: Inline pwm_chip_to_gb_pwm_chip() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 On Sat, Mar 25, 2023 at 01:31:10AM -0700, Sumitra Sharma wrote: > 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 > > This patch didn't apply due to changes made in my tree by a patch from someone else before yours. Can you rebase it and resend? thanks, greg k-h